Here is an example: void graphsame() { c1 = new TCanvas("c1","2 Graphs",200,10,700,500); const Int_t n = 20; Double_t x[n], y[n], y1[n]; for (Int_t i=0;i<n;i++) { x[i] = i*0.1; y[i] = 10*sin(x[i]+0.2); y1[i] = y[i]+1; } gr = new TGraph(n,x,y); gr1 = new TGraph(n,x,y1); gr->Draw("ACP"); gr1->Draw("CP"); } Olivier On Fri, 28 May 2004 kenan@fnal.gov wrote: > > > Dear Majordomo, > I'm a new user of root and I have a problem. I have more than 10 root > graphs located in different root files. Instead of opening them > individually, I want to open all of them in a window overlapped with > different colors. There is an example for histograms in root manual on > page 192. But I can not modify it for TGraphs. Do I need to write a > script which reads all these root files and overlaps these graphs with > different colors, or is there an esier way to do it in root? Would you > help me for this problem? Thanks a lot. > > > Kenan > > > -- Org: CERN - European Laboratory for Particle Physics. Mail: 1211 Geneve 23 - Switzerland Mailbox: J25910 E-Mail: Olivier.Couet@cern.ch Phone: +41 22 7676522 WWW: http://cern.ch/Olivier.Couet/ Fax: +41 22 7677155
This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:08 MET