ca2004
1
Hi all,
I have a data file .dat with three columns, I want to plot the data using TH2F *h3 new TH2F( ), and filling:
h3->(First_column,Second_column, Third_column)
But, I don’t know how to load the file.
I would like your help…
Thank you for your attention.
Manuel
brun
2
I suggest:
TNtuple nt("nt","test","x:y:z");
nt.Read("myfile.dat");
nt.Draw("x:y:z");
Rene
ca2004
3
I tried with your suggestion:
void Histo()
{
TCanvas *c1=new TCanvas("c1","Evolucion",200,50,700,500);
c1->SetFillColor(30);
TNtuple nt("nt","test","x:y:z");
nt.Read("resultado.dat");
nt.Draw("x:y:z");
}
But, the script is not plotting anything.
couet
4
void Histo()
{
TCanvas *c1=new TCanvas("c1","Evolucion",200,50,700,500);
c1->SetFillColor(30);
TNtuple nt("nt","test","x:y:z");
nt.ReadFile("resultado.dat"); //<=== ReadFile not Read
nt.Draw("x:y:z");
}
ca2004
5
Thanks Couet, your suggestion worked.
The graph generated is different from the graphic that I want, I want the type de graph gerated for TH2F using Draw(“surf1”).
Any way to do this??
Thanks
couet
6