this should work correctly because the TPolyMarker will be called via
the virtual Draw() function in TObject. Make sure that you set the right range
in the TCanvas (default 0..1,0..1). See small example below.
Cheers, Fons.
{
gROOT->Reset();
TObjArray a;
for (int i = 1; i < 6; i++) {
float x[2];
float y[2];
x[0] = i*0.1;
x[1] = i*0.15;
y[0] = i*0.1;
y[1] = i*0.15;
TPolyMarker *p = new TPolyMarker(2,x,y);
a.Add(p);
}
a[0]->Draw(); // draw first polymarker
//a.Draw(); // draw all polymarkers
}
>
> Hello,
> I stored many objects( of class TPolyMarker) in a Array A(of class TObjArray)
> with the command A.AddLast().
> Then i would like to Draw all these objects,
> but i don't know how to do, because, the command A[0]->Draw() seems not to
> call the
> Method Draw() of TPolymarker, but the Method of TObject.
> Thank you in advance,
>
>
> --
> Frederic Faure
> LPMMC (Maison des Magisteres Jean Perrin, CNRS)
> BP 166 38042 Grenoble Cedex 9 France
> email: faure@labs.polycnrs-gre.fr
> tel: 04 76 88 74 98
> fax: 04 76 88 79 81
>
-- Org: CERN, European Laboratory for Particle Physics. Mail: 1211 Geneve 23, Switzerland Phone: +41 22 7679248 E-Mail: Fons.Rademakers@cern.ch Fax: +41 22 7677910