Logo ROOT  
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:
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 Int_t GetMaxDigits() const {return (Int_t)(fNdivisions/1000000);}
43  virtual Float_t GetTitleOffset() const {return fTitleOffset;}
44  virtual Float_t GetTitleSize() const {return fTitleSize;}
45  virtual Float_t GetTickLength() const {return fTickLength;}
46  virtual Color_t GetTitleColor() const {return fTitleColor;}
47  virtual Style_t GetTitleFont() const {return fTitleFont;}
48  virtual void ResetAttAxis(Option_t *option="");
49  virtual void SaveAttributes(std::ostream &out, const char *name, const char *subname);
50  virtual void SetNdivisions(Int_t n=510, Bool_t optim=kTRUE); // *MENU*
51  virtual void SetNdivisions(Int_t n1, Int_t n2, Int_t n3, Bool_t optim=kTRUE);
52  virtual void SetAxisColor(Color_t color=1, Float_t alpha=1.); // *MENU*
53  virtual void SetLabelColor(Color_t color=1, Float_t alpha=1.); // *MENU*
54  virtual void SetLabelFont(Style_t font=62); // *MENU*
55  virtual void SetLabelOffset(Float_t offset=0.005); // *MENU*
56  virtual void SetLabelSize(Float_t size=0.04); // *MENU*
57  virtual void SetMaxDigits(Int_t maxDigits = 5); // *MENU*
58  virtual void SetTickLength(Float_t length=0.03); // *MENU*
59  virtual void SetTickSize(Float_t size=0.03) {SetTickLength(size);}
60  virtual void SetTitleOffset(Float_t offset=1); // *MENU*
61  virtual void SetTitleSize(Float_t size=0.04); // *MENU*
62  virtual void SetTitleColor(Color_t color=1); // *MENU*
63  virtual void SetTitleFont(Style_t font=62); // *MENU*
64 
65  ClassDef(TAttAxis,4); //Axis attributes
66 };
67 
68 #endif
69 
n
const Int_t n
Definition: legend1.C:16
TAttAxis::ResetAttAxis
virtual void ResetAttAxis(Option_t *option="")
Reset axis attributes.
Definition: TAttAxis.cxx:78
TAttAxis::fNdivisions
Int_t fNdivisions
Number of divisions(10000*n3 + 100*n2 + n1)
Definition: TAttAxis.h:26
TAttAxis::fTitleFont
Style_t fTitleFont
Font for axis title.
Definition: TAttAxis.h:36
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:91
Style_t
short Style_t
Definition: RtypesCore.h:80
TAttAxis::SetMaxDigits
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:263
TAttAxis::TAttAxis
TAttAxis()
Definition: TAttAxis.cxx:44
TAttAxis::SetAxisColor
virtual void SetAxisColor(Color_t color=1, Float_t alpha=1.)
Set color of the line axis and tick marks.
Definition: TAttAxis.cxx:162
TAttAxis::Copy
void Copy(TAttAxis &attaxis) const
Copy of the object.
Definition: TAttAxis.cxx:60
TAttAxis::fAxisColor
Color_t fAxisColor
Color of the line axis.
Definition: TAttAxis.h:27
TAttAxis::SetLabelOffset
virtual void SetLabelOffset(Float_t offset=0.005)
Set distance between the axis and the labels.
Definition: TAttAxis.cxx:192
TAttAxis::GetLabelSize
virtual Float_t GetLabelSize() const
Definition: TAttAxis.h:47
TAttAxis::GetMaxDigits
virtual Int_t GetMaxDigits() const
Definition: TAttAxis.h:48
Float_t
float Float_t
Definition: RtypesCore.h:57
TAttAxis::fTickLength
Float_t fTickLength
Length of tick marks.
Definition: TAttAxis.h:32
TAttAxis::GetAxisColor
virtual Color_t GetAxisColor() const
Definition: TAttAxis.h:43
TAttAxis::GetLabelOffset
virtual Float_t GetLabelOffset() const
Definition: TAttAxis.h:46
Color_t
short Color_t
Definition: RtypesCore.h:83
TAttAxis::SetTitleColor
virtual void SetTitleColor(Color_t color=1)
Set color of axis title.
Definition: TAttAxis.cxx:312
bool
TAttAxis::SetTitleSize
virtual void SetTitleSize(Float_t size=0.04)
Set size of axis title.
Definition: TAttAxis.cxx:303
TAttAxis::SetLabelSize
virtual void SetLabelSize(Float_t size=0.04)
Set size of axis labels.
Definition: TAttAxis.cxx:203
Option_t
const typedef char Option_t
Definition: RtypesCore.h:66
TAttAxis::GetTitleColor
virtual Color_t GetTitleColor() const
Definition: TAttAxis.h:52
TAttAxis::GetTickLength
virtual Float_t GetTickLength() const
Definition: TAttAxis.h:51
TAttAxis::SetTitleFont
virtual void SetTitleFont(Style_t font=62)
Set the title font.
Definition: TAttAxis.cxx:321
TAttAxis::GetLabelColor
virtual Color_t GetLabelColor() const
Definition: TAttAxis.h:44
TAttAxis::SetTickSize
virtual void SetTickSize(Float_t size=0.03)
Definition: TAttAxis.h:65
TAttAxis::fTitleSize
Float_t fTitleSize
Size of axis title.
Definition: TAttAxis.h:34
TAttAxis::SaveAttributes
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:110
TAttAxis::SetLabelColor
virtual void SetLabelColor(Color_t color=1, Float_t alpha=1.)
Set color of labels.
Definition: TAttAxis.cxx:172
TAttAxis::fLabelFont
Style_t fLabelFont
Font for labels.
Definition: TAttAxis.h:29
TAttAxis::GetTitleFont
virtual Style_t GetTitleFont() const
Definition: TAttAxis.h:53
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TAttAxis
Definition: TAttAxis.h:18
TAttAxis::SetTickLength
virtual void SetTickLength(Float_t length=0.03)
Set tick mark length.
Definition: TAttAxis.cxx:279
name
char name[80]
Definition: TGX11.cxx:110
TAttAxis::fLabelSize
Float_t fLabelSize
Size of labels.
Definition: TAttAxis.h:31
TAttAxis::SetNdivisions
virtual void SetNdivisions(Int_t n=510, Bool_t optim=kTRUE)
Set the number of divisions for this axis.
Definition: TAttAxis.cxx:228
TAttAxis::fTitleColor
Color_t fTitleColor
Color of axis title.
Definition: TAttAxis.h:35
TAttAxis::~TAttAxis
virtual ~TAttAxis()
Destructor.
Definition: TAttAxis.cxx:53
TAttAxis::GetLabelFont
virtual Style_t GetLabelFont() const
Definition: TAttAxis.h:45
TAttAxis::SetTitleOffset
virtual void SetTitleOffset(Float_t offset=1)
Set distance between the axis and the axis title.
Definition: TAttAxis.cxx:293
TAttAxis::fLabelColor
Color_t fLabelColor
Color of labels.
Definition: TAttAxis.h:28
TAttAxis::SetLabelFont
virtual void SetLabelFont(Style_t font=62)
Set labels' font.
Definition: TAttAxis.cxx:182
Rtypes.h
TAttAxis::GetNdivisions
virtual Int_t GetNdivisions() const
Definition: TAttAxis.h:42
TAttAxis::GetTitleSize
virtual Float_t GetTitleSize() const
Definition: TAttAxis.h:50
TAttAxis::fLabelOffset
Float_t fLabelOffset
Offset of labels.
Definition: TAttAxis.h:30
int
TAttAxis::fTitleOffset
Float_t fTitleOffset
Offset of axis title.
Definition: TAttAxis.h:33
TAttAxis::GetTitleOffset
virtual Float_t GetTitleOffset() const
Definition: TAttAxis.h:49