Hi,
Here is a working version of your macro:
{
Float_t a[4] = {450,1050,1431,1983};
Float_t b[4][4] =
{1576,3420,4854,6635,117,262,402,528,21,53,71,93,4,18,24,28};
TGraph *gr[4];
TCanvas *c1=new TCanvas("c1","",1);
c1->Divide(2,2);
for (Int_t i=1; i<5; i++) {
c1->cd(i); gr[i-1] = new TGraph(4,a,b[i-1]); gr[i-1]->Draw("AL*");
Cheers, Olivier Couet
On Thu, 16 Mar 2006, Zhu FengRong wrote:
> Hello,
> In the root_v4.01.02.Linux.RH7.3.gcc296 environment,I failed to run the
> macro like this:
>
> {
> Float_t a[4]={450,1050,1431,1983};
> Float_t b[4][4]=
> {1576,3420,4854,6635,117,262,402,528,21,53,71,93,4,18,24,28};
> TCanvas *c1=new TCanvas("c1","",1);
> c1->Divide(2,2);
> for(i=1;i<5;i++)
> {
> c1->cd(i);
> gr[i-1]=new TGraph(4,a,b[i-1]);
> gr[i-1]->Draw("AL*");
>
> }
> }
> Would you help me to succeed in running it?
> Thank you in advance.
>
> with best wishes,
> Fengrong Zhu
> Institute of High Energy Physics,
> C.A.S P.R.C
> zhufr_at_ihep.ac.cn
> --
> Open WebMail Project (http://openwebmail.org)
>
>
-- 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 7670300Received on Thu Mar 16 2006 - 09:55:43 MET
This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:31:57 MET