RE: TAxis label

From: Olivier Couet <Olivier.Couet_at_cern.ch>
Date: Wed, 18 Mar 2009 18:13:02 +0100


Hello,

SetBinLabel is not meant to produce integer labels. It allows to define alphanumeric labels.
But if that is what you want, it should also work for Graphs. You access it using: ...>GetXaxis()->SetBinLabel GetXaxis is also available for graphs.
If you have a problem, send a small example showing what you are doing and I'll try to modify it to make it work.

Olivier

-----Original Message-----
From: owner-roottalk_at_root.cern.ch [mailto:owner-roottalk_at_root.cern.ch] On Behalf Of Pietro Cavalleri
Sent: Wednesday, March 18, 2009 5:59 PM
To: roottalk_at_lxbuild091.cern.ch
Subject: [ROOT] TAxis label

Hello,
i have a very naive question.
I have a TGraphErrors and i would like to have, as labels on its x axis, only integer numbers.
I know that for a TH1 one can use the method SetBinLabel(nbin,"label") but for a TGraph it doesn't work.
Is there a way to do that?

Thanks in advance

Pietro Received on Wed Mar 18 2009 - 18:13:05 CET

This archive was generated by hypermail 2.2.0 : Wed Mar 18 2009 - 23:50:01 CET