Please look the examples in tutorials !!!
-- Org: CERN - European Laboratory for Particle Physics. Mail: 1211 Geneve 23 - Switzerland Mailbox: J25910 E-Mail: Olivier.Couet_at_cern.ch Phone: +41 22 7676522 WWW: http://cern.ch/Olivier.Couet/ Fax: +41 22 7670300 -----Original Message----- From: Pilar Casado [mailto:casado_at_ifae.es] Sent: Thursday, October 06, 2005 6:40 PM To: Olivier Couet Subject: Re: [ROOTDEV] Drawing points on a reference frame Two final points: - How can I remove the line connecting points? - How can I plot two different set of points in the same graph? (I would need to use different markers for each set.) Many thanks, Olivier Couet wrote: >{Received on Thu Oct 06 2005 - 18:41:06 MEST
> Int_t n=20;
> Double_t x[n],y[n];
> for (Int_t i=0; i < n; i++) {
> x[i]=i*0.1;
> y[i]=10*sin(x[i]+0.2);
> }
> TGraph *gr1 = new TGraph (n,x,y);
> TAxis *axis = gr1->GetXaxis();
> axis->SetLimits(0,5);
> gr1->Draw("AC*");
>} > > > > -- M. Pilar Casado Institut de Fisica d'Altes Energies i Universitat Autonoma de Barcelona Edifici Cn, Facultat de Ciencies, UAB E-08193 Bellaterra (Barcelona) Tel: + 34 93 581 4285 Fax: + 34 93 581 1938 Email: Pilar.Casado_at_ifae.es
This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:12 MET