Logo ROOT   6.07/09
Reference Guide
TCandle.cxx
Go to the documentation of this file.
1 // @(#)root/graf:$Id$
2 // Author: Georg Troska 19/05/16
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 <stdlib.h>
13 #include <iostream>
14 #include "TROOT.h"
15 #include "TCandle.h"
16 #include "TClass.h"
17 #include "TPad.h"
18 #include "TRandom2.h"
19 
21 
22 /** \class TCandle
23 \ingroup BasicGraphics
24 
25 The candle plot painter class.
26 
27 Instances of this class are generated by the histograms painting
28 classes (THistPainter and THStack) when an candle plot (box plot) is drawn.
29 TCandle is the "painter class" of the box plots. Therefore it is never used
30 directly to draw a candle.
31 */
32 
33 const Int_t kNMAX = 2000; // Max outliers per candle
34 
35 ////////////////////////////////////////////////////////////////////////////////
36 /// TCandle default constructor.
37 
39 {
40  fIsCalculated = 0;
41  fIsRaw = 0;
42  fPosCandleAxis = 0.;
43  fCandleWidth = 1.0;
44  fMean = 0.;
45  fMedian = 0.;
46  fBoxUp = 0.;
47  fBoxDown = 0.;
48  fWhiskerUp = 0.;
49  fWhiskerDown = 0.;
50  fLogX = 0;
51  fLogY = 0;
52  fDismiss = 0;
53  fProj = 0;
54  fOption = kNoOption;
55  fNDatapoints = 0;
56  fDatapoints = 0;
57 }
58 
59 ////////////////////////////////////////////////////////////////////////////////
60 /// TCandle TH1 data constructor.
61 
62 TCandle::TCandle(const Double_t candlePos, const Double_t candleWidth, TH1D *proj)
63  : TAttLine(), TAttFill(), TAttMarker()
64 {
65  //Preliminary values only, need to be calculated before paint
66  fMean = 0;
67  fMedian = 0;
68  fBoxUp = 0;
69  fBoxDown = 0;
70  fWhiskerUp = 0;
71  fWhiskerDown = 0;
72  fNDatapoints = 0;
73  fIsCalculated = 0;
74  fIsRaw = 0;
75  fPosCandleAxis = candlePos;
76  fCandleWidth = candleWidth;
77  fDatapoints = 0;
78  fProj = proj;
79  fDismiss = 0;
81  fLogX = 0;
82  fLogY = 0;
83 }
84 
85 ////////////////////////////////////////////////////////////////////////////////
86 /// TCandle default destructor.
87 
89 }
90 
91 ////////////////////////////////////////////////////////////////////////////////
92 /// Parsing of the option-string.
93 /// The option-string will be empty at the end (by-reference).
94 
95 int TCandle::ParseOption(char * opt) {
97  char *l;
98 
99  l = strstr(opt,"CANDLE");
100  if (l) {
101  const CandleOption fallbackCandle = (CandleOption)(kBox + kMedianLine + kMeanCircle + kWhiskerAll + kAnchor);
102 
103  char direction = ' ';
104  char preset = ' ';
105 
106  if (l[6] >= 'A' && l[6] <= 'Z') direction = l[6];
107  if (l[6] >= '1' && l[6] <= '9') preset = l[6];
108  if (l[7] >= 'A' && l[7] <= 'Z' && preset != ' ') direction = l[7];
109  if (l[7] >= '1' && l[7] <= '9' && direction != ' ') preset = l[7];
110 
111  if (direction == 'X' || direction == 'V') { /* nothing */ }
112  if (direction == 'Y' || direction == 'H') { fOption = (CandleOption)(fOption + kHorizontal); }
113  if (preset == '1') //Standard candle using old candle-definition
114  fOption = (CandleOption)(fOption + fallbackCandle);
115  if (preset == '2') //New standard candle with better whisker definition + outlier
117  if (preset == '3') //Like candle2 but with a fMean as a circle
119  if (preset == '4') //Like candle3 but showing the uncertainty of the fMedian as well
121  if (preset == '5') //Like candle2 but showing all datapoints
123  if (preset == '6') //Like candle2 but showing all datapoints scattered
125 
126  if (preset != ' ' && direction != ' ')
127  strncpy(l," ",8);
128  else if (preset != ' ' || direction != ' ')
129  strncpy(l," ",7);
130  else
131  strncpy(l," ",6);
132 
133  Bool_t useIndivOption = false;
134 
135  if (preset == ' ') { // Check if the user wants to set the properties individually
136  char *brOpen = strstr(opt,"(");
137  char *brClose = strstr(opt,")");
138  char indivOption[32];
139  if (brOpen && brClose) {
140  useIndivOption = true;
141  strncpy(indivOption, brOpen, brClose-brOpen +1); //Now the string "(....)" including brackets is in this array
142  sscanf(indivOption,"(%d)", (int*) &fOption);
143  strncpy(brOpen," ",brClose-brOpen+1); //Cleanup
144 
145  }
146  }
147  //Handle option "CANDLE" ,"CANDLEX" or "CANDLEY" to behave like "CANDLEX1" or "CANDLEY1"
148  if (!useIndivOption && !fOption ) {
149  fOption = fallbackCandle;
150  }
151  }
152  fIsCalculated = false;
153  return fOption;
154 
155 }
156 
157 ////////////////////////////////////////////////////////////////////////////////
158 /// Calculates all values needed by the candle definition depending on the
159 /// candle options.
160 
162  if (!fIsRaw && fProj) {
163  // Determining the quantiles
164  Double_t *prob = new Double_t[5];
165  prob[0]=1E-15; prob[1]=0.25; prob[2]=0.5; prob[3]=0.75; prob[4]=1-1E-15;
166  Double_t *quantiles = new Double_t[5];
167  quantiles[0]=0.; quantiles[1]=0.; quantiles[2] = 0.; quantiles[3] = 0.; quantiles[4] = 0.;
168 
169  fProj->GetQuantiles(5, quantiles, prob);
170 
171  // Check if the quantiles are valid, seems the under- and overflow is taken
172  // into account as well, we need to ignore this!
173  if (quantiles[0] >= quantiles[4]) return;
174  if (quantiles[1] >= quantiles[3]) return;
175 
176  // Definition of the candle in the standard case
177  fBoxUp = quantiles[3];
178  fBoxDown = quantiles[1];
179  fWhiskerUp = quantiles[4]; //Standard case
180  fWhiskerDown = quantiles[0]; //Standard case
181  fMedian = quantiles[2];
182  fMean = fProj->GetMean();
183 
184  Double_t iqr = fBoxUp-fBoxDown;
185 
186  if (IsOption(kWhisker15)) { // Improved whisker definition, with 1.5*iqr
187  int bin = fProj->FindBin(fBoxDown-1.5*iqr);
188  // extending only to the lowest data value within this range
189  while (fProj->GetBinContent(bin) == 0 && bin <= fProj->GetNbinsX()) bin++;
191 
192  bin = fProj->FindBin(fBoxUp+1.5*iqr);
193  while (fProj->GetBinContent(bin) == 0 && bin >= 1) bin--;
194  fWhiskerUp = fProj->GetBinCenter(bin);
195  }
196 
197  delete [] prob;
198  delete [] quantiles;
199  } else if (fIsRaw) {
200  }
201  fIsCalculated = true;
202 }
203 
204 ////////////////////////////////////////////////////////////////////////////////
205 /// Paint one candle with its current attributes.
206 
208 {
209  //If something was changed before, we need to recalculate some values
210  if (!fIsCalculated) Calculate();
211 
212  // Save the attributes as they were set originally
213  Style_t saveLine = GetLineStyle();
214  Style_t saveMarker = GetMarkerStyle();
215 
216  Double_t dimLeft = fPosCandleAxis-0.5*fCandleWidth;
217  Double_t dimRight = fPosCandleAxis+0.5*fCandleWidth;
218  Double_t iqr = fBoxUp-fBoxDown;
219  Double_t fMedianErr = 1.57*iqr/sqrt(fProj->GetEntries());
220 
224 
225  Bool_t swapXY = IsOption(kHorizontal);
226  Bool_t doLogY = (!(swapXY) && fLogY) || (swapXY && fLogX);
227  Bool_t doLogX = (!(swapXY) && fLogX) || (swapXY && fLogY);
228 
229  // From now on this is real painting only, no calculations anymore
230 
231  if (IsOption(kBox)) { // Draw a simple box
232  if (IsOption(kMedianNotched)) { // Check if we have to draw a box with notches
233  Double_t x[] = {dimLeft, dimLeft, dimLeft+fCandleWidth/3., dimLeft, dimLeft, dimRight,
234  dimRight, dimRight-fCandleWidth/3., dimRight, dimRight, dimLeft};
235  Double_t y[] = {fBoxDown, fMedian-fMedianErr, fMedian, fMedian+fMedianErr, fBoxUp, fBoxUp,
236  fMedian+fMedianErr, fMedian, fMedian-fMedianErr, fBoxDown, fBoxDown};
237  PaintBox(11, x, y, swapXY, kFALSE);
238  } else { // draw a simple box
239  Double_t x[] = {dimLeft, dimLeft, dimRight, dimRight, dimLeft};
240  Double_t y[] = {fBoxDown, fBoxUp, fBoxUp, fBoxDown, fBoxDown};
241  PaintBox(5, x, y, swapXY, kFALSE);
242  }
243  } else if (IsOption(kBoxFilled)) { // Draw a filled box
244  if (IsOption(kMedianNotched)) { // Check if we have to draw a box with notches
245  Double_t x[] = {dimLeft, dimLeft, dimLeft+fCandleWidth/3., dimLeft, dimLeft, dimRight,
246  dimRight, dimRight-fCandleWidth/3., dimRight, dimRight, dimLeft};
247  Double_t y[] = {fBoxDown, fMedian-fMedianErr, fMedian, fMedian+fMedianErr, fBoxUp, fBoxUp,
248  fMedian+fMedianErr, fMedian, fMedian-fMedianErr, fBoxDown, fBoxDown};
249  PaintBox(11, x, y, swapXY, kTRUE);
250  } else { // draw a simple box
251  Double_t x[] = {dimLeft, dimLeft, dimRight, dimRight, dimLeft};
252  Double_t y[] = {fBoxDown, fBoxUp, fBoxUp, fBoxDown, fBoxDown};
253  PaintBox(5, x, y, swapXY, kTRUE);
254  }
255  }
256 
257  if (IsOption(kAnchor)) { // Draw the anchor line
258  PaintLine(dimLeft, fWhiskerUp, dimRight, fWhiskerUp, swapXY);
259  PaintLine(dimLeft, fWhiskerDown, dimRight, fWhiskerDown, swapXY);
260  }
261 
262  if (IsOption(kWhiskerAll)) { // Whiskers are dashed
263  SetLineStyle(2);
267  SetLineStyle(saveLine);
269  } else if (IsOption(kWhisker15)) { // Whiskers without dashing, better whisker definition (done above)
272  }
273 
274  if (IsOption(kMedianLine)) { // Paint fMedian as a line
275  PaintLine(dimLeft, fMedian, dimRight, fMedian, swapXY);
276  } else if (IsOption(kMedianNotched)) { // Paint fMedian as a line (using notches, fMedian line is shorter)
277  PaintLine(dimLeft+fCandleWidth/3, fMedian, dimRight-fCandleWidth/3., fMedian, swapXY);
278  } else if (IsOption(kMedianCircle)) { // Paint fMedian circle
279  Double_t myMedianX[1], myMedianY[1];
280  if (!swapXY) {
281  myMedianX[0] = fPosCandleAxis;
282  myMedianY[0] = fMedian;
283  } else {
284  myMedianX[0] = fMedian;
285  myMedianY[0] = fPosCandleAxis;
286  }
287 
288  Bool_t isValid = true;
289  if (doLogX) {
290  if (myMedianX[0] > 0) myMedianX[0] = TMath::Log10(myMedianX[0]); else isValid = false;
291  }
292  if (doLogY) {
293  if (myMedianY[0] > 0) myMedianY[0] = TMath::Log10(myMedianY[0]); else isValid = false;
294  }
295 
296  SetMarkerStyle(24);
298 
299  if (isValid) gPad->PaintPolyMarker(1,myMedianX,myMedianY); // A circle for the fMedian
300 
301  SetMarkerStyle(saveMarker);
303 
304  }
305 
306  if (IsOption(kMeanCircle)) { // Paint fMean as a circle
307  Double_t myMeanX[1], myMeanY[1];
308  if (!swapXY) {
309  myMeanX[0] = fPosCandleAxis;
310  myMeanY[0] = fMean;
311  } else {
312  myMeanX[0] = fMean;
313  myMeanY[0] = fPosCandleAxis;
314  }
315 
316  Bool_t isValid = true;
317  if (doLogX) {
318  if (myMeanX[0] > 0) myMeanX[0] = TMath::Log10(myMeanX[0]); else isValid = false;
319  }
320  if (doLogY) {
321  if (myMeanY[0] > 0) myMeanY[0] = TMath::Log10(myMeanY[0]); else isValid = false;
322  }
323 
324  SetMarkerStyle(24);
326 
327  if (isValid) gPad->PaintPolyMarker(1,myMeanX,myMeanY); // A circle for the fMean
328 
329  SetMarkerStyle(saveMarker);
331 
332  } else if (IsOption(kMeanLine)) { // Paint fMean as a dashed line
333  SetLineStyle(2);
335 
336  PaintLine(dimLeft, fMean, dimRight, fMean, swapXY);
337  SetLineStyle(saveLine);
339 
340  }
341 
342  if (IsOption(kAnchor)) { //Draw standard anchor
343  PaintLine(dimLeft, fWhiskerDown, dimRight, fWhiskerDown, swapXY); // the lower anchor line
344  PaintLine(dimLeft, fWhiskerUp, dimRight, fWhiskerUp, swapXY); // the upper anchor line
345  }
346 
347  // This is a bit complex. All values here are handled as outliers. Usually
348  // only the datapoints outside the whiskers are shown.
349  // One can show them in one row as crosses, or scattered randomly. If activated
350  // all datapoint are shown in the same way
351  TRandom2 random;
352  if (GetCandleOption(5) > 0) { //Draw outliers
353  const int maxOutliers = kNMAX;
354  Double_t outliersX[maxOutliers];
355  Double_t outliersY[maxOutliers];
356  Double_t myScale = 1.;
357  if (fProj->GetEntries() > maxOutliers/2) myScale = fProj->GetEntries()/(maxOutliers/2.);
358  int nOutliers = 0;
359  for (int bin = 0; bin < fProj->GetNbinsX(); bin++) {
360  // Either show them only outside the whiskers, or all of them
361  if (fProj->GetBinContent(bin) > 0 && (fProj->GetBinCenter(bin) < fWhiskerDown || fProj->GetBinCenter(bin) > fWhiskerUp || (GetCandleOption(5) > 1)) ) {
362  Double_t scaledBinContent = fProj->GetBinContent(bin)/myScale;
363  if (scaledBinContent >0 && scaledBinContent < 1) scaledBinContent = 1; //Outliers have a typical bincontent between 0 and 1, when scaling they would disappear
364  for (int j=0; j < (int)scaledBinContent; j++) {
365  if (nOutliers >= maxOutliers) break;
366  if (IsOption(kPointsAllScat)) { //Draw outliers and "all" values scattered
367  outliersX[nOutliers] = fPosCandleAxis - fCandleWidth/2. + fCandleWidth*random.Rndm();
368  outliersY[nOutliers] = fProj->GetBinLowEdge(bin) + fProj->GetBinWidth(bin)*random.Rndm();
369  } else { //Draw them in the "candle line"
370  outliersX[nOutliers] = fPosCandleAxis;
371  if ((int)scaledBinContent == 1) //If there is only one datapoint available put it in the middle of the bin
372  outliersY[nOutliers] = fProj->GetBinCenter(bin);
373  else //If there is more than one datapoint scatter it along the bin, otherwise all marker would be (invisibly) stacked on top of each other
374  outliersY[nOutliers] = fProj->GetBinLowEdge(bin) + fProj->GetBinWidth(bin)*random.Rndm();
375  }
376  if (swapXY) {
377  //Swap X and Y
378  Double_t keepCurrently;
379  keepCurrently = outliersX[nOutliers];
380  outliersX[nOutliers] = outliersY[nOutliers];
381  outliersY[nOutliers] = keepCurrently;
382  }
383  // Continue fMeans, that nOutliers is not increased, so that value will not be shown
384  if (doLogX) {
385  if (outliersX[nOutliers] > 0) outliersX[nOutliers] = TMath::Log10(outliersX[nOutliers]); else continue;
386  }
387  if (doLogY) {
388  if (outliersY[nOutliers] > 0) outliersY[nOutliers] = TMath::Log10(outliersY[nOutliers]); else continue;
389  }
390  nOutliers++;
391  }
392  }
393  if (nOutliers > maxOutliers) { //Should never happen, due to myScale!!!
394  Error ("PaintCandlePlot","Not possible to draw all outliers.");
395  break;
396  }
397  }
398 
399  if (IsOption(kPointsAllScat)) { //Draw outliers and "all" values scattered
400  SetMarkerStyle(0);
401  } else {
402  SetMarkerStyle(5);
403  }
405  gPad->PaintPolyMarker(nOutliers,outliersX, outliersY);
406  }
407 }
408 
409 ////////////////////////////////////////////////////////////////////////////////
410 /// Return true is this option is activated in fOption
411 
413  int myOpt = 9;
414  int pos = 0;
415  for (pos = 0; pos < 7; pos++) {
416  if (myOpt > opt) break;
417  else myOpt *=10;
418  }
419  myOpt /= 9;
420  int thisOpt = GetCandleOption(pos);
421 
422  return ((thisOpt * myOpt) == opt);
423 }
424 
425 ////////////////////////////////////////////////////////////////////////////////
426 /// Paint a box for candle.
427 
429 {
430  Bool_t doLogY = (!(swapXY) && fLogY) || (swapXY && fLogX);
431  Bool_t doLogX = (!(swapXY) && fLogX) || (swapXY && fLogY);
432  if (doLogY) {
433  for (int i=0; i<nPoints; i++) {
434  if (y[i] > 0) y[i] = TMath::Log10(y[i]);
435  else return;
436  }
437  }
438  if (doLogX) {
439  for (int i=0; i<nPoints; i++) {
440  if (x[i] > 0) x[i] = TMath::Log10(x[i]);
441  else return;
442  }
443  }
444  if (!swapXY) {
445  if (fill) gPad->PaintFillArea(nPoints, x, y);
446 
447  gPad->PaintPolyLine(nPoints, x, y);
448  } else {
449  if (fill) gPad->PaintFillArea(nPoints, y, x);
450  gPad->PaintPolyLine(nPoints, y, x);
451  }
452 }
453 
454 ////////////////////////////////////////////////////////////////////////////////
455 /// Paint a line for candle.
456 
458 {
459  Bool_t doLogY = (!(swapXY) && fLogY) || (swapXY && fLogX);
460  Bool_t doLogX = (!(swapXY) && fLogX) || (swapXY && fLogY);
461  if (doLogY) {
462  if (y1 > 0) y1 = TMath::Log10(y1); else return;
463  if (y2 > 0) y2 = TMath::Log10(y2); else return;
464  }
465  if (doLogX) {
466  if (x1 > 0) x1 = TMath::Log10(x1); else return;
467  if (x2 > 0) x2 = TMath::Log10(x2); else return;
468  }
469  if (!swapXY) {
470  gPad->PaintLine(x1, y1, x2, y2);
471  } else {
472  gPad->PaintLine(y1, x1, y2, x2);
473  }
474 }
475 
476 ////////////////////////////////////////////////////////////////////////////////
477 /// Stream an object of class TCandle.
478 
479 void TCandle::Streamer(TBuffer &R__b)
480 {
481  if (R__b.IsReading()) {
482  UInt_t R__s, R__c;
483  Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
484  if (R__v > 3) {
485  R__b.ReadClassBuffer(TCandle::Class(), this, R__v, R__s, R__c);
486  return;
487  }
488  } else {
489  R__b.WriteClassBuffer(TCandle::Class(),this);
490  }
491 }
virtual Style_t GetLineStyle() const
Return the line style.
Definition: TAttLine.h:40
virtual Int_t FindBin(Double_t x, Double_t y=0, Double_t z=0)
Return Global bin number corresponding to x,y,z.
Definition: TH1.cxx:3442
TCandle()
TCandle default constructor.
Definition: TCandle.cxx:38
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
Double_t fMedian
Position of the median.
Definition: TCandle.h:63
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
Definition: TH1.cxx:4640
short Style_t
Definition: RtypesCore.h:76
Bool_t IsReading() const
Definition: TBuffer.h:83
short Version_t
Definition: RtypesCore.h:61
Double_t fWhiskerUp
Position of the upper whisker end.
Definition: TCandle.h:66
bool IsOption(CandleOption opt)
Return true is this option is activated in fOption.
Definition: TCandle.cxx:412
const char Option_t
Definition: RtypesCore.h:62
Random number generator class based on the maximally quidistributed combined Tausworthe generator by ...
Definition: TRandom2.h:29
Double_t fNDatapoints
Number of Datapoints within this candle.
Definition: TCandle.h:70
fill
Definition: fit1_py.py:6
virtual Int_t GetQuantiles(Int_t nprobSum, Double_t *q, const Double_t *probSum=0)
Compute Quantiles for this histogram Quantile x_q of a probability distribution Function F is defined...
Definition: TH1.cxx:4192
Buffer base class used for serializing objects.
Definition: TBuffer.h:42
int ParseOption(char *optin)
Parsing of the option-string.
Definition: TCandle.cxx:95
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
const Bool_t kFALSE
Definition: Rtypes.h:92
virtual Int_t GetNbinsX() const
Definition: TH1.h:301
Double_t * fDatapoints
position of all Datapoints within this candle
Definition: TCandle.h:69
virtual void Modify()
Change current line attributes if necessary.
Definition: TAttLine.cxx:232
const char * Class
Definition: TXMLSetup.cxx:64
virtual Double_t GetEntries() const
Return the current number of entries.
Definition: TH1.cxx:4055
void PaintLine(Double_t x1, Double_t y1, Double_t x2, Double_t y2, Bool_t swapXY)
Paint a line for candle.
Definition: TCandle.cxx:457
Double_t fMean
Position of the mean.
Definition: TCandle.h:62
virtual Double_t GetBinWidth(Int_t bin) const
Return bin width for 1D histogram.
Definition: TH1.cxx:8230
Marker Attributes class.
Definition: TAttMarker.h:24
double sqrt(double)
static const double x2[5]
Fill Area Attributes class.
Definition: TAttFill.h:24
bool fIsCalculated
Definition: TCandle.h:55
Double_t x[n]
Definition: legend1.C:17
virtual Double_t GetBinLowEdge(Int_t bin) const
Return bin lower edge for 1D histogram.
Definition: TH1.cxx:8219
Double_t fCandleWidth
The candle width.
Definition: TCandle.h:60
int fLogX
Definition: TCandle.h:73
virtual void Modify()
Change current fill area attributes if necessary.
Definition: TAttFill.cxx:209
Double_t Log10(Double_t x)
Definition: TMath.h:529
void Error(const char *location, const char *msgfmt,...)
Double_t fBoxDown
Position of the lower box end.
Definition: TCandle.h:65
const Int_t kNMAX
Definition: TCandle.cxx:33
virtual void Modify()
Change current marker attributes if necessary.
Definition: TAttMarker.cxx:204
virtual Double_t GetBinCenter(Int_t bin) const
Return bin center for 1D histogram.
Definition: TH1.cxx:8208
Double_t fBoxUp
Position of the upper box end.
Definition: TCandle.h:64
virtual Double_t GetMean(Int_t axis=1) const
For axis = 1,2 or 3 returns the mean value of the histogram along X,Y or Z axis.
Definition: TH1.cxx:6717
int fLogY
Definition: TCandle.h:74
The candle plot painter class.
Definition: TCandle.h:31
unsigned int UInt_t
Definition: RtypesCore.h:42
void Calculate()
Calculates all values needed by the candle definition depending on the candle options.
Definition: TCandle.cxx:161
Double_t E()
Definition: TMath.h:54
TLine * l
Definition: textangle.C:4
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
Definition: TAttMarker.h:45
tomato 1-D histogram with a double per channel (see TH1 documentation)}
Definition: TH1.h:618
virtual void Paint(Option_t *option="")
Paint one candle with its current attributes.
Definition: TCandle.cxx:207
void PaintBox(Int_t nPoints, Double_t *x, Double_t *y, Bool_t swapXY, Bool_t fill)
Paint a box for candle.
Definition: TCandle.cxx:428
bool fDismiss
True if the candle cannot be painted.
Definition: TCandle.h:57
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=0)=0
virtual Double_t Rndm()
TausWorth generator from L&#39;Ecuyer, uses as seed 3x32bits integers Use a mask of 0xffffffffUL to make ...
Definition: TRandom2.cxx:58
static const double x1[5]
#define ClassImp(name)
Definition: Rtypes.h:279
TH1D * fProj
Definition: TCandle.h:56
double Double_t
Definition: RtypesCore.h:55
CandleOption fOption
Setting the style of the candle.
Definition: TCandle.h:72
Double_t y[n]
Definition: legend1.C:17
int GetCandleOption(const int pos)
Definition: TCandle.h:78
CandleOption
Definition: TCandle.h:34
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
Definition: TAttLine.h:48
Double_t fWhiskerDown
Position of the lower whisker end.
Definition: TCandle.h:67
Double_t fPosCandleAxis
x-pos for a vertical candle
Definition: TCandle.h:59
#define gPad
Definition: TVirtualPad.h:289
virtual ~TCandle()
TCandle default destructor.
Definition: TCandle.cxx:88
bool fIsRaw
0: for TH1 projection, 1: using raw data
Definition: TCandle.h:54
virtual Style_t GetMarkerStyle() const
Return the marker style.
Definition: TAttMarker.h:37
const Bool_t kTRUE
Definition: Rtypes.h:91
Line Attributes class.
Definition: TAttLine.h:24
virtual Version_t ReadVersion(UInt_t *start=0, UInt_t *bcnt=0, const TClass *cl=0)=0