PlottI
 All Classes Files Functions Variables Enumerations Enumerator Pages
PlotBase.h
1 // ~~ PlotTING CLASS ~~
2 
3 // ----------------------------------------------------------------------------
4 //
5 // This file contains the base class for all plotting functionality
6 // This class is meant to be purely virtual, the derived classes
7 // that can be used for plotting can be found in PlotDerived.h.
8 //
9 // ----------------------------------------------------------------------------
10 
11 #define BASE_H
12 
13 // ----------------------------------------------------------------------------
14 //
15 // PLOT BASE CLASS
16 //
17 // ----------------------------------------------------------------------------
18 
20 
21 class Plot
22 {
23 
24 public:
25 
27  enum Mode : unsigned int {
31  };
32 
33  Plot();
34  Plot(TString xTitle, TString yTitle);
35  virtual ~Plot() {}
36 
37  /*virtual*/ void Draw() {}
38 
39  template <class PO> static void SetLineProperties(PO* pobj, Color_t color, Style_t lstyle, Size_t lwid = 2.);
40  template <class PO> static void SetMarkerProperties(PO* pobj, Color_t color, Style_t mstyle, Size_t msize = 3.);
41  template <class PO> static void SetPlottjectProperties(PO* pobj, Color_t color, Style_t mstyle, Size_t msize = 3., Style_t lstyle = 1, Size_t lwid= 2., std::string title = "");
42  void SetProperties(TObject* obj, Int_t index);
43 
44  void SetCanvasDimensions(Float_t cWidth, Float_t cHeight);
45  void SetCanvasMargins(Float_t rMargin, Float_t lMargin, Float_t tMargin, Float_t bMargin);
46  void SetCanvasOffsets(Float_t xOffset, Float_t yOffset);
47  /*virtual*/ void SetLog(Bool_t xLog = kFALSE, Bool_t yLog = kTRUE);
48  void SetRanges(Float_t xLow, Float_t xUp, Float_t yLow, Float_t yUp);
49  void SetOffset(Int_t off);
50 
51  void SetMode(Mode m);
52  void SetStyle(std::vector<Color_t> col, std::vector<Style_t> mark, std::vector<Size_t> siz = {}, std::vector<Style_t> lstyl = {}, std::vector<Size_t> lwid = {});
53  void ToggleStyle() { styles = !styles; }
54  void SetPalette(Int_t pal, Bool_t invert = kFALSE);
55  void SetPalette(ColorGradient &pal, Bool_t invert = kFALSE);
56  /*virtual*/ void SetOptions(TString opt);
57  /*virtual*/ void SetOptions(std::vector<std::string> optns);
58  virtual void SetOptions(std::string optns, std::string postns, Int_t off = 0);
59  void SetOption(std::string opt, Int_t pos);
60 
61 protected:
62 
63  void EnsureAxes(TObject* first, std::string arrayName = "");
64  template <class AO> void SetCanvasStyle(AO* first, Float_t xOff, Float_t yOff);
65  template <class AO> void SetPadStyle(AO* first, TString xTitle, TString yTitle, Float_t xUp, Float_t xLow, Float_t yUp, Float_t yLow);
66  template <class AO> void SetRangesAuto(AO* first);
67  template <class AO> void SuppressXaxis(AO* first);
68  template <class AO> void SuppressYaxis(AO* first);
69  void SetUpStyle(TObject* first, TString xTitle, TString yTitle, Float_t xUp, Float_t xLow, Float_t yUp, Float_t yLow, Float_t xOff, Float_t yOff);
70  void SetUpPad(TPad* pad, Bool_t xLog, Bool_t yLog);
71  void DrawArray(TObjArray* array, Int_t off = 0, Int_t offOpt = 0);
72 
73  TPad *mainPad {nullptr};
74  TCanvas *canvas {nullptr};
75 
76  static Int_t palette;
77  static Bool_t inversion;
78  static Bool_t inverted;
79  static std::vector<Int_t> palColors;
80  static std::vector<Color_t> colors;
81  static std::vector<Style_t> markers;
82  static std::vector<Style_t> lstyles;
83  static std::vector<Size_t> sizes;
84  static std::vector<Size_t> lwidths;
85  std::vector<std::string> options;
86 
87  TString titleX;
88  TString titleY;
89 
90  Float_t width {0};
91  Float_t height {0};
92  Float_t offsetX {0};
93  Float_t offsetY {0};
94  Float_t rightMargin {0};
95  Float_t leftMargin {0};
96  Float_t topMargin {0};
97  Float_t bottomMargin {0};
98  Bool_t logX {kFALSE};
99  Bool_t logY {kFALSE};
100 
101  Float_t yRangeLow {0};
102  Float_t yRangeUp {100};
103  Float_t xRangeLow {0};
104  Float_t xRangeUp {100};
105 
106  Bool_t ranges {kFALSE};
107  Bool_t broken {kFALSE};
108 
109  static Bool_t styles;
110 
111  static Style_t font;
112  static Style_t label;
113 
114  static Int_t mOffset;
115 
116 };
117 
118 // ---- Constructors ----------------------------------------------------------
119 
120 Plot::Plot():
121  titleX(""),
122  titleY("")
123 {
124 }
125 
127 Plot::Plot(TString xTitle, TString yTitle):
128  titleX(xTitle),
129  titleY(yTitle)
130 {
131 }
132 
133 // ---- Static Member Variables -----------------------------------------------
134 
135 Int_t Plot::palette {109};
136 Bool_t Plot::inversion {kFALSE};
137 Bool_t Plot::inverted {kFALSE};
138 
139 std::vector<Int_t> Plot::palColors;
140 std::vector<Color_t> Plot::colors;
141 std::vector<Style_t> Plot::markers;
142 std::vector<Style_t> Plot::lstyles;
143 std::vector<Size_t> Plot::sizes;
144 std::vector<Size_t> Plot::lwidths;
145 
146 Style_t Plot::font {43};
147 Style_t Plot::label {28};
148 
149 Bool_t Plot::styles {kFALSE};
150 Int_t Plot::mOffset {0};
151 
152 // ---- Member Functions ------------------------------------------------------
153 
154 template <class AO>
155 void Plot::SetCanvasStyle(AO* first, Float_t xOff, Float_t yOff){
156 
159  first->GetXaxis()->SetTitleOffset(xOff);
160  first->GetYaxis()->SetTitleOffset(yOff);
161  first->GetXaxis()->SetTickSize(0.03);
162  first->GetYaxis()->SetTickSize(0.03);
163  first->GetXaxis()->SetTitleSize(label);
164  first->GetYaxis()->SetTitleSize(label);
165  first->GetXaxis()->SetTitleFont(font);
166  first->GetYaxis()->SetTitleFont(font);
167  first->GetXaxis()->SetLabelFont(font);
168  first->GetYaxis()->SetLabelFont(font);
169  first->GetXaxis()->SetLabelSize(label);
170  first->GetYaxis()->SetLabelSize(label);
171 
172 }
173 
174 template <class AO>
175 void Plot::SetPadStyle(AO* first, TString xTitle, TString yTitle, Float_t xUp, Float_t xLow, Float_t yUp, Float_t yLow){
176 
179  if (first->InheritsFrom("TGraph")) first->GetXaxis()->SetLimits(xLow, xUp);
180  else first->GetXaxis()->SetRangeUser(xLow, xUp);
181  first->GetYaxis()->SetRangeUser(yLow, yUp);
182  first->GetXaxis()->SetTitle(xTitle);
183  first->GetYaxis()->SetTitle(yTitle);
184 
185 }
186 
187 void Plot::SetUpStyle(TObject* first, TString xTitle, TString yTitle, Float_t xUp, Float_t xLow, Float_t yUp, Float_t yLow, Float_t xOff, Float_t yOff){
188 
191  if (first->InheritsFrom("TH1")){
192  if (!ranges) SetRangesAuto((TH1*)first);
193  SetPadStyle((TH1*)first, xTitle, yTitle, xUp, xLow, yUp, yLow);
194  SetCanvasStyle((TH1*)first, xOff, yOff);
195  }
196  else if (first->InheritsFrom("TF1")){
197  if (!ranges) SetRangesAuto((TF1*)first);
198  SetPadStyle((TF1*)first, xTitle, yTitle, xUp, xLow, yUp, yLow);
199  SetCanvasStyle((TF1*)first, xOff, yOff);
200  }
201  else if (first->InheritsFrom("TMultiGraph")){
202  SetPadStyle((TMultiGraph*)first, xTitle, yTitle, xUp, xLow, yUp, yLow);
203  SetCanvasStyle((TMultiGraph*)first, xOff, yOff);
204  }
205 
206 }
207 
208 template <class PO>
209 void Plot::SetLineProperties(PO* pobj, Color_t color, Style_t lstyle, Size_t lwid){
210 
213  pobj->SetLineStyle(lstyle);
214  pobj->SetLineWidth(lwid);
215  pobj->SetLineColor(color);
216 
217 }
218 
219 template <class PO>
220 void Plot::SetMarkerProperties(PO* pobj, Color_t color, Style_t mstyle, Size_t msize){
221 
224  pobj->SetMarkerColor(color);
225  pobj->SetMarkerStyle(mstyle);
226  pobj->SetMarkerSize(msize);
227 
228 }
229 
230 template <class PO>
231 void Plot::SetPlottjectProperties(PO* pobj, Color_t color, Style_t mstyle, Size_t msize, Style_t lstyle, Size_t lwid, std::string title){
232 
235  if (!title.empty()) pobj->SetTitle(title.data());
236  SetMarkerProperties(pobj, color, mstyle, msize);
237  SetLineProperties(pobj, color, lstyle, lwid);
238 
239 }
240 
241 void Plot::SetProperties(TObject* obj, Int_t index){
242 
245  if (obj->InheritsFrom("TPave")){ //TLegend
246  ((TLegend*)obj)->SetTextFont(font);
247  ((TLegend*)obj)->SetTextSize(label);
248  ((TLegend*)obj)->SetBorderSize(0);
249  return;
250  }
251  else if (obj->InheritsFrom("TH1")) ((TH1*)obj)->SetStats(kFALSE);
252 
253  if (!styles) return; // no arrays were set, properties were set in advance by hand
254 
255  Double_t size, lwidth; Int_t lstyle, color, marker;
256 
257  size = (index < sizes.size()) ? sizes[index] : 2.;
258  lstyle = (index < lstyles.size()) ? lstyles[index] : 1;
259  lwidth = (index < lwidths.size()) ? lwidths[index] : 2.;
260  color = (index < colors.size()) ? colors[index] : kBlack;
261  marker = (index < markers.size()) ? markers[index] : kFullCircle;
262 
263  if (obj->InheritsFrom("TH1")) {
264  SetPlottjectProperties((TH1*)obj, color, marker, size, lstyle, lwidth);
265  }
266  else if (obj->InheritsFrom("TF1")){
267  SetPlottjectProperties((TF1*)obj, color, marker, size, lstyle, lwidth);
268  }
269  else if (obj->InheritsFrom("TGraph")){
270  SetPlottjectProperties((TGraph*)obj, color, marker, size, lstyle, lwidth);
271  }
272  else if (obj->InheritsFrom("TMultiGraph")){
273  TIter iMultiGraph(((TMultiGraph*)obj)->GetListOfGraphs());
274  while (TObject* graph = iMultiGraph()){
275  if (!graph) continue;
276  if (index >= markers.size()) break;
277  // SetPlottjectProperties((TGraph*)graph, color, marker, size, lstyle, lwidth);
278  SetProperties(graph, index);
279  index++;
280  }
281  }
282  else if (obj->InheritsFrom("TLine")){
283  SetLineProperties((TLine*)obj, color, lstyle, lwidth);
284  }
285  else if (obj->InheritsFrom("TMarker")){
286  SetMarkerProperties((TMarker*)obj, color, marker, size);
287  }
288  else{
289  std::cout << "\033[1;34mMissing Class \033[0m" << obj->ClassName() << std::endl;
290  }
291 
292 }
293 
294 void Plot::SetCanvasDimensions(Float_t cWidth, Float_t cHeight){
295 
298  width = cWidth;
299  height = cHeight;
300 
301 }
302 
303 void Plot::SetCanvasMargins(Float_t lMargin, Float_t rMargin, Float_t tMargin, Float_t bMargin){
304 
307  rightMargin = rMargin;
308  leftMargin = lMargin;
309  topMargin = tMargin;
310  bottomMargin = bMargin;
311 
312 }
313 
314 void Plot::SetCanvasOffsets(Float_t xOffset, Float_t yOffset){
315 
318  offsetX = xOffset;
319  offsetY = yOffset;
320 
321 }
322 
323 void Plot::SetLog(Bool_t xLog, Bool_t yLog){
324 
327  logX = xLog;
328  logY = yLog;
329 
330 }
331 
332 void Plot::SetRanges(Float_t xLow, Float_t xUp, Float_t yLow, Float_t yUp){
333 
336  xRangeUp = xUp;
337  xRangeLow = xLow;
338  yRangeUp = yUp;
339  yRangeLow = yLow;
340 
341  ranges = kTRUE;
342 
343 }
344 
345 void Plot::SetOffset(Int_t off){
346 
349  mOffset = off;
350 
351 }
352 
353 template <class AO>
354 void Plot::SetRangesAuto(AO* first){
355 
359  yRangeUp = first->GetMaximum();
360  yRangeUp = (yRangeUp < 0) ? 0.8*yRangeUp : 1.2*yRangeUp;
361 
362  yRangeLow = first->GetMinimum();
363  yRangeLow = (yRangeLow < 0) ? 1.2*yRangeLow : 0.8*yRangeLow;
364 
365  Int_t binLow = GetXfirstFilledBin(((TH1*)first));
366  Int_t binHigh = GetXlastFilledBin(((TH1*)first));
367  xRangeUp = ((TH1*)first)->GetXaxis()->GetBinCenter(binHigh+2);
368  xRangeLow = ((TH1*)first)->GetXaxis()->GetBinCenter(binLow-1);
369 
370 }
371 
372 template <class AO>
373 void Plot::SuppressXaxis(AO* first){
374 
377  if (first->InheritsFrom("TH1")){
378  ((TH1*)first)->GetXaxis()->SetLabelSize(0);
379  ((TH1*)first)->GetXaxis()->SetLabelColor(kWhite);
380  }
381  else if (first->InheritsFrom("TF1")){
382  ((TF1*)first)->GetXaxis()->SetLabelSize(0);
383  ((TF1*)first)->GetXaxis()->SetLabelColor(kWhite);
384  }
385  else if (first->InheritsFrom("TMultiGraph")){
386  ((TMultiGraph*)first)->GetXaxis()->SetLabelSize(0);
387  ((TMultiGraph*)first)->GetXaxis()->SetLabelColor(kWhite);
388  }
389 
390 }
391 
392 template <class AO>
393 void Plot::SuppressYaxis(AO* first){
394 
397  if (first->InheritsFrom("TH1")){
398  ((TH1*)first)->GetYaxis()->SetLabelSize(0);
399  ((TH1*)first)->GetYaxis()->SetLabelColor(kWhite);
400  }
401  else if (first->InheritsFrom("TF1")){
402  ((TF1*)first)->GetYaxis()->SetLabelSize(0);
403  ((TF1*)first)->GetYaxis()->SetLabelColor(kWhite);
404  }
405  else if (first->InheritsFrom("TMultiGraph")){
406  ((TMultiGraph*)first)->GetYaxis()->SetLabelSize(0);
407  ((TMultiGraph*)first)->GetYaxis()->SetLabelColor(kWhite);
408  }
409 
410 }
411 
413 
416  switch(m){
417 
418  case Presentation:
419  font = 43; //43
420  label = 37;//40;
421  break;
422 
423  case Thesis:
424  font = 43; //43
425  label = 40;//37;
426  break;
427 
428  case Auto:
429  break;
430 
431  default:
432  break;
433  }
434 
435  }
436 
437 void Plot::SetStyle(std::vector<Color_t> col, std::vector<Style_t> mark, std::vector<Size_t> siz, std::vector<Style_t> lstyl, std::vector<Size_t> lwid){
438 
441  colors = std::move(col);
442  markers = std::move(mark);
443 
444  if (!siz.empty()) sizes = std::move(siz);
445  else sizes.clear(); //??
446  if (!lstyl.empty()) lstyles = std::move(lstyl);
447  else lstyles.clear(); //??
448  if (!lwid.empty()) lwidths = std::move(lwid);
449  else lwidths.clear(); //??
450 
451  styles = kTRUE;
452 
453 }
454 
455 void Plot::SetPalette(Int_t pal, Bool_t invert){
456 
459  palette = pal;
460  palColors.clear();
461  inversion = invert;
462 
463 }
464 
465 void Plot::SetPalette(ColorGradient &pal, Bool_t invert){
466 
469  palette = pal.GetNpoints();
470  palColors = pal.GetPalette();
471  inversion = invert;
472 
473  if (palColors.empty()) std::cout << "\033[1;31mERROR:\033[0m Gradient is empty!" << std::endl;
474 
475 }
476 
477 
478 void Plot::SetOptions(TString opt){
479 
482  Int_t size = options.size();
483  options.clear();
484  options.resize(size, opt.Data());
485 
486 }
487 
488 void Plot::SetOptions(std::vector<std::string> optns){
489 
493  options = std::move(optns);
494 
495 }
496 
497 void Plot::SetOptions(std::string optns, std::string postns, Int_t off){
498 
503  std::istringstream options(optns);
504  std::istringstream positions(postns);
505 
506  TString* opt = new TString();
507  TString* pos = new TString();
508 
509  opt->ReadLine(options);
510  pos->ReadToken(positions);
511 
512  while(!opt->IsNull() && !pos->IsNull()) {
513 
514  SetOption(opt->Data(), pos->Atoi() + off);
515  std::cout << "- " << opt->Data() << " " << pos->Data() << std::endl;
516 
517  opt->ReadLine(options);
518  pos->ReadToken(positions);
519 
520  }
521 
522 }
523 
524 void Plot::SetOption(std::string opt, Int_t pos){
525 
529  if (pos < options.size()) options[pos] = opt;
530  else std::cout << "\033[1;31mERROR in Set Options:\033[0m Position \033[1;34m" << pos << "\033[0m is out of range!" << std::endl;
531 
532 }
533 
534 void Plot::SetUpPad(TPad* pad, Bool_t xLog, Bool_t yLog){
535 
538  gStyle->SetOptTitle(0);
539  gStyle->SetPalette(palette, palColors.empty() ? 0 : palColors.data());
540  if ((inversion && !inverted) || (!inversion && inverted)){
541  TColor::InvertPalette();
542  inverted = !inverted;
543  }
544 
545  pad->SetFillStyle(4100); //4000
546  pad->SetTopMargin(topMargin);
547  pad->SetBottomMargin(bottomMargin);
548  pad->SetRightMargin(rightMargin);
549  pad->SetLeftMargin(leftMargin);
550  pad->SetTickx(1);
551  pad->SetTicky(1);
552 
553  if (xLog){
554  if (xRangeLow > 0) pad->SetLogx(1);
555  else std::cout << "\033[1;31mERROR in SetLog:\033[0m X-Ranges must be above zero! Logarithm not set!!" << std::endl;
556  }
557  if (yLog){
558  if (yRangeLow > 0) pad->SetLogy(1);
559  else std::cout << "\033[1;31mERROR in SetLog:\033[0m Y-Ranges must be above zero! Logarithm not set!!" << std::endl;
560  }
561 
562 }
563 
564 void Plot::EnsureAxes(TObject* first, std::string arrayName){
565 
568  if (!first) {
569 
570  std::cout << "\033[1;33mFATAL ERROR:\033[0m First entry in array doesn't exist!!" << std::endl;
571  broken = kTRUE;
572  return;
573 
574  }
575 
576  if (!(first->InheritsFrom("TH1")) && !(first->InheritsFrom("TF1")) && !(first->InheritsFrom("TMultiGraph"))){
577 
578  std::cout << "\033[1;33mFATAL ERROR:\033[0m First entry in array must have axes "
579  << "\033[1;36m(" << arrayName << ")\033[0m" << std::endl;
580  broken = kTRUE;
581  return;
582 
583  }
584 
585 }
586 
587 void Plot::DrawArray(TObjArray* array, Int_t off, Int_t offOpt){
588 
591  Int_t nPlots = array->GetEntries();
592  std::string opt;
593 
594  for (Int_t plot = 0; plot < nPlots; plot++){
595 
596  if(!array->At(plot)) {
597  std::cout << "\033[1;31mERROR:\033[0m Plot object No " << plot << " is broken! Will be skipped." << std::endl;
598  continue;
599  }
600 
601  if ((plot == 0) && array->At(plot)->InheritsFrom("TF1")) opt = TString(options[plot+offOpt]).ReplaceAll("SAME","").Data();
602  else if (array->At(plot)->InheritsFrom("TGraph")) opt = TString(options[plot+offOpt]).ReplaceAll("SAME","").Data();
603  else opt = options[plot+offOpt].data();
604 
605  std::cout << " -> Draw " << array->At(plot)->ClassName() << ": "
606  << array->At(plot)->GetName() << " as " << opt << std::endl;
607 
608  SetProperties(array->At(plot), plot + off);
609  array->At(plot)->Draw(opt.data());
610 
611  }
612 
613 }
static std::vector< Size_t > lwidths
Object line width.
Definition: PlotBase.h:84
vector< Int_t > GetPalette()
Definition: Color.h:106
static Bool_t inversion
Should palette be inverted?
Definition: PlotBase.h:77
Float_t bottomMargin
Bottom margin of (main) pad.
Definition: PlotBase.h:97
void SetCanvasOffsets(Float_t xOffset, Float_t yOffset)
Definition: PlotBase.h:314
static std::vector< Style_t > lstyles
Object line style.
Definition: PlotBase.h:82
Float_t yRangeLow
Lower Y-axis range.
Definition: PlotBase.h:101
static void SetLineProperties(PO *pobj, Color_t color, Style_t lstyle, Size_t lwid=2.)
Definition: PlotBase.h:209
TPad * mainPad
Main pad.
Definition: PlotBase.h:73
Mode
Enumerator for choice of Mode, determining font size and style.
Definition: PlotBase.h:27
static std::vector< Style_t > markers
Object marker style.
Definition: PlotBase.h:81
Float_t offsetY
Offset of Y title.
Definition: PlotBase.h:93
Structure for saving RGB colors.
Definition: Color.h:18
Base class for all plotting functionality.
Definition: PlotBase.h:21
void SetOptions(TString opt)
Definition: PlotBase.h:478
Bool_t logX
Should X-axis be logarithmic?
Definition: PlotBase.h:98
static void SetMarkerProperties(PO *pobj, Color_t color, Style_t mstyle, Size_t msize=3.)
Definition: PlotBase.h:220
static Int_t mOffset
Offset for style array index.
Definition: PlotBase.h:114
void SetPalette(Int_t pal, Bool_t invert=kFALSE)
Definition: PlotBase.h:455
void Draw()
Abstract template for function.
Definition: PlotBase.h:37
void SetUpStyle(TObject *first, TString xTitle, TString yTitle, Float_t xUp, Float_t xLow, Float_t yUp, Float_t yLow, Float_t xOff, Float_t yOff)
Definition: PlotBase.h:187
static Style_t label
Label size.
Definition: PlotBase.h:112
void SetOffset(Int_t off)
Definition: PlotBase.h:345
Float_t topMargin
Top margin of (main) pad.
Definition: PlotBase.h:96
void SetMode(Mode m)
Definition: PlotBase.h:412
Float_t height
Height of canvas.
Definition: PlotBase.h:91
Float_t rightMargin
Right margin of (main) pad.
Definition: PlotBase.h:94
static void SetPlottjectProperties(PO *pobj, Color_t color, Style_t mstyle, Size_t msize=3., Style_t lstyle=1, Size_t lwid=2., std::string title="")
Definition: PlotBase.h:231
Class for saving color gradients (palettes)
Definition: Color.h:41
Plots will be used for a presentation.
Definition: PlotBase.h:28
void DrawArray(TObjArray *array, Int_t off=0, Int_t offOpt=0)
Definition: PlotBase.h:587
Bool_t logY
Should Y-axis be logarithmic?
Definition: PlotBase.h:99
void SetCanvasMargins(Float_t rMargin, Float_t lMargin, Float_t tMargin, Float_t bMargin)
Definition: PlotBase.h:303
void SuppressYaxis(AO *first)
Definition: PlotBase.h:393
void SetStyle(std::vector< Color_t > col, std::vector< Style_t > mark, std::vector< Size_t > siz={}, std::vector< Style_t > lstyl={}, std::vector< Size_t > lwid={})
Definition: PlotBase.h:437
void EnsureAxes(TObject *first, std::string arrayName="")
Definition: PlotBase.h:564
void SetCanvasStyle(AO *first, Float_t xOff, Float_t yOff)
Definition: PlotBase.h:155
void SetPadStyle(AO *first, TString xTitle, TString yTitle, Float_t xUp, Float_t xLow, Float_t yUp, Float_t yLow)
Definition: PlotBase.h:175
static std::vector< Size_t > sizes
Object marker size.
Definition: PlotBase.h:83
std::vector< std::string > options
Drawing options.
Definition: PlotBase.h:85
static std::vector< Color_t > colors
Object colors.
Definition: PlotBase.h:80
TString titleY
Title of Y-axis.
Definition: PlotBase.h:88
Float_t xRangeUp
Upper X-axis range.
Definition: PlotBase.h:104
static std::vector< Int_t > palColors
Color vector of personalised palette.
Definition: PlotBase.h:79
Int_t GetXfirstFilledBin(AO *hst)
Definition: functionality.h:13
void ToggleStyle()
Toggle wether style arrays are used. Note that SetStyles will automatically set this to on...
Definition: PlotBase.h:53
Float_t xRangeLow
Lower X-axis range.
Definition: PlotBase.h:103
Int_t GetNpoints()
Definition: Color.h:126
void SetOption(std::string opt, Int_t pos)
Definition: PlotBase.h:524
Placeholder.
Definition: PlotBase.h:30
static Style_t font
Font style.
Definition: PlotBase.h:111
TString titleX
Title of X-axis.
Definition: PlotBase.h:87
Int_t GetXlastFilledBin(AO *hst)
Definition: functionality.h:29
void SuppressXaxis(AO *first)
Definition: PlotBase.h:373
Bool_t ranges
Were ranges set manually?
Definition: PlotBase.h:106
static Bool_t inverted
Is palette currently inverted?
Definition: PlotBase.h:78
Float_t offsetX
Offset of X title.
Definition: PlotBase.h:92
void SetRanges(Float_t xLow, Float_t xUp, Float_t yLow, Float_t yUp)
Definition: PlotBase.h:332
Float_t yRangeUp
Upper Y-axis range.
Definition: PlotBase.h:102
TCanvas * canvas
Main canvas.
Definition: PlotBase.h:74
Float_t width
Width of canvas.
Definition: PlotBase.h:90
Plots will be used for a thesis.
Definition: PlotBase.h:29
void SetProperties(TObject *obj, Int_t index)
Definition: PlotBase.h:241
Bool_t broken
Did any fatal error occur?
Definition: PlotBase.h:107
static Bool_t styles
Were styles set manually?
Definition: PlotBase.h:109
void SetUpPad(TPad *pad, Bool_t xLog, Bool_t yLog)
Definition: PlotBase.h:534
void SetLog(Bool_t xLog=kFALSE, Bool_t yLog=kTRUE)
Definition: PlotBase.h:323
Float_t leftMargin
Left margin of (main) pad.
Definition: PlotBase.h:95
static Int_t palette
Color Palette.
Definition: PlotBase.h:76
void SetCanvasDimensions(Float_t cWidth, Float_t cHeight)
Definition: PlotBase.h:294
void SetRangesAuto(AO *first)
Definition: PlotBase.h:354