library: libGraf
#include "TGaxis.h"

TGaxis


class description - header file - source file
viewCVS header - viewCVS source

class TGaxis: public TLine, public TAttText

Inheritance Inherited Members Includes Libraries
Class Charts

Function Members (Methods)

Display options:
Show inherited
Show non-public
public:
TGaxis()
TGaxis(Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax, const char* funcname, Int_t ndiv = 510, Option_t* chopt = "", Double_t gridlength = 0)
TGaxis(Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax, Double_t wmin, Double_t wmax, Int_t ndiv = 510, Option_t* chopt = "", Double_t gridlength = 0)
virtual~TGaxis()
voidTObject::AbstractMethod(const char* method) const
virtual voidAdjustBinSize(Double_t A1, Double_t A2, Int_t nold, Double_t& BinLow, Double_t& BinHigh, Int_t& nbins, Double_t& BinWidth)
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
virtual voidCenterLabels(Bool_t center = kTRUE)
virtual voidCenterTitle(Bool_t center = kTRUE)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tTObject::Compare(const TObject* obj) const
virtual voidTLine::Copy(TObject& line) const
virtual voidTObject::Delete(Option_t* option = "")
Int_tTAttLine::DistancetoLine(Int_t px, Int_t py, Double_t xp1, Double_t yp1, Double_t xp2, Double_t yp2)
virtual Int_tTLine::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidDrawAxis(Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax, Double_t wmin, Double_t wmax, Int_t ndiv = 510, Option_t* chopt = "", Double_t gridlength = 0)
virtual voidTObject::DrawClass() const
virtual TObject*TObject::DrawClone(Option_t* option = "") const
virtual TLine*TLine::DrawLine(Double_t x1, Double_t y1, Double_t x2, Double_t y2)
virtual TLine*TLine::DrawLineNDC(Double_t x1, Double_t y1, Double_t x2, Double_t y2)
virtual voidTObject::Dump() const
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTLine::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
TF1*GetFunction() const
Float_tGetGridLength() const
virtual const char*TObject::GetIconName() const
Int_tGetLabelColor() const
Int_tGetLabelFont() const
Float_tGetLabelOffset() const
Float_tGetLabelSize() const
virtual Color_tTAttLine::GetLineColor() const
virtual Style_tTAttLine::GetLineStyle() const
virtual Width_tTAttLine::GetLineWidth() const
static Int_tGetMaxDigits()
virtual const char*GetName() const
Int_tGetNdiv() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual const char*GetOption() const
virtual Short_tTAttText::GetTextAlign() const
virtual Float_tTAttText::GetTextAngle() const
virtual Color_tTAttText::GetTextColor() const
virtual Font_tTAttText::GetTextFont() const
virtual Float_tTAttText::GetTextSize() const
Float_tGetTickSize() const
virtual const char*GetTitle() const
Float_tGetTitleOffset() const
Float_tGetTitleSize() const
virtual UInt_tTObject::GetUniqueID() const
Double_tGetWmax() const
Double_tGetWmin() const
Double_tTLine::GetX1() const
Double_tTLine::GetX2() const
Double_tTLine::GetY1() const
Double_tTLine::GetY2() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() const
virtual voidImportAxisAttributes(TAxis* axis)
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() const
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTLine::IsHorizontal()
Bool_tTObject::IsOnHeap() const
virtual Bool_tTObject::IsSortable() const
Bool_tTLine::IsVertical()
Bool_tTObject::IsZombie() const
voidLabelsLimits(const char* label, Int_t& first, Int_t& last)
virtual voidTLine::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual voidTAttLine::Modify()
virtual Bool_tTObject::Notify()
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
virtual voidPaint(Option_t* chopt = "")
virtual voidPaintAxis(Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax, Double_t& wmin, Double_t& wmax, Int_t& ndiv, Option_t* chopt = "", Double_t gridlength = 0, Bool_t drawGridOnly = kFALSE)
virtual voidTLine::PaintLine(Double_t x1, Double_t y1, Double_t x2, Double_t y2)
virtual voidTLine::PaintLineNDC(Double_t u1, Double_t v1, Double_t u2, Double_t v2)
virtual voidTObject::Pop()
virtual voidTLine::Print(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
virtual voidTAttLine::ResetAttLine(Option_t* option = "")
virtual voidTAttText::ResetAttText(Option_t* toption = "")
voidTObject::ResetBit(UInt_t f)
virtual voidRotate(Double_t X, Double_t Y, Double_t CFI, Double_t SFI, Double_t XT, Double_t YT, Double_t& U, Double_t& V)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") const
virtual voidTAttLine::SaveLineAttributes(ostream& out, const char* name, Int_t coldef = 1, Int_t stydef = 1, Int_t widdef = 1)
virtual voidSavePrimitive(ostream& out, Option_t* option = "")
virtual voidTAttText::SaveTextAttributes(ostream& out, const char* name, Int_t alidef = 12, Float_t angdef = 0, Int_t coldef = 1, Int_t fondef = 61, Float_t sizdef = 1)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidSetDecimals(Bool_t dot = kTRUE)
virtual voidTObject::SetDrawOption(Option_t* option = "")
static voidTObject::SetDtorOnly(void* obj)
voidSetFunction(const char* funcname = "")
voidSetGridLength(Float_t gridlength)
voidTLine::SetHorizontal(Bool_t set = kTRUE)
voidSetLabelColor(Int_t labelcolor)
voidSetLabelFont(Int_t labelfont)
voidSetLabelOffset(Float_t labeloffset)
voidSetLabelSize(Float_t labelsize)
virtual voidTAttLine::SetLineAttributes()
virtual voidTAttLine::SetLineColor(Color_t lcolor)
virtual voidTAttLine::SetLineStyle(Style_t lstyle)
virtual voidTAttLine::SetLineWidth(Width_t lwidth)
static voidSetMaxDigits(Int_t maxd = 5)
virtual voidSetMoreLogLabels(Bool_t more = kTRUE)
virtual voidSetName(const char* name)
virtual voidSetNdivisions(Int_t ndiv)
virtual voidSetNoExponent(Bool_t noExponent = kTRUE)
static voidTObject::SetObjectStat(Bool_t stat)
voidSetOption(Option_t* option = "")
virtual voidTAttText::SetTextAlign(Short_t align = 11)
virtual voidTAttText::SetTextAngle(Float_t tangle = 0)
virtual voidTAttText::SetTextAttributes()
virtual voidTAttText::SetTextColor(Color_t tcolor = 1)
virtual voidTAttText::SetTextFont(Font_t tfont = 62)
virtual voidTAttText::SetTextSize(Float_t tsize = 1)
virtual voidTAttText::SetTextSizePixels(Int_t npixels)
voidSetTickSize(Float_t ticksize)
voidSetTimeFormat(const char* tformat)
voidSetTimeOffset(Double_t toffset, Option_t* option = "local")
virtual voidSetTitle(const char* title = "")
voidSetTitleColor(Int_t titlecolor)
voidSetTitleFont(Int_t titlefont)
voidSetTitleOffset(Float_t titleoffset = 1)
voidSetTitleSize(Float_t titlesize)
virtual voidTObject::SetUniqueID(UInt_t uid)
voidTLine::SetVertical(Bool_t set = kTRUE)
voidSetWmax(Double_t wmax)
voidSetWmin(Double_t wmin)
virtual voidTLine::SetX1(Double_t x1)
virtual voidTLine::SetX2(Double_t x2)
virtual voidTLine::SetY1(Double_t y1)
virtual voidTLine::SetY2(Double_t y2)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = "0", Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = "0", Int_t option = 0, Int_t bufsize = 0) const
protected:
TGaxis(const TGaxis&)
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()
TGaxis&operator=(const TGaxis&)

Data Members

public:
enum TLine::[unnamed] { kLineNDC
kVertical
kHorizontal
};
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
protected:
Double_tfWminLowest value on the axis
Double_tfWmaxHighest value on the axis
Float_tfGridLengthLength of the grid in NDC
Float_tfTickSizeSize of primary tick mark in NDC
Float_tfLabelOffsetOffset of label wrt axis
Float_tfLabelSizeSize of labels in NDC
Float_tfTitleOffsetOffset of title wrt axis
Float_tfTitleSizeSize of title in NDC
Int_tfNdivNumber of divisions
Int_tfLabelColorColor for labels
Int_tfLabelFontFont for labels
TStringfChoptAxis options
TStringfNameaxis name
TStringfTitleaxis title
TStringfTimeFormatTime format, ex: 09/12/99 12:34:00
TStringfFunctionNamename of mapping function pointed by fFunction
TF1*fFunction!Pointer to function computing axis values
TAxis*fAxis!pointer to original TAxis axis (if any)
static Int_tfgMaxDigits!Number of digits above which the 10>N notation is used
Double_tTLine::fX1X of 1st point
Double_tTLine::fY1Y of 1st point
Double_tTLine::fX2X of 2nd point
Double_tTLine::fY2Y of 2nd point
Color_tTAttLine::fLineColorline color
Style_tTAttLine::fLineStyleline style
Width_tTAttLine::fLineWidthline width
Float_tTAttText::fTextAngleText angle
Float_tTAttText::fTextSizeText size
Short_tTAttText::fTextAlignText alignment
Color_tTAttText::fTextColorText color index
Font_tTAttText::fTextFontText font number

