Problem in the root title command

Hi,
I am writing the below command in text editor and executing that in root to plot the graph from the ASCII data file,everything is going well,but i don’t know why the title command is not working,i have tried several combinations,is there anything wrong? i would be thankful for the correction.

{
TNtuple calls("calls","calls","day:0:NW:0:0:N:0:0:NE:0:0:W:0:0:V:0:0:E:0:0:SW:0:0:S:0:0:SE:0:0:0:0:0");
calls.ReadFile("ev00001filtt.dat");

TCanvas *c3 = new TCanvas("c3","canvas");
calls->Draw("V:day");
htemp->SetTitle("FD ; day ; deviation")

c3->SetFillColor(26);
Graph->SetMarkerStyle(7);
Graph->SetMarkerColor(4);
}

Hi,

Could you provide at least a subset of your data, so we can try? Thanks

Cheers, Bertrand.

data.txt (9.7 KB)

Here i have converted it in .txt format and then uploaded it as it wasn’t accepting in .dat format, but it won’t affect in the root.

Sorry,earlier i think some of the things were missing from the command,i am writing that with correction again below:

{
TNtuple calls("calls","calls","day:0:NW:0:0:N:0:0:NE:0:0:W:0:0:V:0:0:E:0:0:SW:0:0:S:0:0:SE:0:0:0:0:0");
calls.ReadFile("ev00001filtt.dat");

TCanvas *c3 = new TCanvas("c3","canvas");
calls->Draw("V:day");
htemp->SetTitle("FD ; day ; deviation")

c3->SetFillColor(26);
Graph->SetMarkerStyle(7);
Graph->SetMarkerColor(4);
}
   calls.Draw("V:day");
   htemp->SetTitle("FD ; day ; deviation");

Works for me (i.e. add a semicolon at the end of htemp->SetTitle("FD ; day ; deviation"); and use calls.Draw("V:day"); instead of calls->Draw("V:day");)

Cheers, Bertrand.

yeah, now it works.Thanks a lot :slight_smile:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.