Logo ROOT   6.08/07
Reference Guide
TPaletteAxis.cxx
Go to the documentation of this file.
1 // @(#)root/histpainter:$Id$
2 // Author: Rene Brun 15/11/2002
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 #include "Riostream.h"
13 #include "TROOT.h"
14 #include "TPaletteAxis.h"
15 #include "TVirtualPad.h"
16 #include "TStyle.h"
17 #include "TMath.h"
18 #include "TView.h"
19 #include "TH1.h"
20 #include "TGaxis.h"
21 
23 
24 
25 ////////////////////////////////////////////////////////////////////////////////
26 
27 /*! \class TPaletteAxis
28 \ingroup Histpainter
29 \brief The palette painting class.
30 
31 A `TPaletteAxis` object is used to display the color palette when
32 drawing 2-d histograms.
33 
34 The `TPaletteAxis` is automatically created drawn when drawing a 2-D
35 histogram when the option "Z" is specified.
36 
37 A `TPaletteAxis` object is added to the histogram list of functions and
38 can be retrieved doing:
39 
40  TPaletteAxis *palette = (TPaletteAxis*)h->GetListOfFunctions()->FindObject("palette");
41 
42 then the pointer `palette` can be used to change the palette attributes.
43 
44 Because the palette is created at painting time only, one must issue a:
45 
46  gPad->Update();
47 
48 before retrieving the palette pointer in order to create the palette. The following
49 macro gives an example.
50 
51 Begin_Macro(source)
52 {
53  TCanvas *c1 = new TCanvas("c1","c1",600,400);
54  TH2F *h2 = new TH2F("h2","Example of a resized palette ",40,-4,4,40,-20,20);
55  Float_t px, py;
56  for (Int_t i = 0; i < 25000; i++) {
57  gRandom->Rannor(px,py);
58  h2->Fill(px,5*py);
59  }
60  gStyle->SetPalette(1);
61  h2->Draw("COLZ");
62  gPad->Update();
63  TPaletteAxis *palette = (TPaletteAxis*)h2->GetListOfFunctions()->FindObject("palette");
64  palette->SetY2NDC(0.7);
65  return c1;
66 }
67 End_Macro
68 
69 `TPaletteAxis` inherits from `TBox` and `TPave`. The methods
70 allowing to specify the palette position are inherited from these two classes.
71 
72 The palette can be interactively moved and resized. The context menu
73 can be used to set the axis attributes.
74 
75 It is possible to select a range on the axis to set the min/max in z
76 
77 */
78 
79 
80 ////////////////////////////////////////////////////////////////////////////////
81 /// Palette default constructor.
82 
84 {
85  fH = 0;
86  SetName("");
87 }
88 
89 
90 ////////////////////////////////////////////////////////////////////////////////
91 /// Palette normal constructor.
92 
94  : TPave(x1, y1, x2, y2)
95 {
96  fH = h;
97  SetName("palette");
98  TAxis *zaxis = fH->GetZaxis();
100  if (gPad->GetView()) SetBit(kHasView);
101 }
102 
103 
104 ////////////////////////////////////////////////////////////////////////////////
105 /// Palette destructor.
106 
108 {
109 }
110 
111 
112 ////////////////////////////////////////////////////////////////////////////////
113 /// Palette copy constructor.
114 
116 {
117  ((TPaletteAxis&)palette).Copy(*this);
118 }
119 
120 
121 ////////////////////////////////////////////////////////////////////////////////
122 /// Assignment operator.
123 
125 {
126  orig.Copy( *this );
127  return *this;
128 }
129 
130 
131 ////////////////////////////////////////////////////////////////////////////////
132 /// Copy a palette to a palette.
133 
134 void TPaletteAxis::Copy(TObject &obj) const
135 {
136  TPave::Copy(obj);
137  ((TPaletteAxis&)obj).fH = fH;
138  ((TPaletteAxis&)obj).fName = fName;
139 }
140 
141 
142 ////////////////////////////////////////////////////////////////////////////////
143 /// Check if mouse on the axis region.
144 
146 {
147  Int_t plxmax = gPad->XtoAbsPixel(fX2);
148  Int_t plymin = gPad->YtoAbsPixel(fY1);
149  Int_t plymax = gPad->YtoAbsPixel(fY2);
150  if (px > plxmax && px < plxmax + 30 && py >= plymax && py <= plymin) return px - plxmax;
151 
152  //otherwise check if inside the box
153  return TPave::DistancetoPrimitive(px, py);
154 }
155 
156 
157 ////////////////////////////////////////////////////////////////////////////////
158 /// Check if mouse on the axis region.
159 
161 {
162  if (!gPad) return;
163 
164  static Int_t kmode = 0;
165  Int_t plxmin = gPad->XtoAbsPixel(fX1);
166  Int_t plxmax = gPad->XtoAbsPixel(fX2);
167  if (kmode != 0 || px <= plxmax) {
168  if (event == kButton1Down) kmode = 1;
169  TBox::ExecuteEvent(event, px, py);
170  if (event == kButton1Up) kmode = 0;
171  // In case palette coordinates have been modified, recompute NDC coordinates
172  Double_t dpx = gPad->GetX2() - gPad->GetX1();
173  Double_t dpy = gPad->GetY2() - gPad->GetY1();
174  Double_t xp1 = gPad->GetX1();
175  Double_t yp1 = gPad->GetY1();
176  fX1NDC = (fX1 - xp1) / dpx;
177  fY1NDC = (fY1 - yp1) / dpy;
178  fX2NDC = (fX2 - xp1) / dpx;
179  fY2NDC = (fY2 - yp1) / dpy;
180  return;
181  }
182  gPad->SetCursor(kHand);
183  static Double_t ratio1, ratio2;
184  static Int_t px1old, py1old, px2old, py2old;
185  Double_t temp, xmin, xmax;
186 
187  switch (event) {
188 
189  case kButton1Down:
190  ratio1 = (gPad->AbsPixeltoY(py) - fY1) / (fY2 - fY1);
191  py1old = gPad->YtoAbsPixel(fY1 + ratio1 * (fY2 - fY1));
192  px1old = plxmin;
193  px2old = plxmax;
194  py2old = py1old;
195  gVirtualX->DrawBox(px1old, py1old, px2old, py2old, TVirtualX::kHollow);
196  gVirtualX->SetLineColor(-1);
197  // No break !!!
198 
199  case kButton1Motion:
200  gVirtualX->DrawBox(px1old, py1old, px2old, py2old, TVirtualX::kHollow);
201  ratio2 = (gPad->AbsPixeltoY(py) - fY1) / (fY2 - fY1);
202  py2old = gPad->YtoAbsPixel(fY1 + ratio2 * (fY2 - fY1));
203  gVirtualX->DrawBox(px1old, py1old, px2old, py2old, TVirtualX::kHollow);
204  break;
205 
206  case kButton1Up:
207  if (gROOT->IsEscaped()) {
208  gROOT->SetEscape(kFALSE);
209  break;
210  }
211 
212  ratio2 = (gPad->AbsPixeltoY(py) - fY1) / (fY2 - fY1);
213  xmin = ratio1;
214  xmax = ratio2;
215  if (xmin > xmax) {
216  temp = xmin;
217  xmin = xmax;
218  xmax = temp;
219  temp = ratio1;
220  ratio1 = ratio2;
221  ratio2 = temp;
222  }
223  if (ratio2 - ratio1 > 0.05) {
224  if (fH->GetDimension() == 2) {
225  Double_t zmin = fH->GetMinimum();
226  Double_t zmax = fH->GetMaximum();
227  if (gPad->GetLogz()) {
228  if (zmin <= 0 && zmax > 0) zmin = TMath::Min((Double_t)1,
229  (Double_t)0.001 * zmax);
230  zmin = TMath::Log10(zmin);
231  zmax = TMath::Log10(zmax);
232  }
233  Double_t newmin = zmin + (zmax - zmin) * ratio1;
234  Double_t newmax = zmin + (zmax - zmin) * ratio2;
235  if (newmin < zmin)newmin = fH->GetBinContent(fH->GetMinimumBin());
236  if (newmax > zmax)newmax = fH->GetBinContent(fH->GetMaximumBin());
237  if (gPad->GetLogz()) {
238  newmin = TMath::Exp(2.302585092994 * newmin);
239  newmax = TMath::Exp(2.302585092994 * newmax);
240  }
241  fH->SetMinimum(newmin);
242  fH->SetMaximum(newmax);
244  }
245  gPad->Modified(kTRUE);
246  }
247  gVirtualX->SetLineColor(-1);
248  kmode = 0;
249  break;
250  }
251 }
252 
253 
254 ////////////////////////////////////////////////////////////////////////////////
255 /// Returns the color index of the bin (i,j).
256 ///
257 /// This function should be used after an histogram has been plotted with the
258 /// option COL or COLZ like in the following example:
259 ///
260 /// h2->Draw("COLZ");
261 /// gPad->Update();
262 /// TPaletteAxis *palette = (TPaletteAxis*)h2->GetListOfFunctions()->FindObject("palette");
263 /// Int_t ci = palette->GetBinColor(20,15);
264 ///
265 /// Then it is possible to retrieve the RGB components in the following way:
266 ///
267 /// TColor *c = gROOT->GetColor(ci);
268 /// float x,y,z;
269 /// c->GetRGB(x,y,z);
270 
272 {
273  Double_t zc = fH->GetBinContent(i, j);
274  return GetValueColor(zc);
275 }
276 
277 
278 ////////////////////////////////////////////////////////////////////////////////
279 /// Displays the z value corresponding to cursor position py.
280 
281 char *TPaletteAxis::GetObjectInfo(Int_t /* px */, Int_t py) const
282 {
283  Double_t z;
284  static char info[64];
285 
286  Double_t zmin = fH->GetMinimum();
287  Double_t zmax = fH->GetMaximum();
288  Int_t y1 = gPad->GetWh() - gPad->VtoPixel(fY1NDC);
289  Int_t y2 = gPad->GetWh() - gPad->VtoPixel(fY2NDC);
290  Int_t y = gPad->GetWh() - py;
291 
292  if (gPad->GetLogz()) {
293  if (zmin <= 0 && zmax > 0) zmin = TMath::Min((Double_t)1,
294  (Double_t)0.001 * zmax);
295  Double_t zminl = TMath::Log10(zmin);
296  Double_t zmaxl = TMath::Log10(zmax);
297  Double_t zl = (zmaxl - zminl) * ((Double_t)(y - y1) / (Double_t)(y2 - y1)) + zminl;
298  z = TMath::Power(10., zl);
299  } else {
300  z = (zmax - zmin) * ((Double_t)(y - y1) / (Double_t)(y2 - y1)) + zmin;
301  }
302 
303  snprintf(info, 64, "(z=%g)", z);
304  return info;
305 }
306 
307 
308 ////////////////////////////////////////////////////////////////////////////////
309 /// Returns the color index of the given z value
310 ///
311 /// This function should be used after an histogram has been plotted with the
312 /// option COL or COLZ like in the following example:
313 ///
314 /// h2->Draw("COLZ");
315 /// gPad->Update();
316 /// TPaletteAxis *palette = (TPaletteAxis*)h2->GetListOfFunctions()->FindObject("palette");
317 /// Int_t ci = palette->GetValueColor(30.);
318 ///
319 /// Then it is possible to retrieve the RGB components in the following way:
320 ///
321 /// TColor *c = gROOT->GetColor(ci);
322 /// float x,y,z;
323 /// c->GetRGB(x,y,z);
324 
326 {
327  Double_t wmin = fH->GetMinimum();
328  Double_t wmax = fH->GetMaximum();
329  Double_t wlmin = wmin;
330  Double_t wlmax = wmax;
331 
332  if (gPad->GetLogz()) {
333  if (wmin <= 0 && wmax > 0) wmin = TMath::Min((Double_t)1,
334  (Double_t)0.001 * wmax);
335  wlmin = TMath::Log10(wmin);
336  wlmax = TMath::Log10(wmax);
337  }
338 
339  Int_t ncolors = gStyle->GetNumberOfColors();
340  Int_t ndivz = fH->GetContour();
341  if (ndivz == 0) return 0;
342  ndivz = TMath::Abs(ndivz);
343  Int_t theColor, color;
344  Double_t scale = ndivz / (wlmax - wlmin);
345 
346  if (fH->TestBit(TH1::kUserContour) && gPad->GetLogz()) zc = TMath::Log10(zc);
347  if (zc < wlmin) zc = wlmin;
348 
349  color = Int_t(0.01 + (zc - wlmin) * scale);
350 
351  theColor = Int_t((color + 0.99) * Double_t(ncolors) / Double_t(ndivz));
352  return gStyle->GetColorPalette(theColor);
353 }
354 
355 
356 ////////////////////////////////////////////////////////////////////////////////
357 /// Paint the palette.
358 
360 {
361  ConvertNDCtoPad();
362 
363  SetFillStyle(1001);
364  Double_t ymin = fY1;
365  Double_t ymax = fY2;
366  Double_t xmin = fX1;
367  Double_t xmax = fX2;
368  Double_t wmin = fH->GetMinimum();
369  Double_t wmax = fH->GetMaximum();
370  Double_t wlmin = wmin;
371  Double_t wlmax = wmax;
372  Double_t y1, y2, w1, w2, zc;
373 
374  if ((wlmax - wlmin) <= 0) {
375  Double_t mz = wlmin * 0.1;
376  if (mz == 0) mz = 0.1;
377  wlmin = wlmin - mz;
378  wlmax = wlmax + mz;
379  wmin = wlmin;
380  wmax = wlmax;
381  }
382 
383  if (gPad->GetLogz()) {
384  if (wmin <= 0 && wmax > 0) wmin = TMath::Min((Double_t)1,
385  (Double_t)0.001 * wmax);
386  wlmin = TMath::Log10(wmin);
387  wlmax = TMath::Log10(wmax);
388  }
389  Double_t ws = wlmax - wlmin;
390  Int_t ncolors = gStyle->GetNumberOfColors();
391  Int_t ndivz = fH->GetContour();
392  if (ndivz == 0) return;
393  ndivz = TMath::Abs(ndivz);
394  Int_t theColor, color;
395  Double_t scale = ndivz / (wlmax - wlmin);
396  for (Int_t i = 0; i < ndivz; i++) {
397 
398  zc = fH->GetContourLevel(i);
399  if (fH->TestBit(TH1::kUserContour) && gPad->GetLogz())
400  zc = TMath::Log10(zc);
401  w1 = zc;
402  if (w1 < wlmin) w1 = wlmin;
403 
404  w2 = wlmax;
405  if (i < ndivz - 1) {
406  zc = fH->GetContourLevel(i + 1);
407  if (fH->TestBit(TH1::kUserContour) && gPad->GetLogz())
408  zc = TMath::Log10(zc);
409  w2 = zc;
410  }
411 
412  if (w2 <= wlmin) continue;
413  y1 = ymin + (w1 - wlmin) * (ymax - ymin) / ws;
414  y2 = ymin + (w2 - wlmin) * (ymax - ymin) / ws;
415 
416  if (fH->TestBit(TH1::kUserContour)) {
417  color = i;
418  } else {
419  color = Int_t(0.01 + (w1 - wlmin) * scale);
420  }
421 
422  theColor = Int_t((color + 0.99) * Double_t(ncolors) / Double_t(ndivz));
423  SetFillColor(gStyle->GetColorPalette(theColor));
425  gPad->PaintBox(xmin, y1, xmax, y2);
426  }
427  Int_t ndiv = fH->GetZaxis()->GetNdivisions() % 100; //take primary divisions only
428  char chopt[6] = "S ";
429  chopt[1] = 0;
430  strncat(chopt, "+L", 2);
431  if (ndiv < 0) {
432  ndiv = TMath::Abs(ndiv);
433  strncat(chopt, "N", 1);
434  }
435  if (gPad->GetLogz()) {
436  wmin = TMath::Power(10., wlmin);
437  wmax = TMath::Power(10., wlmax);
438  strncat(chopt, "G", 1);
439  }
441  fAxis.PaintAxis(xmax, ymin, xmax, ymax, wmin, wmax, ndiv, chopt);
442 }
443 
444 
445 ////////////////////////////////////////////////////////////////////////////////
446 /// Save primitive as a C++ statement(s) on output stream out.
447 
448 void TPaletteAxis::SavePrimitive(std::ostream &out, Option_t * /*= ""*/)
449 {
450  //char quote = '"';
451  out << " " << std::endl;
452  if (gROOT->ClassSaved(TPaletteAxis::Class())) {
453  out << " ";
454  } else {
455  out << " " << ClassName() << " *";
456  }
457  if (fOption.Contains("NDC")) {
458  out << "palette = new " << ClassName() << "(" << fX1NDC << "," << fY1NDC << "," << fX2NDC << "," << fY2NDC
459  << "," << fH->GetName() << ");" << std::endl;
460  } else {
461  out << "palette = new " << ClassName() << "(" << fX1 << "," << fY1 << "," << fX2 << "," << fY2
462  << "," << fH->GetName() << ");" << std::endl;
463  }
464  out << "palette->SetLabelColor(" << fAxis.GetLabelColor() << ");" << std::endl;
465  out << "palette->SetLabelFont(" << fAxis.GetLabelFont() << ");" << std::endl;
466  out << "palette->SetLabelOffset(" << fAxis.GetLabelOffset() << ");" << std::endl;
467  out << "palette->SetLabelSize(" << fAxis.GetLabelSize() << ");" << std::endl;
468  out << "palette->SetTitleOffset(" << fAxis.GetTitleOffset() << ");" << std::endl;
469  out << "palette->SetTitleSize(" << fAxis.GetTitleSize() << ");" << std::endl;
470  SaveFillAttributes(out, "palette", -1, -1);
471  SaveLineAttributes(out, "palette", 1, 1, 1);
472 }
473 
474 
475 ////////////////////////////////////////////////////////////////////////////////
476 /// Unzoom the palette
477 
479 {
480  TView *view = gPad->GetView();
481  if (view) {
482  delete view;
483  gPad->SetView(0);
484  }
485  fH->GetZaxis()->SetRange(0, 0);
486  if (fH->GetDimension() == 2) {
487  fH->SetMinimum();
488  fH->SetMaximum();
490  }
491 }
Int_t GetLabelFont() const
Definition: TGaxis.h:86
virtual const char * GetName() const
Returns name of object.
Definition: TNamed.h:51
virtual Double_t GetMaximum(Double_t maxval=FLT_MAX) const
Return maximum value smaller than maxval of bins in the range, unless the value has been overridden b...
Definition: TH1.cxx:7664
float xmin
Definition: THbookFile.cxx:93
Int_t GetBinColor(Int_t i, Int_t j)
Returns the color index of the bin (i,j).
virtual void SetMaximum(Double_t maximum=-1111)
Definition: TH1.h:399
const char Option_t
Definition: RtypesCore.h:62
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to one event.
Definition: TBox.cxx:216
void Copy(TObject &palette) const
Copy a palette to a palette.
float ymin
Definition: THbookFile.cxx:93
R__EXTERN TStyle * gStyle
Definition: TStyle.h:418
Bool_t TestBit(UInt_t f) const
Definition: TObject.h:157
TH1 * h
Definition: legend2.C:5
Float_t GetLabelSize() const
Definition: TGaxis.h:88
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
Definition: TH1.cxx:4638
Double_t fY2
Y of 2nd point.
Definition: TBox.h:45
See TView3D.
Definition: TView.h:29
virtual void SetMinimum(Double_t minimum=-1111)
Definition: TH1.h:400
#define gROOT
Definition: TROOT.h:364
void Copy(TObject &pave) const
Copy this pave to pave.
Definition: TPave.cxx:167
virtual void ImportAxisAttributes(TAxis *axis)
Internal method to import TAxis attributes to this TGaxis.
Definition: TGaxis.cxx:692
Short_t Min(Short_t a, Short_t b)
Definition: TMathBase.h:170
int Int_t
Definition: RtypesCore.h:41
const Bool_t kFALSE
Definition: Rtypes.h:92
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
Definition: TAttFill.h:44
const char * Class
Definition: TXMLSetup.cxx:64
virtual Double_t GetContourLevel(Int_t level) const
Return value of contour number level.
Definition: TH1.cxx:7552
Short_t Abs(Short_t d)
Definition: TMathBase.h:110
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
Definition: TMath.h:501
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
Definition: TObject.cxx:739
A TBox with a bordersize and a shadow option.
Definition: TPave.h:23
virtual void ConvertNDCtoPad()
Convert pave coordinates from NDC to Pad coordinates.
Definition: TPave.cxx:121
Double_t fY1
Y of 1st point.
Definition: TBox.h:43
virtual Int_t GetDimension() const
Definition: TH1.h:287
virtual Int_t GetContour(Double_t *levels=0)
Return contour values into array levels if pointer levels is non zero.
Definition: TH1.cxx:7533
static const double x2[5]
virtual const char * ClassName() const
Returns name of class to which the object belongs.
Definition: TObject.cxx:188
Double_t fX1NDC
X1 point in NDC coordinates.
Definition: TPave.h:26
virtual void SaveLineAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t widdef=1)
Save line attributes as C++ statement(s) on output stream out.
Definition: TAttLine.cxx:260
virtual void Modify()
Change current fill area attributes if necessary.
Definition: TAttFill.cxx:209
virtual ~TPaletteAxis()
Palette destructor.
Double_t Log10(Double_t x)
Definition: TMath.h:529
Int_t GetColorPalette(Int_t i) const
Return color number i in current palette.
Definition: TStyle.cxx:735
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Check if mouse on the axis region.
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Check if mouse on the axis region.
virtual Int_t GetNdivisions() const
Definition: TAttAxis.h:41
TGaxis fAxis
Definition: TPaletteAxis.h:36
virtual void SetRange(Int_t first=0, Int_t last=0)
Set the viewing range for the axis from bin first to last.
Definition: TAxis.cxx:887
float ymax
Definition: THbookFile.cxx:93
virtual void PaintAxis(Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax, Double_t &wmin, Double_t &wmax, Int_t &ndiv, Option_t *chopt="", Double_t gridlength=0, Bool_t drawGridOnly=kFALSE)
Control function to draw an axis.
Definition: TGaxis.cxx:742
Class to manage histogram axis.
Definition: TAxis.h:36
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
Definition: TAttFill.h:42
Double_t fX2
X of 2nd point.
Definition: TBox.h:44
virtual void UnZoom()
Unzoom the palette.
virtual void SaveFillAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1001)
Save fill attributes as C++ statement(s) on output stream out.
Definition: TAttFill.cxx:232
Double_t fX1
X of 1st point.
Definition: TBox.h:42
float xmax
Definition: THbookFile.cxx:93
TString fName
Definition: TNamed.h:36
Int_t GetNumberOfColors() const
Return number of colors in the color palette.
Definition: TStyle.cxx:801
#define gVirtualX
Definition: TVirtualX.h:362
virtual Double_t GetMinimum(Double_t minval=-FLT_MAX) const
Return minimum value larger than minval of bins in the range, unless the value has been overridden by...
Definition: TH1.cxx:7749
virtual void SetName(const char *name="")
Definition: TPaletteAxis.h:62
TPaletteAxis()
Palette default constructor.
Double_t Exp(Double_t x)
Definition: TMath.h:495
Double_t fY2NDC
Y2 point in NDC coordinates.
Definition: TPave.h:29
static const double x1[5]
user specified contour levels
Definition: TH1.h:173
#define ClassImp(name)
Definition: Rtypes.h:279
TPaletteAxis & operator=(const TPaletteAxis &)
Assignment operator.
double Double_t
Definition: RtypesCore.h:55
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute distance from point px,py to a pave.
Definition: TPave.cxx:189
Double_t y[n]
Definition: legend1.C:17
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Definition: TString.h:567
The TH1 histogram class.
Definition: TH1.h:80
Double_t fX2NDC
X2 point in NDC coordinates.
Definition: TPave.h:28
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save primitive as a C++ statement(s) on output stream out.
TAxis * GetZaxis()
Definition: TH1.h:326
TString fName
pointer to parent histogram
Definition: TPaletteAxis.h:38
Mother of all ROOT objects.
Definition: TObject.h:37
you should not use this method at all Int_t Int_t z
Definition: TRolke.cxx:630
Float_t GetTitleOffset() const
Definition: TGaxis.h:89
virtual Int_t GetMinimumBin() const
Return location of bin with minimum value in the range.
Definition: TH1.cxx:7779
Int_t GetValueColor(Double_t zc)
Returns the color index of the given z value.
Float_t GetLabelOffset() const
Definition: TGaxis.h:87
#define snprintf
Definition: civetweb.c:822
bit set when zooming on Y axis
Definition: TH1.h:176
#define gPad
Definition: TVirtualPad.h:289
Double_t fY1NDC
Y1 point in NDC coordinates.
Definition: TPave.h:27
void ResetBit(UInt_t f)
Definition: TObject.h:156
virtual void Paint(Option_t *option="")
Paint the palette.
TString fOption
Pave style.
Definition: TPave.h:34
const Bool_t kTRUE
Definition: Rtypes.h:91
The palette painting class.
Definition: TPaletteAxis.h:33
virtual Int_t GetMaximumBin() const
Return location of bin with maximum value in the range.
Definition: TH1.cxx:7694
virtual char * GetObjectInfo(Int_t px, Int_t py) const
Displays the z value corresponding to cursor position py.
gr SetName("gr")
Int_t GetLabelColor() const
Definition: TGaxis.h:85
Float_t GetTitleSize() const
Definition: TGaxis.h:90