Hi Henrique, TGaxis::SetMaxDigits is doing something different. See comments in this function. I have added a new function in TStyle::SetStripDecimals(Bool_t strip=kTRUE) This function can be used to set an option that is used by TGaxis::PaintAxis. Here are the comments I added to this new function: // Set option to strip decimals when drawing axis labels. // By default, TGaxis::PaintAxis removes trailing 0s after a dot // in the axis labels. Ex: {0,0.5,1,1.5,2,2.5, etc} // If this function is called with strip=kFALSE, TGAxis::PaintAxis will // draw labels with the same number of digits after the dot // Ex: (0.0,0.5,1.0,1.5,2.0,2.5,etc} This new function is now in the CVS source. Rene Brun Henrique de M. J. Barbosa - mestrado wrote: > > > > > In version 3.02, I added two new functions > > - TAxis::SetNoExponent (also in the TAxis context menu) > > with which you can enable/disable the 10^N notation > > > > -TGAxis::SetMaxDigits. This is a static function that you can call > > to specify the maximum number of digits in labels before switching > > to the 10^N notation (global setting). > > > > Hi Rene, > > I know these functions you mention but my problem is that I would like to > have all tick labels with the same number of digits (better layout :) So I > would like to use TGAxis::SetMaxDigits but unfortunately TGraph creates a > TAxis and not a TGAxis object. > > In fact I found two ways to have access to the axis created during > TGraph::Draw > > TGraph::GetYaxis() > TGraph::GetHistogram()->GetYaxis() > > ... and both methods return a TAxis object. Is there any other way of > doing this? > > thanks > henrique > **************************************** > Henrique Barbosa The Pierre Auger > PhD Student Observatory > > State University at Campinas - BRASIL > "Gleb Wathagin" Physics Institute > Department of Cosmic Rays and Chronology > ****************************************
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:51:12 MET