I would like to move the graph title box from the left to the right pad corner, is it possible?
Moreover (see the attached image), I would like the y-axis of the bottom graph use scientific notation. is it possible? I’m not using the SetNoExponent option, nevertheless it doesn’t use the scientific notation…
[quote]I would like to move the graph title box from the left to the right pad corner, is it possible?
[/quote]
Use for example
gStyle->SetTitleX,Y,W,H
[quote]Moreover (see the attached image), I would like the y-axis of the bottom graph use scientific notation. is it possible? I’m not using the SetNoExponent option, nevertheless it doesn’t use the scientific notation…
[/quote]
In this particular example you can force scientific notation by calling:
TGaxis::SetMaxDigits(4);
before drawing your object.
One question more:
I would like to add a PaveText on the right side of each pad, where writing the input file name (contained in the “name” string).
I use the following code:
...
c->cd(3);
//add a PaveText
TPaveText *pt1=new TPaveText (0.9,0,1,1,"NDC");
//NDC: normalized coordinates (x1,y1,x2,y2)
pt1->SetBorderSize(0);
pt1->SetFillColor(33);
TText *t1=pt1->AddText(name.c_str());
t1->SetTextColor(1);
t1->SetTextAngle(90);//angle in degree
t1->SetTextSize(0.04);
t1->SetTextFont(42);
t1->SetTextAlign(12);//=H and V centred
pt1->Draw();
...
I would like to center the “t1” text in the “pt1” pave, but I cannot succeed (see attached pictures)!
I don’t understand what it aligns the text with respect to.
is it possible?
@brun
Sorry for interupping the discussion…
is there any way to do the gStyle->SetTitleX,Y,W,H setting per graph (and not globally), for example for a plot with TH1 ?