![]() |
ROOT 6.14/05 Reference Guide |
The candle plot painter class.
Instances of this class are generated by the histograms painting classes (THistPainter and THStack) when an candle plot (box plot) is drawn. TCandle is the "painter class" of the box plots. Therefore it is never used directly to draw a candle.
Public Types | |
enum | CandleOption : long { kNoOption = 0, kBox = 1, kMedianLine = 10, kMedianNotched = 20, kMedianCircle = 30, kMeanLine = 100, kMeanCircle = 300, kWhiskerAll = 1000, kWhisker15 = 2000, kAnchor = 10000, kPointsOutliers = 100000, kPointsAll = 200000, kPointsAllScat = 300000, kHistoLeft = 1000000, kHistoRight = 2000000, kHistoViolin = 3000000, kHistoZeroIndicator = 10000000, kHorizontal = 100000000 } |
Public Member Functions | |
TCandle () | |
TCandle default constructor. More... | |
TCandle (const char *opt) | |
TCandle constructor passing a draw-option. More... | |
TCandle (const Double_t candlePos, const Double_t candleWidth, Long64_t n, Double_t *points) | |
TCandle constructor for raw-data candles. More... | |
TCandle (const Double_t candlePos, const Double_t candleWidth, TH1D *proj) | |
TCandle TH1 data constructor. More... | |
TCandle (const TCandle &candle) | |
virtual | ~TCandle () |
TCandle default destructor. More... | |
void | ConvertToPadCoords (Double_t minAxis, Double_t maxAxis, Double_t axisMinCoord, Double_t axisMaxCoord) |
The coordinates in the TParallelCoordVar-class are in Pad-Coordinates, so we need to convert them. More... | |
const char * | GetDrawOption () |
Double_t | GetMean () const |
Double_t | GetMedian () const |
long | GetOption () |
Double_t | GetQ1 () const |
Double_t | GetQ2 () const |
Double_t | GetQ3 () const |
Bool_t | IsCandleScaled () |
Bool_t | IsHorizontal () |
bool | IsOption (CandleOption opt) |
Return true is this option is activated in fOption. More... | |
Bool_t | IsVertical () |
Bool_t | IsViolinScaled () |
virtual void | Paint (Option_t *option="") |
Paint one candle with its current attributes. More... | |
int | ParseOption (char *optin) |
Parsing of the option-string. More... | |
void | SetAxisPosition (const Double_t candlePos) |
void | SetCandleWidth (const Double_t width) |
void | SetHistogram (TH1D *proj) |
void | SetHistoWidth (const Double_t width) |
void | SetLog (int x, int y, int z) |
virtual void | SetMean (Double_t mean) |
virtual void | SetMedian (Double_t median) |
void | SetOption (CandleOption opt) |
virtual void | SetQ1 (Double_t q1) |
virtual void | SetQ2 (Double_t q2) |
virtual void | SetQ3 (Double_t q3) |
![]() | |
TAttLine () | |
AttLine default constructor. More... | |
TAttLine (Color_t lcolor, Style_t lstyle, Width_t lwidth) | |
AttLine normal constructor. More... | |
virtual | ~TAttLine () |
AttLine destructor. More... | |
void | Copy (TAttLine &attline) const |
Copy this line attributes to a new TAttLine. More... | |
Int_t | DistancetoLine (Int_t px, Int_t py, Double_t xp1, Double_t yp1, Double_t xp2, Double_t yp2) |
Compute distance from point px,py to a line. More... | |
virtual Color_t | GetLineColor () const |
Return the line color. More... | |
virtual Style_t | GetLineStyle () const |
Return the line style. More... | |
virtual Width_t | GetLineWidth () const |
Return the line width. More... | |
virtual void | Modify () |
Change current line attributes if necessary. More... | |
virtual void | ResetAttLine (Option_t *option="") |
Reset this line attributes to default values. More... | |
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. More... | |
virtual void | SetLineAttributes () |
Invoke the DialogCanvas Line attributes. More... | |
virtual void | SetLineColor (Color_t lcolor) |
Set the line color. More... | |
virtual void | SetLineColorAlpha (Color_t lcolor, Float_t lalpha) |
Set a transparent line color. More... | |
virtual void | SetLineStyle (Style_t lstyle) |
Set the line style. More... | |
virtual void | SetLineWidth (Width_t lwidth) |
Set the line width. More... | |
![]() | |
TAttFill () | |
AttFill default constructor. More... | |
TAttFill (Color_t fcolor, Style_t fstyle) | |
AttFill normal constructor. More... | |
virtual | ~TAttFill () |
AttFill destructor. More... | |
void | Copy (TAttFill &attfill) const |
Copy this fill attributes to a new TAttFill. More... | |
virtual Color_t | GetFillColor () const |
Return the fill area color. More... | |
virtual Style_t | GetFillStyle () const |
Return the fill area style. More... | |
virtual Bool_t | IsTransparent () const |
virtual void | Modify () |
Change current fill area attributes if necessary. More... | |
virtual void | ResetAttFill (Option_t *option="") |
Reset this fill attributes to default values. More... | |
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. More... | |
virtual void | SetFillAttributes () |
Invoke the DialogCanvas Fill attributes. More... | |
virtual void | SetFillColor (Color_t fcolor) |
Set the fill area color. More... | |
virtual void | SetFillColorAlpha (Color_t fcolor, Float_t falpha) |
Set a transparent fill color. More... | |
virtual void | SetFillStyle (Style_t fstyle) |
Set the fill area style. More... | |
![]() | |
TAttMarker () | |
TAttMarker default constructor. More... | |
TAttMarker (Color_t color, Style_t style, Size_t msize) | |
TAttMarker normal constructor. More... | |
virtual | ~TAttMarker () |
TAttMarker destructor. More... | |
void | Copy (TAttMarker &attmarker) const |
Copy this marker attributes to a new TAttMarker. More... | |
virtual Color_t | GetMarkerColor () const |
Return the marker color. More... | |
virtual Size_t | GetMarkerSize () const |
Return the marker size. More... | |
virtual Style_t | GetMarkerStyle () const |
Return the marker style. More... | |
virtual void | Modify () |
Change current marker attributes if necessary. More... | |
virtual void | ResetAttMarker (Option_t *toption="") |
Reset this marker attributes to the default values. More... | |
virtual void | SaveMarkerAttributes (std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t sizdef=1) |
Save line attributes as C++ statement(s) on output stream out. More... | |
virtual void | SetMarkerAttributes () |
Invoke the DialogCanvas Marker attributes. More... | |
virtual void | SetMarkerColor (Color_t mcolor=1) |
Set the marker color. More... | |
virtual void | SetMarkerColorAlpha (Color_t mcolor, Float_t malpha) |
Set a transparent marker color. More... | |
virtual void | SetMarkerSize (Size_t msize=1) |
Set the marker size. More... | |
virtual void | SetMarkerStyle (Style_t mstyle=1) |
Set the marker style. More... | |
Static Public Member Functions | |
static void | SetBoxRange (const Double_t bRange) |
Static function to set fBoxRange, by setting whisker-range, one can force the box of the candle-chart to cover that given fraction of the distribution. More... | |
static void | SetScaledCandle (const Bool_t cScale=true) |
Static function to set scaling between candles-withs. More... | |
static void | SetScaledViolin (const Bool_t vScale=true) |
Static function to set scaling between violin-withs. More... | |
static void | SetWhiskerRange (const Double_t wRange) |
Static function to set fWhiskerRange, by setting whisker-range, one can force the whiskers to cover the fraction of the distribution. More... | |
Protected Member Functions | |
void | Calculate () |
Calculates all values needed by the candle definition depending on the candle options. More... | |
int | GetCandleOption (const int pos) |
void | PaintBox (Int_t nPoints, Double_t *x, Double_t *y, Bool_t swapXY) |
Paint a box for candle. More... | |
void | PaintLine (Double_t x1, Double_t y1, Double_t x2, Double_t y2, Bool_t swapXY) |
Paint a line for candle. More... | |
Protected Attributes | |
Double_t | fAxisMax |
The Maximum which is visible by the axis (used by zero indicator) More... | |
Double_t | fAxisMin |
The Minimum which is visible by the axis (used by zero indicator) More... | |
Double_t | fBoxDown |
Position of the lower box end. More... | |
Double_t | fBoxUp |
Position of the upper box end. More... | |
Double_t | fCandleWidth |
The candle width. More... | |
Double_t * | fDatapoints |
position of all Datapoints within this candle More... | |
bool | fDismiss |
True if the candle cannot be painted. More... | |
Double_t | fDrawPointsX [kNMAXPOINTS] |
x-coord for every outlier, .. More... | |
Double_t | fDrawPointsY [kNMAXPOINTS] |
y-coord for every outlier, .. More... | |
Double_t | fHistoPointsX [kNMAXPOINTS] |
x-coord for the polyline of the histo More... | |
Double_t | fHistoPointsY [kNMAXPOINTS] |
y-coord for the polyline of the histo More... | |
Double_t | fHistoWidth |
The histo width (the height of the max bin) More... | |
bool | fIsCalculated |
bool | fIsRaw |
0: for TH1 projection, 1: using raw data More... | |
int | fLogX |
make the candle appear logx-like More... | |
int | fLogY |
make the candle appear logy-like More... | |
int | fLogZ |
make the candle appear logz-like More... | |
Double_t | fMean |
Position of the mean. More... | |
Double_t | fMedian |
Position of the median. More... | |
Double_t | fMedianErr |
The size of the notch. More... | |
Long64_t | fNDatapoints |
Number of Datapoints within this candle. More... | |
Long64_t | fNDrawPoints |
max number of outliers or other point to be shown More... | |
int | fNHistoPoints |
CandleOption | fOption |
Setting the style of the candle. More... | |
char | fOptionStr [128] |
String to draw the candle. More... | |
Double_t | fPosCandleAxis |
x-pos for a vertical candle More... | |
TH1D * | fProj |
Double_t | fWhiskerDown |
Position of the lower whisker end. More... | |
Double_t | fWhiskerUp |
Position of the upper whisker end. More... | |
![]() | |
Color_t | fLineColor |
Line color. More... | |
Style_t | fLineStyle |
Line style. More... | |
Width_t | fLineWidth |
Line width. More... | |
![]() | |
Color_t | fFillColor |
Fill area color. More... | |
Style_t | fFillStyle |
Fill area style. More... | |
![]() | |
Color_t | fMarkerColor |
Marker color. More... | |
Size_t | fMarkerSize |
Marker size. More... | |
Style_t | fMarkerStyle |
Marker style. More... | |
Static Protected Attributes | |
static Double_t | fBoxRange = 0.5 |
The fraction which is covered by the box (0 < x < 1), default 0.5. More... | |
static Bool_t | fScaledCandle = false |
shall the box-width be scaled to each other by the integral of a box? More... | |
static Bool_t | fScaledViolin = true |
shall the violin or histos be scaled to each other by the maximum height? More... | |
static Double_t | fWhiskerRange = 1.0 |
The fraction which is covered by the whiskers (0 < x < 1), default 1. More... | |
#include <TCandle.h>
enum TCandle::CandleOption : long |
TCandle::TCandle | ( | ) |
TCandle default constructor.
Definition at line 41 of file TCandle.cxx.
TCandle::TCandle | ( | const char * | opt | ) |
TCandle constructor passing a draw-option.
Definition at line 73 of file TCandle.cxx.
TCandle::TCandle | ( | const Double_t | candlePos, |
const Double_t | candleWidth, | ||
Long64_t | n, | ||
Double_t * | points | ||
) |
TCandle constructor for raw-data candles.
Definition at line 113 of file TCandle.cxx.
Definition at line 147 of file TCandle.cxx.
TCandle::TCandle | ( | const TCandle & | candle | ) |
|
virtual |
TCandle default destructor.
Definition at line 181 of file TCandle.cxx.
|
protected |
Calculates all values needed by the candle definition depending on the candle options.
Definition at line 385 of file TCandle.cxx.
void TCandle::ConvertToPadCoords | ( | Double_t | minAxis, |
Double_t | maxAxis, | ||
Double_t | axisMinCoord, | ||
Double_t | axisMaxCoord | ||
) |
The coordinates in the TParallelCoordVar-class are in Pad-Coordinates, so we need to convert them.
Definition at line 932 of file TCandle.cxx.
|
inlineprotected |
Bool_t TCandle::IsCandleScaled | ( | ) |
Definition at line 185 of file TCandle.cxx.
bool TCandle::IsOption | ( | CandleOption | opt | ) |
Return true is this option is activated in fOption.
Definition at line 849 of file TCandle.cxx.
Bool_t TCandle::IsViolinScaled | ( | ) |
Definition at line 190 of file TCandle.cxx.
Paint one candle with its current attributes.
Definition at line 674 of file TCandle.cxx.
Paint a box for candle.
Definition at line 865 of file TCandle.cxx.
|
protected |
Paint a line for candle.
Definition at line 893 of file TCandle.cxx.
int TCandle::ParseOption | ( | char * | opt | ) |
Parsing of the option-string.
The option-string will be empty at the end (by-reference).
Definition at line 244 of file TCandle.cxx.
Static function to set fBoxRange, by setting whisker-range, one can force the box of the candle-chart to cover that given fraction of the distribution.
Set bRange between 0 and 1. Default is 0.5 TCandle::SetBoxRange(0.68) will set all candle-charts to cover 68% of the distribution by the box
Definition at line 217 of file TCandle.cxx.
|
inline |
Static function to set scaling between candles-withs.
A candle containing 100 entries with be two times wider than a candle containing 50 entries
Definition at line 227 of file TCandle.cxx.
Static function to set scaling between violin-withs.
A violin or histo chart with a maximum bin content to 100 will be two times as high as a violin with a maximum bin content of 50
Definition at line 236 of file TCandle.cxx.
Static function to set fWhiskerRange, by setting whisker-range, one can force the whiskers to cover the fraction of the distribution.
Set wRange between 0 and 1. Default is 1 TCandle::SetWhiskerRange(0.95) will set all candle-charts to cover 95% of the distribution with the whiskers. Can only be used with the standard-whisker definition
Definition at line 203 of file TCandle.cxx.
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
staticprotected |
|
protected |
|
staticprotected |
|
protected |