30 class TAxis :
public TNamed,
public TAttAxis {
48 kAlphanumeric = BIT(0),
53 Bool_t HasBinWithoutLabel()
const;
62 kCenterTitle = BIT(12),
63 kCenterLabels = BIT(14),
64 kRotateTitle = BIT(15),
66 kNoExponent = BIT(17),
67 kLabelsHori = BIT(18),
68 kLabelsVert = BIT(19),
69 kLabelsDown = BIT(20),
72 kMoreLogLabels = BIT(23)
76 TAxis(Int_t nbins, Double_t xmin, Double_t xmax);
77 TAxis(Int_t nbins,
const Double_t *xbins);
78 TAxis(
const TAxis &axis);
80 TAxis& operator=(
const TAxis&);
82 Bool_t CanExtend()
const {
return (fBits2 & kCanExtend); }
83 Bool_t CanBeAlphanumeric() {
return !(fBits2 & kNotAlpha); }
84 Bool_t IsAlphanumeric() {
return fBits2 & kAlphanumeric; }
85 void SetAlphanumeric(Bool_t alphanumeric = kTRUE);
86 void SetCanExtend(Bool_t canExtend) { fBits2 = canExtend ? (fBits2 | kCanExtend) : (fBits2 & ~kCanExtend); }
87 void SetNoAlphanumeric(Bool_t noalpha = kTRUE) {
88 fBits2 = noalpha ? (fBits2 | kNotAlpha) : (fBits2 & ~kNotAlpha);
89 if (IsAlphanumeric() ) {
91 SetAlphanumeric(kFALSE);
94 void CenterLabels(Bool_t center=kTRUE);
95 void CenterTitle(Bool_t center=kTRUE);
96 const char *ChooseTimeFormat(Double_t axislength=0);
97 virtual void Copy(TObject &axis)
const;
98 virtual void Delete(Option_t * =
"") { }
99 virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
100 virtual TObject *DrawClone(Option_t * =
"")
const {
return 0;}
101 virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py);
102 virtual Int_t FindBin(Double_t x);
103 virtual Int_t FindBin(Double_t x)
const {
return FindFixBin(x); }
104 virtual Int_t FindBin(
const char *label);
105 virtual Int_t FindFixBin(Double_t x)
const;
106 virtual Int_t FindFixBin(
const char *label)
const;
107 virtual Double_t GetBinCenter(Int_t bin)
const;
108 virtual Double_t GetBinCenterLog(Int_t bin)
const;
109 const char *GetBinLabel(Int_t bin)
const;
110 virtual Double_t GetBinLowEdge(Int_t bin)
const;
111 virtual Double_t GetBinUpEdge(Int_t bin)
const;
112 virtual Double_t GetBinWidth(Int_t bin)
const;
113 virtual void GetCenter(Double_t *center)
const;
114 Bool_t GetCenterLabels()
const {
return TestBit(kCenterLabels); }
115 Bool_t GetCenterTitle()
const {
return TestBit(kCenterTitle); }
116 Bool_t GetDecimals()
const {
return TestBit(kDecimals); }
117 THashList *GetLabels()
const {
return fLabels; }
118 TList *GetModifiedLabels()
const {
return fModLabs; }
119 virtual void GetLowEdge(Double_t *edge)
const;
120 Bool_t GetMoreLogLabels()
const {
return TestBit(kMoreLogLabels); }
121 Int_t GetNbins()
const {
return fNbins; }
122 Bool_t GetNoExponent()
const {
return TestBit(kNoExponent); }
123 virtual TObject *GetParent()
const {
return fParent;}
124 Bool_t GetRotateTitle()
const {
return TestBit(kRotateTitle); }
125 virtual const char *GetTicks()
const;
126 virtual Bool_t GetTimeDisplay()
const {
return fTimeDisplay;}
127 virtual const char *GetTimeFormat()
const {
return fTimeFormat.Data();}
128 virtual const char *GetTimeFormatOnly()
const;
129 const char *GetTitle()
const {
return fTitle.Data();}
130 const TArrayD *GetXbins()
const {
return &fXbins;}
131 Int_t GetFirst()
const;
132 Int_t GetLast()
const;
133 Double_t GetXmin()
const {
return fXmin;}
134 Double_t GetXmax()
const {
return fXmax;}
135 virtual void ImportAttributes(
const TAxis *axis);
136 Bool_t IsVariableBinSize()
const {
138 return (fXbins.GetSize() != 0);
140 virtual void LabelsOption(Option_t *option=
"h");
141 void RotateTitle(Bool_t rotate=kTRUE);
142 virtual void SaveAttributes(std::ostream &out,
const char *name,
const char *subname);
143 virtual void Set(Int_t nbins, Double_t xmin, Double_t xmax);
144 virtual void Set(Int_t nbins,
const Float_t *xbins);
145 virtual void Set(Int_t nbins,
const Double_t *xbins);
146 virtual void SetBinLabel(Int_t bin,
const char *label);
147 void SetDecimals(Bool_t dot = kTRUE);
148 virtual void SetDefaults();
149 virtual void SetDrawOption(Option_t * =
"") { }
150 void ChangeLabel(Int_t labNum=0, Double_t labAngle = -1.,
151 Double_t labSize = -1., Int_t labAlign = -1,
152 Int_t labColor = -1 , Int_t labFont = -1,
153 TString labText =
"");
154 virtual void SetLimits(Double_t xmin, Double_t xmax) { fXmin = xmin; fXmax = xmax; }
155 void SetMoreLogLabels(Bool_t more=kTRUE);
156 void SetNoExponent(Bool_t noExponent=kTRUE);
157 virtual void SetParent(TObject *obj) {fParent = obj;}
158 virtual void SetRange(Int_t first=0, Int_t last=0);
159 virtual void SetRangeUser(Double_t ufirst, Double_t ulast);
160 virtual void SetTicks(Option_t *option=
"+");
161 virtual void SetTimeDisplay(Int_t value) {fTimeDisplay = (value != 0);}
162 virtual void SetTimeFormat(
const char *format=
"");
163 virtual void SetTimeOffset(Double_t toffset, Option_t *option=
"local");
164 virtual void UnZoom();
165 virtual void ZoomOut(Double_t factor=0, Double_t offset=0);
175 inline void TAxis::CenterLabels(Bool_t center)
177 SetBit(kCenterLabels, center);
184 inline void TAxis::CenterTitle(Bool_t center)
186 SetBit(kCenterTitle, center);
193 inline void TAxis::RotateTitle(Bool_t rotate)
195 SetBit(kRotateTitle, rotate);
203 inline void TAxis::SetDecimals(Bool_t dot) {
204 SetBit(kDecimals, dot);
213 inline void TAxis::SetMoreLogLabels(Bool_t more)
215 SetBit(kMoreLogLabels, more);
223 inline void TAxis::SetNoExponent(Bool_t noExponent)
225 SetBit(kNoExponent, noExponent);