Class Description


 Service class for the graphical representation of axis.
 Instances of this class are generated by the histogram classes and TGraph.

 The picture below has been generated by the following macro.
{

  gROOT.Reset();

  c1 = new TCanvas("c1","Examples of Gaxis",10,10,700,500);

  c1->Range(-10,-1,10,1);

  TGaxis *axis1 = new TGaxis(-4.5,-0.2,5.5,-0.2,-6,8,510,"");
  axis1->SetName("axis1");
  axis1->Draw();

  TGaxis *axis2 = new TGaxis(-4.5,0.2,5.5,0.2,0.001,10000,510,"G");
  axis2->SetName("axis2");
  axis2->Draw();

  TGaxis *axis3 = new TGaxis(-9,-0.8,-9,0.8,-8,8,50510,"");
  axis3->SetName("axis3");
  axis3->Draw();

  TGaxis *axis4 = new TGaxis(-7,-0.8,-7,0.8,1,10000,50510,"G");
  axis4->SetName("axis4");
  axis4->Draw();

  TGaxis *axis5 = new TGaxis(-4.5,-0.6,5.5,-0.6,1.2,1.32,80506,"-+");
  axis5->SetName("axis5");
  axis5->SetLabelSize(0.03);
  axis5->SetTextFont(72);
  axis5->SetLabelOffset(0.025);

  axis5->Draw();

  TGaxis *axis6 = new TGaxis(-4.5,0.6,5.5,0.6,100,900,50510,"-");
  axis6->SetName("axis6");
  axis6->Draw();

  TGaxis *axis7 = new TGaxis(8,-0.8,8,0.8,0,9000,50510,"+L");
  axis7->SetName("axis7");
  axis7->SetLabelOffset(0.01);
  axis7->Draw();

  //one can make axis going top->bottom. However because of a long standing
  //problem, the two x values should not be equal
  TGaxis *axis8 = new TGaxis(6.5,0.8,6.499,-0.8,0,90,50510,"-");
  axis8->SetName("axis8");
  axis8->Draw();
}
/* */


  See the second TGaxis constructor for examples of TGaxis
  with a mapping function.
TGaxis()
*-*-*-*-*-*-*-*-*-*-*Gaxis default constructor-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                  =========================
TGaxis(Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax, Double_t wmin, Double_t wmax, Int_t ndiv, Option_t *chopt, Double_t gridlength)
*-*-*-*-*-*-*-*-*-*-*Gaxis normal constructor-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                  =========================
  See explanation of parameters in PaintAxis

TGaxis(Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax, const char *funcname, Int_t ndiv, Option_t *chopt, Double_t gridlength)
*-*-*-*-*-*-*-*-*-*-*Gaxis constructor with a TF1 to map axis values-*-*-*
*-*                  ===============================================
  See explanation of parameters in PaintAxis
  Instead of the wmin,wmax arguments of the normal constructor, the
  name of a TF1 function can be specified. This function will be used
  by TGaxis::PaintAxis to map the user coordinates to the axis values
  and ticks.
  Examples:
