Re: [ROOT] how to change the "title" of a pad

From: Jacek M. Holeczek (holeczek@us.edu.pl)
Date: Sun Feb 24 2002 - 15:37:50 MET


Hi,

(Well ... you asked for it :-)
The ROOT is 3.02/07 RH6.2/i386 with egcs-1.1.2.

> NO. The Latex characters are taken into account. Could you send me a
> short example where the pavetext is too wide?
Observe :
	Float_t x[3] = {1,2,3}
	Float_t y[3] = {10,20,30}
	TGraph *g1 = new TGraph(3,x,y)
	TGraph *g2 = new TGraph(3,x,y)
	g1->SetTitle("XabgdeY")
	g2->SetTitle("X#alpha#beta#gamma#delta#epsilonY")
	new TCanvas()
	g1->Draw("AL")
	new TCanvas()
	g2->Draw("AL")
See the "title" TPaveText in both canvases (and the fLongest data member).
Try the same with a TMultiGraph instead of TGraph (should be the same
problem).

> (...) MyGraph->GetXaxis() will return 0.
That would be very nice ...  however ...
Observe :
	Float_t x[3] = {1,2,3}
	Float_t y[3] = {10,20,30}
	TGraph *g1 = new TGraph(3,x,y)
	g1->Draw()
	g1->GetXaxis() //  *** Break *** segmentation violation
or :
	Float_t x[3] = {1,2,3}
	Float_t y1[3] = {10,20,30}
	Float_t y2[3] = {11,22,33}
	TGraph *g1 = new TGraph(3,x,y1)
	TGraph *g2 = new TGraph(3,x,y2)
	TMultiGraph *mg = new TMultiGraph("MMG", "My MultiGraph")
	mg->Add(g1)
	mg->Add(g2)
	mg->Draw()
	mg->GetXaxis() //  *** Break *** segmentation violation
	mg->Draw("L")
	mg->GetXaxis() //  *** Break *** segmentation violation
	g1->GetXaxis() //  *** Break *** segmentation violation
	mg->Draw("A")
	mg->GetXaxis() // NO segmentation fault any more
	g1->GetXaxis() //  *** Break *** segmentation violation
If you want to have more fun ... try the above sequence without these two
lines "mg->Add(...)" (leave the TMultiGraph mg "completely empty") ...

How about my problem that when I interactively zoom one of pads (x- or
y-axis), all the others are also affected. No simple way to make their
axises "independent" ?

Thanks in advance,
Best regards,
Jacek.



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:42 MET