Logo ROOT   6.08/07
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 #ifndef ROOT_Rtypes
16 #include "Rtypes.h"
17 #endif
18 #ifndef ROOT_Riosfwd
19 #include "Riosfwd.h"
20 #endif
21 
22 
23 class TAttAxis {
24 protected:
25  Int_t fNdivisions; ///< Number of divisions(10000*n3 + 100*n2 + n1)
26  Color_t fAxisColor; ///< Color of the line axis
27  Color_t fLabelColor; ///< Color of labels
28  Style_t fLabelFont; ///< Font for labels
29  Float_t fLabelOffset; ///< Offset of labels
30  Float_t fLabelSize; ///< Size of labels
31  Float_t fTickLength; ///< Length of tick marks
32  Float_t fTitleOffset; ///< Offset of axis title
33  Float_t fTitleSize; ///< Size of axis title
34  Color_t fTitleColor; ///< Color of axis title
35  Style_t fTitleFont; ///< Font for axis title
36 
37 public:
38  TAttAxis();
39  virtual ~TAttAxis();
40  void Copy(TAttAxis &attaxis) const;
41  virtual Int_t GetNdivisions() const {return fNdivisions;}
42  virtual Color_t GetAxisColor() const {return fAxisColor;}
43  virtual Color_t GetLabelColor() const {return fLabelColor;}
44  virtual Style_t GetLabelFont() const {return fLabelFont;}
45  virtual Float_t GetLabelOffset() const {return fLabelOffset;}
46  virtual Float_t GetLabelSize() const {return fLabelSize;}
47  virtual Float_t GetTitleOffset() const {return fTitleOffset;}
48  virtual Float_t GetTitleSize() const {return fTitleSize;}
49  virtual Float_t GetTickLength() const {return fTickLength;}
50  virtual Color_t GetTitleColor() const {return fTitleColor;}
51  virtual Style_t GetTitleFont() const {return fTitleFont;}
52  virtual void ResetAttAxis(Option_t *option="");
53  virtual void SaveAttributes(std::ostream &out, const char *name, const char *subname);
54  virtual void SetNdivisions(Int_t n=510, Bool_t optim=kTRUE); // *MENU*
55  virtual void SetNdivisions(Int_t n1, Int_t n2, Int_t n3, Bool_t optim=kTRUE);
56  virtual void SetAxisColor(Color_t color=1, Float_t alpha=1.); // *MENU*
57  virtual void SetLabelColor(Color_t color=1, Float_t alpha=1.); // *MENU*
58  virtual void SetLabelFont(Style_t font=62); // *MENU*
59  virtual void SetLabelOffset(Float_t offset=0.005); // *MENU*
60  virtual void SetLabelSize(Float_t size=0.04); // *MENU*
61  virtual void SetTickLength(Float_t length=0.03); // *MENU*
62  virtual void SetTickSize(Float_t size=0.03) {SetTickLength(size);}
63  virtual void SetTitleOffset(Float_t offset=1); // *MENU*
64  virtual void SetTitleSize(Float_t size=0.04); // *MENU*
65  virtual void SetTitleColor(Color_t color=1); // *MENU*
66  virtual void SetTitleFont(Style_t font=62); // *MENU*
67 
68  ClassDef(TAttAxis,4); //Axis attributes
69 };
70 
71 #endif
72 
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:262
virtual Float_t GetTickLength() const
Definition: TAttAxis.h:49
Color_t fAxisColor
Color of the line axis.
Definition: TAttAxis.h:26
Float_t fLabelOffset
Offset of labels.
Definition: TAttAxis.h:29
Style_t fLabelFont
Font for labels.
Definition: TAttAxis.h:28
short Style_t
Definition: RtypesCore.h:76
float Float_t
Definition: RtypesCore.h:53
Float_t fLabelSize
Size of labels.
Definition: TAttAxis.h:30
virtual Float_t GetLabelOffset() const
Definition: TAttAxis.h:45
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:62
virtual Color_t GetAxisColor() const
Definition: TAttAxis.h:42
Int_t fNdivisions
Number of divisions(10000*n3 + 100*n2 + n1)
Definition: TAttAxis.h:25
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 SetTitleFont(Style_t font=62)
Set the title font.
Definition: TAttAxis.cxx:290
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
virtual Float_t GetLabelSize() const
Definition: TAttAxis.h:46
Manages histogram axis attributes.
Definition: TAttAxis.h:23
Float_t fTitleSize
Size of axis title.
Definition: TAttAxis.h:33
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:51
Style_t fTitleFont
Font for axis title.
Definition: TAttAxis.h:35
#define ClassDef(name, id)
Definition: Rtypes.h:254
Color_t fLabelColor
Color of labels.
Definition: TAttAxis.h:27
virtual ~TAttAxis()
Destructor.
Definition: TAttAxis.cxx:54
virtual Color_t GetLabelColor() const
Definition: TAttAxis.h:43
short Color_t
Definition: RtypesCore.h:79
virtual Int_t GetNdivisions() const
Definition: TAttAxis.h:41
void Copy(TAttAxis &attaxis) const
Copy of the object.
Definition: TAttAxis.cxx:61
virtual Float_t GetTitleOffset() const
Definition: TAttAxis.h:47
virtual Color_t GetTitleColor() const
Definition: TAttAxis.h:50
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:281
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:272
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:48
Float_t fTickLength
Length of tick marks.
Definition: TAttAxis.h:31
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:249
Color_t fTitleColor
Color of axis title.
Definition: TAttAxis.h:34
const Bool_t kTRUE
Definition: Rtypes.h:91
const Int_t n
Definition: legend1.C:16
char name[80]
Definition: TGX11.cxx:109
virtual Style_t GetLabelFont() const
Definition: TAttAxis.h:44
Float_t fTitleOffset
Offset of axis title.
Definition: TAttAxis.h:32