void gaxis3a()
{
   gStyle->SetOptStat(0);

   TH2F *h2 = new TH2F("h","Axes",100,0,10,100,-2,2);
   h2->Draw();

   TF1 *f1=new TF1("f1","-x",-10,10);
   TGaxis *A1 = new TGaxis(0,2,10,2,"f1",510,"-");
   A1->SetTitle("axis with decreasing values");
   A1->Draw();

   TF1 *f2=new TF1("f2","exp(x)",0,2);
   TGaxis *A2 = new TGaxis(1,1,9,1,"f2");
   A2->SetTitle("exponential axis");
   A2->SetLabelSize(0.03);
   A2->SetTitleSize(0.03);
   A2->SetTitleOffset(1.2);
   A2->Draw();

   TF1 *f3=new TF1("f3","log10(x)",1,1000);
   TGaxis *A3 = new TGaxis(2,-2,2,0,"f3",505,"G");
   A3->SetTitle("logarithmic axis");
   A3->SetLabelSize(0.03);
   A3->SetTitleSize(0.03);
   A3->SetTitleOffset(1.2);
   A3->Draw();
}
/* */

TGaxis(const TGaxis& ax)
copy constructor
TGaxis& operator=(const TGaxis& ax)
assignement operator
~TGaxis()
*-*-*-*-*-*-*-*-*-*-*Gaxis default destructor-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                  =======================
void CenterLabels(Bool_t center)
   if center = kTRUE axis labels are centered in the center of the bin
   default is to center on the primary tick marks
   This option does not make sense if there are more bins than tick marks.
void CenterTitle(Bool_t center)
   if center = kTRUE axis title will be centered
   default is right adjusted
void DrawAxis(Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax, Double_t wmin, Double_t wmax, Int_t ndiv, Option_t *chopt, Double_t gridlength)
*-*-*-*-*-*-*-*-*-*-*Draw this axis with new attributes*-*-*-*-*-*-*-*-*-*
*-*                  ==================================
Int_t GetMaxDigits()
 static function returning fgMaxDigits (See SetMaxDigits)
void ImportAxisAttributes(TAxis *axis)
 Copy TAxis attributes to this TGaxis
void Paint(Option_t *)
*-*-*-*-*-*-*-*-*-*-*Draw this axis with its current attributes*-*-*-*-*-*-*
*-*                  ==========================================
void PaintAxis(Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax, Double_t &wmin, Double_t &wmax, Int_t &ndiv, Option_t *chopt, Double_t gridlength, Bool_t drawGridOnly)
*-*-*-*-*-*-*-*-*-*-*-*Control function to draw an axis*-*-*-*-*-*-*-*-*-*-*
*-*                    ================================

