ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TAttAxis //
19 // //
20 // Axis attributes. //
21 // //
22 //////////////////////////////////////////////////////////////////////////
23 
24 #ifndef ROOT_Rtypes
25 #include "Rtypes.h"
26 #endif
27 #ifndef ROOT_Riosfwd
28 #include "Riosfwd.h"
29 #endif
30 
31 
32 class TAttAxis {
33 protected:
34  Int_t fNdivisions; //Number of divisions(10000*n3 + 100*n2 + n1)
35  Color_t fAxisColor; //color of the line axis
36  Color_t fLabelColor; //color of labels
37  Style_t fLabelFont; //font for labels
38  Float_t fLabelOffset; //offset of labels
39  Float_t fLabelSize; //size of labels
40  Float_t fTickLength; //length of tick marks
41  Float_t fTitleOffset; //offset of axis title
42  Float_t fTitleSize; //size of axis title
43  Color_t fTitleColor; //color of axis title
44  Style_t fTitleFont; //font for axis title
45 
46 public:
47  TAttAxis();
48  virtual ~TAttAxis();
49  void Copy(TAttAxis &attaxis) const;
50  virtual Int_t GetNdivisions() const {return fNdivisions;}
51  virtual Color_t GetAxisColor() const {return fAxisColor;}
52  virtual Color_t GetLabelColor() const {return fLabelColor;}
53  virtual Style_t GetLabelFont() const {return fLabelFont;}
54  virtual Float_t GetLabelOffset() const {return fLabelOffset;}
55  virtual Float_t GetLabelSize() const {return fLabelSize;}
56  virtual Float_t GetTitleOffset() const {return fTitleOffset;}
57  virtual Float_t GetTitleSize() const {return fTitleSize;}
58  virtual Float_t GetTickLength() const {return fTickLength;}
59  virtual Color_t GetTitleColor() const {return fTitleColor;}
60  virtual Style_t GetTitleFont() const {return fTitleFont;}
61  virtual void ResetAttAxis(Option_t *option="");
62  virtual void SaveAttributes(std::ostream &out, const char *name, const char *subname);
63  virtual void SetNdivisions(Int_t n=510, Bool_t optim=kTRUE); // *MENU*
64  virtual void SetNdivisions(Int_t n1, Int_t n2, Int_t n3, Bool_t optim=kTRUE);
65  virtual void SetAxisColor(Color_t color=1, Float_t alpha=1.); // *MENU*
66  virtual void SetLabelColor(Color_t color=1, Float_t alpha=1.); // *MENU*
67  virtual void SetLabelFont(Style_t font=62); // *MENU*
68  virtual void SetLabelOffset(Float_t offset=0.005); // *MENU*
69  virtual void SetLabelSize(Float_t size=0.04); // *MENU*
70  virtual void SetTickLength(Float_t length=0.03); // *MENU*
71  virtual void SetTickSize(Float_t size=0.03) {SetTickLength(size);}
72  virtual void SetTitleOffset(Float_t offset=1); // *MENU*
73  virtual void SetTitleSize(Float_t size=0.04); // *MENU*
74  virtual void SetTitleColor(Color_t color=1); // *MENU*
75  virtual void SetTitleFont(Style_t font=62); // *MENU*
76 
77  ClassDef(TAttAxis,4); //Axis attributes
78 };
79 
80 #endif
81 
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:245
virtual Color_t GetAxisColor() const
Definition: TAttAxis.h:51
virtual Color_t GetLabelColor() const
Definition: TAttAxis.h:52
Color_t fAxisColor
Definition: TAttAxis.h:35
Float_t fLabelOffset
Definition: TAttAxis.h:38
Style_t fLabelFont
Definition: TAttAxis.h:37
short Style_t
Definition: RtypesCore.h:76
float Float_t
Definition: RtypesCore.h:53
Float_t fLabelSize
Definition: TAttAxis.h:39
const char Option_t
Definition: RtypesCore.h:62
tuple offset
Definition: tree.py:93
virtual void ResetAttAxis(Option_t *option="")
Reset axis attributes.
Definition: TAttAxis.cxx:62
virtual void SetTickSize(Float_t size=0.03)
Definition: TAttAxis.h:71
ClassDef(TAttAxis, 4)
Int_t fNdivisions
Definition: TAttAxis.h:34
virtual void SetLabelColor(Color_t color=1, Float_t alpha=1.)
Set color of labels.
Definition: TAttAxis.cxx:156
virtual void SetNdivisions(Int_t n=510, Bool_t optim=kTRUE)
Set the number of divisions for this axis.
Definition: TAttAxis.cxx:212
virtual void SetTitleFont(Style_t font=62)
Set the title font.
Definition: TAttAxis.cxx:273
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
virtual Color_t GetTitleColor() const
Definition: TAttAxis.h:59
virtual Style_t GetTitleFont() const
Definition: TAttAxis.h:60
Manages histogram axis attributes.
Definition: TAttAxis.h:32
virtual Float_t GetTitleSize() const
Definition: TAttAxis.h:57
Float_t fTitleSize
Definition: TAttAxis.h:42
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:176
virtual void SetLabelFont(Style_t font=62)
Set labels' font.
Definition: TAttAxis.cxx:166
Style_t fTitleFont
Definition: TAttAxis.h:44
Color_t fLabelColor
Definition: TAttAxis.h:36
void Copy(TAttAxis &attaxis) const
Copy of the object.
Definition: TAttAxis.cxx:44
virtual ~TAttAxis()
Destructor.
Definition: TAttAxis.cxx:37
virtual Float_t GetTitleOffset() const
Definition: TAttAxis.h:56
char * out
Definition: TBase64.cxx:29
short Color_t
Definition: RtypesCore.h:79
Double_t length(const TVector2 &v)
Definition: CsgOps.cxx:347
virtual void SetAxisColor(Color_t color=1, Float_t alpha=1.)
Set color of the line axis and tick marks.
Definition: TAttAxis.cxx:146
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:187
virtual void SetTitleColor(Color_t color=1)
Set color of axis title.
Definition: TAttAxis.cxx:264
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:255
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:94
virtual Style_t GetLabelFont() const
Definition: TAttAxis.h:53
virtual Int_t GetNdivisions() const
Definition: TAttAxis.h:50
#define name(a, b)
Definition: linkTestLib0.cpp:5
virtual Float_t GetLabelSize() const
Definition: TAttAxis.h:55
Float_t fTickLength
Definition: TAttAxis.h:40
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:232
Color_t fTitleColor
Definition: TAttAxis.h:43
const Bool_t kTRUE
Definition: Rtypes.h:91
virtual Float_t GetTickLength() const
Definition: TAttAxis.h:58
const Int_t n
Definition: legend1.C:16
virtual Float_t GetLabelOffset() const
Definition: TAttAxis.h:54
Float_t fTitleOffset
Definition: TAttAxis.h:41