Dear all,
I am modifying the my histogram options.
I have been asked to make. to histogram with a wide of 8.5 cm and the font size inside the histogram (axis title and labels) around 2 mm.
but I can not figure out how to fix this. since the font size with root is something relative to the canvas size.
for instance I used
TCanvas *c1 = new TCanvas("c1","A Simple Graph Example",0,0,500,500);
and
h0->GetXaxis()->SetTitleSize(0.07);
How can I convert these relative numbers into absolute number?
so I can change the canvas width into 8.5 cm and the title size into 2 mm
But the size of the font stil relative to the canvas size.
Please, I want the final canvas size 8.5 cm and the font size 2 mm as fixed numbers
not relative to each other.
is there a way to do this??
and is the font size (15) equal to 15 pixel??
{
auto h0 = new TH1F("h0","h0",10,-10,10);
h0->GetXaxis()->SetTitle("Channel Number");
h0->GetXaxis()->SetLabelFont(43);
h0->GetXaxis()->SetLabelSize(30);
h0->Draw();
}
Grow and shrink the canvas. You will see that all the text on the calvas change size relatively to the canvas size except the X labels axis which are fixed to 30px.