============> Original authors (O.Couet C.E.Vandoni N.Cremel-Somon)
              largely modified and converted to C++ class by Rene Brun

 _Input parameters:

  xmin      : X origin coordinate in WC space.
  xmax      : X end axis coordinate in WC space.
  ymin      : Y origin coordinate in WC space.
  ymax      : Y end axis coordinate in WC space.
  wmin      : Lowest value for the tick mark
              labels written on the axis.
  wmax      : Highest value for the tick mark labels
              written on the axis.
  ndiv      : Number of divisions.

       ndiv=N1 + 100*N2 + 10000*N3
       N1=number of 1st divisions.
       N2=number of 2nd divisions.
       N3=number of 3rd divisions.
           e.g.:
           nndi=0 --> no tick marks.
           nndi=2 --> 2 divisions, one tick mark in the middle
                      of the axis.

  chopt :  options (see below).

       chopt='G': loGarithmic scale, default is linear.
       chopt='B': Blank axis. Useful to superpose axis.

 Orientation of tick marks on axis.
 ----------------------------------

   Tick marks are normally drawn on the positive side of the axis,
   however, if x0=x1, then negative.

       chopt='+': tick marks are drawn on Positive side. (default)
       chopt='-': tick mark are drawn on the negative side.
       i.e: '+-' --> tick marks are drawn on both sides of the axis.
       chopt='U': Unlabeled axis, default is labeled.

 Size of tick marks
 ------------------
 By default, tick marks have a length equal to 3 per cent of the
 axis length.
 When the option "S" is specified, the length of the tick marks
 is equal to fTickSize*axis_length, where fTickSize may be set
 via TGaxis::SetTickSize.

 Position of labels on axis.
 ---------------------------

   Labels are normally drawn on side opposite to tick marks.
   However:

       chopt='=': on Equal side

 Orientation of labels on axis.
 ------------------------------

   Labels are normally drawn parallel to the axis.
   However if x0=x1, then Orthogonal
           if y0=Y1, then Parallel

 Position of labels on tick marks.
 ---------------------------------

   Labels are centered on tick marks.
   However , if x0=x1, then they are right adjusted.

       chopt='R': labels are Right adjusted on tick mark.
                    (default is centered)
       chopt='L': labels are Left adjusted on tick mark.
       chopt='C': labels are Centered on tick mark.
       chopt='M': In the Middle of the divisions.

 Format of labels.
 -----------------

   Blank characters are stripped, and then the
   label is correctly aligned. the dot, if last
   character of the string, is also stripped,
   unless the option "." (a dot, or period) is specified.
   if SetDecimals(kTRUE) has been called (bit TAxis::kDecimals set).
   all labels have the same number of decimals after the "."
   The same is true if gStyle->SetStripDecimals(kFALSE) has been called.

   In the following, we have some parameters, like
   tick marks length and characters height (in percentage
   of the length of the axis (WC))
   The default values are as follows:

   Primary tick marks: 3.0 %
   Secondary tick marks: 1.5 %
   Third order tick marks: .75 %
   Characters height for labels: 4%

   Labels offset: 1.0 %

 optional grid.
 --------------

       chopt='W': cross-Wire
   In case of a log axis, the grid is only drawn for the primary tick marks
   if the number of secondary and tertiary divisions is 0.

 Axis bining optimization.
 -------------------------

   By default the axis bining is optimized .

       chopt='N': No bining optimization
       chopt='I': Integer labelling

 Maximum Number of Digits for the axis labels
 --------------------------------------------
 See the static function TGaxis::SetMaxDigits

 Time representation.
 --------------------

   Axis labels may be considered as times, plotted in a defined time format.
   The format is set with SetTimeFormat().
   wmin and wmax are considered as two time values in seconds.
   The time axis will be spread around the time offset value (set with
   SetTimeOffset() ). Actually it will go from TimeOffset+wmin to
   TimeOffset+wmax.
   see examples in tutorials timeonaxis.C and timeonaxis2.C

       chopt='t': Plot times with a defined format instead of values

void AdjustBinSize(Double_t A1, Double_t A2, Int_t nold ,Double_t &binLow, Double_t &binHigh, Int_t &nbins, Double_t &binWidth)
*-*-*-*-*-*-*-*-*-*-*-*Axis labels optimisation*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                    ========================

   This routine adjusts the bining of the axis
   in order to have integer values for the labels

 _Input parameters:

  A1,A2    : Old WMIN,WMAX .
  binLow,binHigh : New WMIN,WMAX .
  nold     : Old NDIV (primary divisions)
  nbins    : New NDIV .

void LabelsLimits(const char *label, Int_t &first, Int_t &last)
*-*-*-*-*-*-*-*-*Find first and last character of a label*-*-*-*-*-*-*-*-*-*
*-*              ========================================
void Rotate(Double_t X, Double_t Y, Double_t CFI, Double_t SFI ,Double_t XT, Double_t YT, Double_t &U, Double_t &V)
*-*-*-*-*-*-*-*-*-*-*-*-*-*Rotate axis coordinates*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                        =======================
void SavePrimitive(ostream &out, Option_t * /*= ""*/)
 Save primitive as a C++ statement(s) on output stream out
void SetDecimals(Bool_t dot)
 Set the Decimals flag
 By default, blank characters are stripped, and then the
 label is correctly aligned. The dot, if last character of the string,
 is also stripped, unless this option is specified.
 One can disable the option by calling axis.SetDecimals(kTRUE).
 Note the bit is set in fBits (as opposed to fBits2 in TAxis!)
void SetFunction(const char *funcname)
        specify a function to map the axis values
        =========================================
void SetMaxDigits(Int_t maxd)
 static function to set fgMaxDigits for axis with the bin content
 (y axis for 1-d histogram, z axis for 2-d histogram)
fgMaxDigits is the maximum number of digits permitted for the axis
labels above which the notation with 10^N is used.
For example, to accept 6 digits number like 900000 on an axis
call TGaxis::SetMaxDigits(6). The default value is 5.
fgMaxDigits must be greater than 0.
void SetName(const char *name)
*-*-*-*-*-*-*-*-*-*-*Change the name of the axis*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                  ============================
void SetMoreLogLabels(Bool_t more)
 Set the kMoreLogLabels bit flag
 When this option is selected more labels are drawn when in log scale
 and there is a small number of decades  (<3).
 Note that this option is automatically inherited from TAxis
void SetNoExponent(Bool_t noExponent)
 Set the NoExponent flag
 By default, an exponent of the form 10^N is used when the label values
 are either all very small or very large.
 One can disable the exponent by calling axis.SetNoExponent(kTRUE).
void SetOption(Option_t *option)
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*To set axis options*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                          ===================
void SetTitle(const char *title)
*-*-*-*-*-*-*-*-*-*-*Change the title of the axis*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                  ============================
void SetTimeFormat(const char *tformat)
*-*-*-*-*-*-*-*-*-*-*Change the format used for time plotting *-*-*-*-*-*-*-*
*-*                  ========================================
  The format string for date and time use the same options as the one used
  in the standard strftime C function, i.e. :
    for date :
      %a abbreviated weekday name
      %b abbreviated month name
      %d day of the month (01-31)
      %m month (01-12)
      %y year without century

    for time :
      %H hour (24-hour clock)
      %I hour (12-hour clock)
      %p local equivalent of AM or PM
      %M minute (00-59)
      %S seconds (00-61)
      %% %

void SetTimeOffset(Double_t toffset, Option_t *option)
 Change the time offset
 If option = "gmt" the time offset is treated as a GMT time.
void Streamer(TBuffer &R__b)
 Stream an object of class TGaxis.
Float_t GetGridLength()
{return fGridLength;}
TF1 * GetFunction()
{return fFunction;}
Int_t GetLabelColor()
{return fLabelColor;}
Int_t GetLabelFont()
{return fLabelFont;}
Float_t GetLabelOffset()
{return fLabelOffset;}
Float_t GetLabelSize()
{return fLabelSize;}
Float_t GetTitleOffset()
{return fTitleOffset;}
Float_t GetTitleSize()
{return fTitleSize;}
const char * GetName()
{return fName.Data();}
const char * GetOption()
{return fChopt.Data();}
const char * GetTitle()
{return fTitle.Data();}
Int_t GetNdiv()
{return fNdiv;}
Double_t GetWmin()
{return fWmin;}
Double_t GetWmax()
{return fWmax;}
Float_t GetTickSize()
{return fTickSize;}
void SetLabelColor(Int_t labelcolor)
{fLabelColor = labelcolor;}
void SetLabelFont(Int_t labelfont)
{fLabelFont = labelfont;}
void SetLabelOffset(Float_t labeloffset)
{fLabelOffset = labeloffset;}
void SetLabelSize(Float_t labelsize)
{fLabelSize = labelsize;}
void SetNdivisions(Int_t ndiv)
{fNdiv = ndiv;}
void SetTickSize(Float_t ticksize)
{fTickSize = ticksize;}
void SetGridLength(Float_t gridlength)
{fGridLength = gridlength;}
void SetTitleOffset(Float_t titleoffset=1)
{fTitleOffset = titleoffset;}
void SetTitleSize(Float_t titlesize)
{fTitleSize = titlesize;}
void SetTitleFont(Int_t titlefont)
{SetTextFont(titlefont);}
void SetTitleColor(Int_t titlecolor)
{SetTextColor(titlecolor);}
void SetWmin(Double_t wmin)
{fWmin = wmin;}
void SetWmax(Double_t wmax)
{fWmax = wmax;}

Author: Rene Brun, Olivier Couet 12/12/94
Last update: root/graf:$Name: $:$Id: TGaxis.cxx,v 1.96 2006/12/07 10:08:35 couet Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *


ROOT page - Class index - Class Hierarchy - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.