Re: [ROOT] problem in Y axis description

From: Jacek M. Holeczek (holeczek@us.edu.pl)
Date: Fri Apr 19 2002 - 20:27:23 MEST


Hi,

> It is a pity that you cannot send a real example.
The problem is so obvious ...
But if you insist on a "real example" ... you can have it :
	{
	Float_t x[3] = {1,2};
	Float_t y1[3] = {0.00001,0.00002};
	TGraph *g1 = new TGraph(2, x, y1);
	TMultiGraph *mg = new TMultiGraph("MM","MyMulti Pad");
	mg->Add(g1);
	TCanvas *cE = new TCanvas("cE", "cE");
	TPad *padE1 = new TPad("padE1", "padE1", 0.0, 0.75, 0.5, 1.0);
	padE1->SetGrid(); padE1->Draw();
	cE->Update();
	padE1->cd(); cE->Modified(); cE->Update();
	mg->DrawClone("A");
	cE->SaveAs("cE.ps")
	}

Then "gv cE.ps" (I use ROOT 3.02/07 on a RH6.2/i386 with egcs-1.1.2).
I attached also my "output" ... "cE.Top.Left.gif".

> Anyhow, there are many recipees to circumvent this possible problem
>  - change the axis label size
>  - Call TAxis::setNoExponent
>  - call pad->SetTopMargin
>  - gStyle->SetTitleX(0.15);  //move title to the right

For me the simples solution was :
	gStyle->SetTitleBorderSize(1);

I vote for solving this problem in a way that by "default" it will never
appear (for example, make the "default" TitleBorderSize = 1), so that a
casual user does not get this problem at all.

Best regards,
Jacek.



cE.Top.Left.gif



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