Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches

Manages histogram axis attributes.

They are:

Definition at line 18 of file TAttAxis.h.

Public Member Functions

 TAttAxis ()
 
virtual ~TAttAxis ()
 Destructor.
 
void Copy (TAttAxis &attaxis) const
 Copy of the object.
 
virtual Color_t GetAxisColor () const
 
virtual Color_t GetLabelColor () const
 
virtual Style_t GetLabelFont () const
 
virtual Float_t GetLabelOffset () const
 
virtual Float_t GetLabelSize () const
 
virtual Int_t GetMaxDigits () const
 
virtual Int_t GetNdivisions () const
 
virtual Float_t GetTickLength () const
 
virtual Color_t GetTitleColor () const
 
virtual Style_t GetTitleFont () const
 
virtual Float_t GetTitleOffset () const
 
virtual Float_t GetTitleSize () const
 
virtual TClassIsA () const
 
virtual void ResetAttAxis (Option_t *option="")
 Reset axis attributes.
 
virtual void SaveAttributes (std::ostream &out, const char *name, const char *subname)
 Save axis attributes as C++ statement(s) on output stream out.
 
virtual void SetAxisColor (Color_t color=1, Float_t alpha=1.)
 Set color of the line axis and tick marks.
 
virtual void SetLabelColor (Color_t color=1, Float_t alpha=1.)
 Set color of labels.
 
virtual void SetLabelFont (Style_t font=62)
 Set labels' font.
 
virtual void SetLabelOffset (Float_t offset=0.005)
 Set distance between the axis and the labels.
 
virtual void SetLabelSize (Float_t size=0.04)
 Set size of axis labels.
 
virtual void SetMaxDigits (Int_t maxDigits=5)
 This function sets the maximum number of digits permitted for the axis labels above which the notation with 10^N is used.
 
virtual void SetNdivisions (Int_t n1, Int_t n2, Int_t n3, Bool_t optim=kTRUE)
 Set the number of divisions for this axis using one int per division level.
 
virtual void SetNdivisions (Int_t n=510, Bool_t optim=kTRUE)
 Set the number of divisions for this axis.
 
virtual void SetTickLength (Float_t length=0.03)
 Set tick mark length.
 
virtual void SetTickSize (Float_t size=0.03)
 
virtual void SetTitleColor (Color_t color=1)
 Set color of axis title.
 
virtual void SetTitleFont (Style_t font=62)
 Set the title font.
 
virtual void SetTitleOffset (Float_t offset=1)
 Set distance between the axis and the axis title.
 
virtual void SetTitleSize (Float_t size=0.04)
 Set size of axis title.
 
virtual void Streamer (TBuffer &)
 Stream an object of class TAttAxis.
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 

Static Public Member Functions

static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 

Protected Attributes

Color_t fAxisColor
 Color of the line axis.
 
Color_t fLabelColor
 Color of labels.
 
Style_t fLabelFont
 Font for labels.
 
Float_t fLabelOffset
 Offset of labels.
 
Float_t fLabelSize
 Size of labels.
 
Int_t fNdivisions
 Number of divisions(10000*n3 + 100*n2 + n1)
 
Float_t fTickLength
 Length of tick marks.
 
Color_t fTitleColor
 Color of axis title.
 
Style_t fTitleFont
 Font for axis title.
 
Float_t fTitleOffset
 Offset of axis title.
 
Float_t fTitleSize
 Size of axis title.
 

#include <TAttAxis.h>

Inheritance diagram for TAttAxis:
[legend]

Constructor & Destructor Documentation

◆ TAttAxis()

TAttAxis::TAttAxis ( )

Definition at line 45 of file TAttAxis.cxx.

◆ ~TAttAxis()

TAttAxis::~TAttAxis ( )
virtual

Destructor.

Definition at line 54 of file TAttAxis.cxx.

Member Function Documentation

◆ Class()

static TClass * TAttAxis::Class ( )
static
Returns
TClass describing this class

◆ Class_Name()

static const char * TAttAxis::Class_Name ( )
static
Returns
Name of this class

◆ Class_Version()

static constexpr Version_t TAttAxis::Class_Version ( )
inlinestaticconstexpr
Returns
Version of this class

Definition at line 65 of file TAttAxis.h.

◆ Copy()

void TAttAxis::Copy ( TAttAxis attaxis) const

Copy of the object.

Definition at line 61 of file TAttAxis.cxx.

◆ DeclFileName()

static const char * TAttAxis::DeclFileName ( )
inlinestatic
Returns
Name of the file containing the class declaration

Definition at line 65 of file TAttAxis.h.

◆ GetAxisColor()

virtual Color_t TAttAxis::GetAxisColor ( ) const
inlinevirtual

Definition at line 37 of file TAttAxis.h.

◆ GetLabelColor()

virtual Color_t TAttAxis::GetLabelColor ( ) const
inlinevirtual

Definition at line 38 of file TAttAxis.h.

◆ GetLabelFont()

virtual Style_t TAttAxis::GetLabelFont ( ) const
inlinevirtual

Definition at line 39 of file TAttAxis.h.

◆ GetLabelOffset()

virtual Float_t TAttAxis::GetLabelOffset ( ) const
inlinevirtual

Definition at line 40 of file TAttAxis.h.

◆ GetLabelSize()

virtual Float_t TAttAxis::GetLabelSize ( ) const
inlinevirtual

Definition at line 41 of file TAttAxis.h.

◆ GetMaxDigits()

virtual Int_t TAttAxis::GetMaxDigits ( ) const
inlinevirtual

Definition at line 42 of file TAttAxis.h.

◆ GetNdivisions()

virtual Int_t TAttAxis::GetNdivisions ( ) const
inlinevirtual

Definition at line 36 of file TAttAxis.h.

◆ GetTickLength()

virtual Float_t TAttAxis::GetTickLength ( ) const
inlinevirtual

Definition at line 45 of file TAttAxis.h.

◆ GetTitleColor()

virtual Color_t TAttAxis::GetTitleColor ( ) const
inlinevirtual

Definition at line 46 of file TAttAxis.h.

◆ GetTitleFont()

virtual Style_t TAttAxis::GetTitleFont ( ) const
inlinevirtual

Definition at line 47 of file TAttAxis.h.

◆ GetTitleOffset()

virtual Float_t TAttAxis::GetTitleOffset ( ) const
inlinevirtual

Definition at line 43 of file TAttAxis.h.

◆ GetTitleSize()

virtual Float_t TAttAxis::GetTitleSize ( ) const
inlinevirtual

Definition at line 44 of file TAttAxis.h.

◆ IsA()

virtual TClass * TAttAxis::IsA ( ) const
inlinevirtual
Returns
TClass describing current object

Reimplemented in TEveProjectionAxes, and TAxis.

Definition at line 65 of file TAttAxis.h.

◆ ResetAttAxis()

void TAttAxis::ResetAttAxis ( Option_t option = "")
virtual

Reset axis attributes.

Definition at line 79 of file TAttAxis.cxx.

◆ SaveAttributes()

void TAttAxis::SaveAttributes ( std::ostream &  out,
const char *  name,
const char *  subname 
)
virtual

Save axis attributes as C++ statement(s) on output stream out.

Reimplemented in TAxis.

Definition at line 111 of file TAttAxis.cxx.

◆ SetAxisColor()

void TAttAxis::SetAxisColor ( Color_t  color = 1,
Float_t  alpha = 1. 
)
virtual

Set color of the line axis and tick marks.

Definition at line 160 of file TAttAxis.cxx.

◆ SetLabelColor()

void TAttAxis::SetLabelColor ( Color_t  color = 1,
Float_t  alpha = 1. 
)
virtual

Set color of labels.

Definition at line 170 of file TAttAxis.cxx.

◆ SetLabelFont()

void TAttAxis::SetLabelFont ( Style_t  font = 62)
virtual

Set labels' font.

Definition at line 180 of file TAttAxis.cxx.

◆ SetLabelOffset()

void TAttAxis::SetLabelOffset ( Float_t  offset = 0.005)
virtual

Set distance between the axis and the labels.

The distance is expressed in per cent of the pad width. A negative value allow to draw the label on the other side of the axis.

Definition at line 191 of file TAttAxis.cxx.

◆ SetLabelSize()

void TAttAxis::SetLabelSize ( Float_t  size = 0.04)
virtual

Set size of axis labels.

The size is expressed in per cent of the pad size, unless the font precision is 3 and in that case the size is expressed in pixels.

Definition at line 203 of file TAttAxis.cxx.

◆ SetMaxDigits()

void TAttAxis::SetMaxDigits ( Int_t  maxDigits = 5)
virtual

This function sets 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 the X axis of the histogram h call:

h->GetXaxis()->SetMaxDigits(6);
#define h(i)
Definition RSha256.hxx:106

The default value is 5.

The default value for all axis can be set with the static function TGaxis::SetMaxDigits.

Definition at line 268 of file TAttAxis.cxx.

◆ SetNdivisions() [1/2]

void TAttAxis::SetNdivisions ( Int_t  n1,
Int_t  n2,
Int_t  n3,
Bool_t  optim = kTRUE 
)
virtual

Set the number of divisions for this axis using one int per division level.

Definition at line 247 of file TAttAxis.cxx.

◆ SetNdivisions() [2/2]

void TAttAxis::SetNdivisions ( Int_t  n = 510,
Bool_t  optim = kTRUE 
)
virtual

Set the number of divisions for this axis.

  • if optim = kTRUE (default), the number of divisions will be optimized around the specified value.
  • if optim = kFALSE, or n < 0, the axis will be forced to use exactly n divisions.
    n = n1 + 100*n2 + 10000*n3
    const Int_t n
    Definition legend1.C:16
    Where n1 is the number of primary divisions, n2 is the number of second order divisions and n3 is the number of third order divisions.

If the number of divisions is "optimized" (see above) n1, n2, n3 are maximum values.

Examples:

  • ndiv = 0: no tick marks.
  • ndiv = 2: 2 divisions, one tick mark in the middle of the axis.
  • ndiv = 510: 10 primary divisions, 5 secondary divisions.
  • ndiv = -10: exactly 10 primary divisions.

Definition at line 233 of file TAttAxis.cxx.

◆ SetTickLength()

void TAttAxis::SetTickLength ( Float_t  length = 0.03)
virtual

Set tick mark length.

The length is expressed in per cent of the pad width.

Definition at line 284 of file TAttAxis.cxx.

◆ SetTickSize()

virtual void TAttAxis::SetTickSize ( Float_t  size = 0.03)
inlinevirtual

Definition at line 59 of file TAttAxis.h.

◆ SetTitleColor()

void TAttAxis::SetTitleColor ( Color_t  color = 1)
virtual

Set color of axis title.

Definition at line 318 of file TAttAxis.cxx.

◆ SetTitleFont()

void TAttAxis::SetTitleFont ( Style_t  font = 62)
virtual

Set the title font.

Definition at line 327 of file TAttAxis.cxx.

◆ SetTitleOffset()

void TAttAxis::SetTitleOffset ( Float_t  offset = 1)
virtual

Set distance between the axis and the axis title.

Offset is a correction factor with respect to the "standard" value.

  • offset = 1 uses standard position that is computed in function of the label offset and size.
  • offset = 1.2 will add 20 per cent more to the standard offset.
  • offset = 0 automatic placement for the Y axis title (default).

Definition at line 298 of file TAttAxis.cxx.

◆ SetTitleSize()

void TAttAxis::SetTitleSize ( Float_t  size = 0.04)
virtual

Set size of axis title.

The size is expressed in per cent of the pad size, unless the font precision is 3 and in that case the size is expressed in pixels.

Definition at line 309 of file TAttAxis.cxx.

◆ Streamer()

void TAttAxis::Streamer ( TBuffer R__b)
virtual

Stream an object of class TAttAxis.

Reimplemented in TEveProjectionAxes, and TAxis.

Definition at line 336 of file TAttAxis.cxx.

◆ StreamerNVirtual()

void TAttAxis::StreamerNVirtual ( TBuffer ClassDef_StreamerNVirtual_b)
inline

Definition at line 65 of file TAttAxis.h.

Member Data Documentation

◆ fAxisColor

Color_t TAttAxis::fAxisColor
protected

Color of the line axis.

Definition at line 21 of file TAttAxis.h.

◆ fLabelColor

Color_t TAttAxis::fLabelColor
protected

Color of labels.

Definition at line 22 of file TAttAxis.h.

◆ fLabelFont

Style_t TAttAxis::fLabelFont
protected

Font for labels.

Definition at line 23 of file TAttAxis.h.

◆ fLabelOffset

Float_t TAttAxis::fLabelOffset
protected

Offset of labels.

Definition at line 24 of file TAttAxis.h.

◆ fLabelSize

Float_t TAttAxis::fLabelSize
protected

Size of labels.

Definition at line 25 of file TAttAxis.h.

◆ fNdivisions

Int_t TAttAxis::fNdivisions
protected

Number of divisions(10000*n3 + 100*n2 + n1)

Definition at line 20 of file TAttAxis.h.

◆ fTickLength

Float_t TAttAxis::fTickLength
protected

Length of tick marks.

Definition at line 26 of file TAttAxis.h.

◆ fTitleColor

Color_t TAttAxis::fTitleColor
protected

Color of axis title.

Definition at line 29 of file TAttAxis.h.

◆ fTitleFont

Style_t TAttAxis::fTitleFont
protected

Font for axis title.

Definition at line 30 of file TAttAxis.h.

◆ fTitleOffset

Float_t TAttAxis::fTitleOffset
protected

Offset of axis title.

Definition at line 27 of file TAttAxis.h.

◆ fTitleSize

Float_t TAttAxis::fTitleSize
protected

Size of axis title.

Definition at line 28 of file TAttAxis.h.

Libraries for TAttAxis:

The documentation for this class was generated from the following files: