Hi Luis,
If you double click in the browser on a TGraph is draw by default using the option "ALP".
The drawing option of the TGraph is not part of the TGraph object but of the Pad and/or
canvas. If you want to prefer the visual aspect, save the canvas instead of the graph.
Cheers,
Philippe.
-----Original Message-----
From: owner-roottalk@pcroot.cern.ch
[mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Luis March Ruiz
Sent: Thursday, June 10, 2004 9:14 AM
To: roottalk@cern.ch
Subject: [ROOT] saving a graph into a root file
Hi rooters,
I have created a few graphs that they have been saved into a root file :
for example,
c1 = new TCanvas("c1","Graph Example",200,10,700,500);
gr = new TGraph(n_bin,bin_x,bins_comp);
gr -> SetTitle("(difference between test and norm ref histos)/sigma");
gr -> SetMarkerStyle(21);
gr -> SetMarkerColor(3);
gr -> SetLineColor(3);
gr -> SetMarkerSize(0.5);
gr -> Draw("AP");
line_1 = new TLine(range_start,0.0,range_end,0.0);
line_1 -> SetLineWidth(0.5);
line_1 -> SetLineStyle(3);
line_1 -> Draw();
//c1 -> SaveAs("diff_histos.ps");
c1 -> Update();
//c1 -> Modified();
The problem is when I open the root file ... the graph has been saved
with other Draw() options ... the graph is plotted with a line between
dots, as the option Draw("ALP") ... I don't understand it, histograms have
been saved as well, but they have the Draw() options that I selected,
Draw("AP").
I'm working with an old version, is it a problem ?
What am I doing wrong ?
RedHat Linux 7.3 2.96-112, ROOT Version 3.04/02.
Thanks.
Best regards,
Luis
This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:08 MET