List Info

Thread: axis labels




axis labels
user name
2006-08-29 09:44:44
Dear all

could anybody help with the following issue.
I would like to put labels on the given bins of a histogram.
The code look like this.

TString label;
label += 99;
bin = histo->GetXaxis()->FindBin(99);
histo->GetXaxis()->SetBinLabel(bin, label);
histo->Draw();

after this lines the label is correct, but the label size is
smaller 
than the default label size, the tick marks are not drown.

I tried

histo->GetXaxis()->ImportAttributes(histo->GetYaxis
());

but it does not work. Any idea ?

I am using ROOT 5.12 under SLC3.

Thanks in advance,
Margar





axis labels
user name
2006-08-29 10:07:44
Hi,

Can you send a small running example showing the problem ?

Cheers,  Olivier Couet 

-----Original Message-----
From: owner-roottalkpcroot.cern.ch
[mailto:owner-roottalkpcroot.cern.ch] On Behalf Of Margar
Simonyan
Sent: Tuesday, August 29, 2006 11:45 AM
To: roottalk (Mailing list discussing all aspects of the
ROOT system)
Subject: [ROOT] axis labels

Dear all

could anybody help with the following issue.
I would like to put labels on the given bins of a histogram.
The code look like this.

TString label;
label += 99;
bin = histo->GetXaxis()->FindBin(99);
histo->GetXaxis()->SetBinLabel(bin, label); Draw();

after this lines the label is correct, but the label size is
smaller
than the default label size, the tick marks are not drown.

I tried

histo->GetXaxis()->ImportAttributes(histo->GetYaxis
());

but it does not work. Any idea ?

I am using ROOT 5.12 under SLC3.

Thanks in advance,
Margar






[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )