Logo ROOT   6.14/05
Reference Guide
TAttAxis.h
Go to the documentation of this file.
1 // @(#)root/base:$Id$
2 // Author: Rene Brun 12/12/94
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TAttAxis
13 #define ROOT_TAttAxis
14 
15 #include "Rtypes.h"
16 
17 
18 class TAttAxis {
19 protected:
20  Int_t fNdivisions; ///< Number of divisions(10000*n3 + 100*n2 + n1)
21  Color_t fAxisColor; ///< Color of the line axis
22  Color_t fLabelColor; ///< Color of labels
23  Style_t fLabelFont; ///< Font for labels
24  Float_t fLabelOffset; ///< Offset of labels
25  Float_t fLabelSize; ///< Size of labels
26  Float_t fTickLength; ///< Length of tick marks
27  Float_t fTitleOffset; ///< Offset of axis title
28  Float_t fTitleSize; ///< Size of axis title
29  Color_t fTitleColor; ///< Color of axis title
30  Style_t fTitleFont; ///< Font for axis title
31 
32 public:
33  TAttAxis();
34  virtual ~TAttAxis();
35  void Copy(TAttAxis &attaxis) const;
36  virtual Int_t GetNdivisions() const {return fNdivisions;}
37  virtual Color_t GetAxisColor() const {return fAxisColor;}
38  virtual Color_t GetLabelColor() const {return fLabelColor;}
39  virtual Style_t GetLabelFont() const {return fLabelFont;}
40  virtual Float_t GetLabelOffset() const {return fLabelOffset;}
41  virtual Float_t GetLabelSize() const {return fLabelSize;}
42  virtual Float_t GetTitleOffset() const {return fTitleOffset;}
43  virtual Float_t GetTitleSize() const {return fTitleSize;}
44  virtual Float_t GetTickLength() const {return fTickLength;}
45  virtual Color_t GetTitleColor() const {return fTitleColor;}
46  virtual Style_t GetTitleFont() const {return fTitleFont;}
47  virtual void ResetAttAxis(Option_t *option="");
48  virtual void SaveAttributes(std::ostream &out, const char *name, const char *subname);
49  virtual void SetNdivisions(Int_t n=510, Bool_t optim=kTRUE); // *MENU*
50  virtual void SetNdivisions(Int_t n1, Int_t n2, Int_t n3, Bool_t optim=kTRUE);
51  virtual void SetAxisColor(Color_t color=1, Float_t alpha=1.); // *MENU*
52  virtual void SetLabelColor(Color_t color=1, Float_t alpha=1.); // *MENU*
53  virtual void SetLabelFont(Style_t font=62); // *MENU*
54  virtual void SetLabelOffset(Float_t offset=0.005); // *MENU*
55  virtual void SetLabelSize(Float_t size=0.04); // *MENU*
56  virtual void SetMaxDigits(Int_t maxDigits = 5); // *MENU*
57  virtual void SetTickLength(Float_t length=0.03); // *MENU*
58  virtual void SetTickSize(Float_t size=0.03) {SetTickLength(size);}
59  virtual void SetTitleOffset(Float_t offset=1); // *MENU*
60  virtual void SetTitleSize(Float_t size=0.04); // *MENU*
61  virtual void SetTitleColor(Color_t color=1); // *MENU*
62  virtual void SetTitleFont(Style_t font=62); // *MENU*
63 
64  ClassDef(TAttAxis,4); //Axis attributes
65 };
66 
67 #endif
68 
virtual void SetTitleOffset(Float_t offset=1)
Set distance between the axis and the axis title Offset is a correction factor with respect to the "s...
Definition: TAttAxis.cxx:294
virtual Float_t GetTickLength() const
Definition: TAttAxis.h:44
Color_t fAxisColor
Color of the line axis.
Definition: TAttAxis.h:21
Float_t fLabelOffset
Offset of labels.
Definition: TAttAxis.h:24
Style_t fLabelFont
Font for labels.
Definition: TAttAxis.h:23
short Style_t
Definition: RtypesCore.h:76
float Float_t
Definition: RtypesCore.h:53
Float_t fLabelSize
Size of labels.
Definition: TAttAxis.h:25
virtual Float_t GetLabelOffset() const
Definition: TAttAxis.h:40
const char Option_t
Definition: RtypesCore.h:62
virtual void ResetAttAxis(Option_t *option="")
Reset axis attributes.
Definition: TAttAxis.cxx:79
virtual void SetTickSize(Float_t size=0.03)
Definition: TAttAxis.h:58
virtual Color_t GetAxisColor() const
Definition: TAttAxis.h:37
Int_t fNdivisions
Number of divisions(10000*n3 + 100*n2 + n1)
Definition: TAttAxis.h:20
virtual void SetLabelColor(Color_t color=1, Float_t alpha=1.)
Set color of labels.
Definition: TAttAxis.cxx:173
virtual void SetNdivisions(Int_t n=510, Bool_t optim=kTRUE)
Set the number of divisions for this axis.
Definition: TAttAxis.cxx:229
virtual void SetMaxDigits(Int_t maxDigits=5)
This function sets the maximum number of digits permitted for the axis labels above which the notatio...
Definition: TAttAxis.cxx:264
virtual void SetTitleFont(Style_t font=62)
Set the title font.
Definition: TAttAxis.cxx:322
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
virtual Float_t GetLabelSize() const
Definition: TAttAxis.h:41
Manages histogram axis attributes.
Definition: TAttAxis.h:18
Float_t fTitleSize
Size of axis title.
Definition: TAttAxis.h:28
virtual void SetLabelOffset(Float_t offset=0.005)
Set distance between the axis and the labels The distance is expressed in per cent of the pad width...
Definition: TAttAxis.cxx:193
virtual void SetLabelFont(Style_t font=62)
Set labels&#39; font.
Definition: TAttAxis.cxx:183
virtual Style_t GetTitleFont() const
Definition: TAttAxis.h:46
Style_t fTitleFont
Font for axis title.
Definition: TAttAxis.h:30
#define ClassDef(name, id)
Definition: Rtypes.h:320
Color_t fLabelColor
Color of labels.
Definition: TAttAxis.h:22
virtual ~TAttAxis()
Destructor.
Definition: TAttAxis.cxx:54
virtual Color_t GetLabelColor() const
Definition: TAttAxis.h:38
short Color_t
Definition: RtypesCore.h:79
virtual Int_t GetNdivisions() const
Definition: TAttAxis.h:36
void Copy(TAttAxis &attaxis) const
Copy of the object.
Definition: TAttAxis.cxx:61
virtual Float_t GetTitleOffset() const
Definition: TAttAxis.h:42
virtual Color_t GetTitleColor() const
Definition: TAttAxis.h:45
virtual void SetAxisColor(Color_t color=1, Float_t alpha=1.)
Set color of the line axis and tick marks.
Definition: TAttAxis.cxx:163
virtual void SetLabelSize(Float_t size=0.04)
Set size of axis labels The size is expressed in per cent of the pad width.
Definition: TAttAxis.cxx:204
virtual void SetTitleColor(Color_t color=1)
Set color of axis title.
Definition: TAttAxis.cxx:313
virtual void SetTitleSize(Float_t size=0.04)
Set size of axis title The size is expressed in per cent of the pad width.
Definition: TAttAxis.cxx:304
virtual void SaveAttributes(std::ostream &out, const char *name, const char *subname)
Save axis attributes as C++ statement(s) on output stream out.
Definition: TAttAxis.cxx:111
virtual Float_t GetTitleSize() const
Definition: TAttAxis.h:43
Float_t fTickLength
Length of tick marks.
Definition: TAttAxis.h:26
TAttAxis()
Definition: TAttAxis.cxx:45
virtual void SetTickLength(Float_t length=0.03)
Set tick mark length The length is expressed in per cent of the pad width.
Definition: TAttAxis.cxx:280
Color_t fTitleColor
Color of axis title.
Definition: TAttAxis.h:29
const Bool_t kTRUE
Definition: RtypesCore.h:87
const Int_t n
Definition: legend1.C:16
char name[80]
Definition: TGX11.cxx:109
virtual Style_t GetLabelFont() const
Definition: TAttAxis.h:39
Float_t fTitleOffset
Offset of axis title.
Definition: TAttAxis.h:27