[ROOT] problem with graph and axis titles

From: Mariusz Sapinski (Mariusz.Sapinski@gamum2.in2p3.fr)
Date: Wed Nov 26 2003 - 17:17:06 MET


 I got the following code (fragments):

-------------------------
1  TGraph * gr1 = new TGraph(nlayer, layer, E05_10);
2 
3  TCanvas * c1 = new TCanvas("c1","c1",10,10,400,400);
4  c1->DrawFrame(3.5,-32.8.,18,-32.2);
5 
6  gr1->Draw("P");   // or (AP)
7  c1->Update();
8  gr1->GetHistogram()->GetXaxis()->SetTitle("layer No"); 
9
10 c1->Modified();
-----------------

 Now the problem is that if i do not comment 8th line, the graph 
disappears just after being plotted. And anyway this line is not working 
with P option only (in line 6). But if i put AP option then two scales are 
plotted on Y axis (the one of graph and the one superimposed in line 4).

 How to do to have axis title, single scale on Y axis and a visible points 
of the graph?

-- 
Mariusz



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:17 MET