111 Error(
"AddRange",
"You must create a selection before adding ranges.");
133 if(!
gPad)
return 9999;
143 if (dist<=0.005)
return 0;
173 if (noOwnedRange)
return kTRUE;
174 else return inarange;
187 static Int_t pxold, pyold;
189 static Int_t pzoomold;
192 Int_t px1,px2,py1,py2,
n=-1;
211 if(
gPad->AbsPixeltoX(px)-
fX1 > 0){
221 if(
gPad->AbsPixeltoY(py)-
fY1 > 0){
251 min = max; max = mem;
273 else if (n<fParallel->GetVarList()->IndexOf(
this)) ++
n;
288 gVirtualX->DrawLine(pxold,py1,pxold,py2);
299 gVirtualX->DrawLine(px1,pyold,px2,pyold);
396 static char info[128];
399 if (!
gPad)
return info;
432 quantiles[0]=0.; quantiles[1]=0.; quantiles[2] = 0.;
434 prob[0]=0.25; prob[1]=0.5; prob[2] = 0.75;
445 else val[selected] =
fVal[
n];
452 else val[selected] =
fVal[
n];
459 fQua1 = quantiles[0];
461 fQua3 = quantiles[2];
490 if(value < fMinCurrent || value >
fMaxCurrent)
return;
569 box->SetLineWidth(1);
571 box->SetLineStyle(1);
572 box->SetFillStyle(0);
580 if (boxSize >= 0.03) boxSize = 0.03;
624 if (min<frame->GetY1()) min = frame->
GetY1();
629 if (min<frame->GetX1()) min = frame->
GetX1();
637 else box->PaintBox(qua1,
fY1-boxSize,qua3,
fY1+boxSize);
688 for (i=1; i<=
fNbins; i++) {
693 b->PaintBox(
fX1,y1,
x2,y2,
"l");
703 for (i=1; i<=
fNbins; i++) {
736 for (i=1; i<=
fNbins; i++) {
751 for (i=1; i<=
fNbins; i++) {
776 if (
fX1-0.5*tlength<0.01) {
780 }
else if (
fX1+0.5*tlength > 0.99) {
798 if (
fX1-0.04-tlength<0.01) {
822 printf(
"at x1=%f, y1=%f, x2=%f, y2=%f.\n",
fX1,
fY1,
fX2,
fY2);
835 out<<
" var->SetBit(TParallelCoordVar::kLogScale,"<<
TestBit(
kLogScale)<<
");"<<std::endl;
836 out<<
" var->SetBit(TParallelCoordVar::kShowBox,"<<
TestBit(
kShowBox)<<
");"<<std::endl;
838 out<<
" var->SetHistogramBinning("<<
fNbins<<
");"<<std::endl;
839 out<<
" var->SetHistogramLineWidth("<<
fHistoLW<<
");"<<std::endl;
840 out<<
" var->SetInitMin("<<
fMinInit<<
");"<<std::endl;
841 out<<
" var->SetInitMax("<<
fMaxInit<<
");"<<std::endl;
842 out<<
" var->SetHistogramHeight("<<
fHistoHeight<<
");"<<std::endl;
843 out<<
" var->GetMinMaxMean();"<<std::endl;
844 out<<
" var->GetHistogram();"<<std::endl;
845 out<<
" var->SetFillStyle("<<
GetFillStyle()<<
");"<<std::endl;
846 out<<
" var->SetFillColor("<<
GetFillColor()<<
");"<<std::endl;
847 out<<
" var->SetLineColor("<<
GetLineColor()<<
");"<<std::endl;
848 out<<
" var->SetLineWidth("<<
GetLineWidth()<<
");"<<std::endl;
849 out<<
" var->SetLineStyle("<<
GetLineStyle()<<
");"<<std::endl;
855 out<<
" //***************************************"<<std::endl;
856 out<<
" // Create the "<<i<<
"th range owned by the axis \""<<
GetTitle()<<
"\"."<<std::endl;
857 out<<
" TParallelCoordSelect* sel = para->GetSelection(\""<<range->
GetSelection()->
GetTitle()<<
"\");"<<std::endl;
858 out<<
" TParallelCoordRange* newrange = new TParallelCoordRange(var,"<<range->
GetMin()<<
","<<range->
GetMax()<<
",sel);"<<std::endl;
859 out<<
" var->AddRange(newrange);"<<std::endl;
860 out<<
" sel->Add(newrange);"<<std::endl;
982 for (
Long64_t li = 0; li < length; ++li)
fVal[li] = val[li];
static const double x2[5]
static const double x1[5]
char * Form(const char *fmt,...)
R__EXTERN TStyle * gStyle
Fill Area Attributes class.
virtual Color_t GetFillColor() const
Return the fill area color.
virtual Style_t GetFillStyle() const
Return the fill area style.
virtual Color_t GetLineColor() const
Return the line color.
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
virtual Width_t GetLineWidth() const
Return the line width.
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
virtual Style_t GetLineStyle() const
Return the line style.
virtual Float_t GetTextSize() const
Return the text size.
virtual void SetTextAlign(Short_t align=11)
Set the text alignment.
virtual void SetTextSize(Float_t tsize=1)
Set the text size.
Bool_t Contains(const char *name) const
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
1-D histogram with a float per channel (see TH1 documentation)}
virtual void SetDirectory(TDirectory *dir)
By default, when a histogram is created, it is added to the list of histogram objects in the current ...
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...
virtual Int_t Fill(Double_t x)
Increment bin with abscissa X by 1.
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
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...
To draw Mathematical Formula.
Double_t GetXsize()
Return size of the formula along X in pad coordinates when the text precision is smaller than 3.
virtual void PaintLatex(Double_t x, Double_t y, Double_t angle, Double_t size, const char *text)
Main drawing function.
virtual void Paint(Option_t *option="")
Paint.
Use the TLine constructor to create a simple line.
virtual void PaintLine(Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Draw this line with new coordinates.
virtual void Add(TObject *obj)
virtual TObject * Remove(TObject *obj)
Remove object from the list.
virtual void AddAt(TObject *obj, Int_t idx)
Insert object at position idx in the list.
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
The TNamed class is the base class for all named ROOT classes.
virtual const char * GetTitle() const
Returns title of object.
virtual const char * GetName() const
Returns name of object.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual void AppendPad(Option_t *option="")
Append graphics object to current pad.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
A TParallelCoordRange is a range used for parallel coordinates plots.
Bool_t IsIn(Double_t evtval)
Evaluate if the given value is within the range or not.
virtual void Paint(Option_t *options)
Paint a TParallelCoordRange.
virtual Double_t GetMin()
TParallelCoordSelect * GetSelection()
virtual Double_t GetMax()
A TParallelCoordSelect is a specialised TList to hold TParallelCoordRanges used by TParallelCoord.
const char * GetTitle() const
Returns title of object.
TH1F * fHistogram
! Histogram holding the variable distribution.
TH1F * GetHistogram()
Create or recreate the histogram.
void GetEntryXY(Long64_t n, Double_t &x, Double_t &y)
Get the position of the variable on the graph for the n'th entry.
Double_t GetValuefromXY(Double_t x, Double_t y)
Get the value corresponding to the position.
void SetLogScale(Bool_t log)
Set the axis in log scale.
void PaintBoxPlot()
Paint the boxes in the case of a candle chart.
void PaintLabels()
Paint the axis labels and titles.
void PaintHistogram()
Paint the histogram on the axis.
Double_t fY1
y1 coordinate of the axis.
void SetCurrentMin(Double_t min)
Set the current minimum of the axis.
void SavePrimitive(std::ostream &out, Option_t *options)
Save the TParallelCoordVar as a macro.
virtual void Print(Option_t *option="") const
Print the axis main data.
void SetLiveRangesUpdate(Bool_t on)
If true, the pad is updated while the motion of a dragged range.
Double_t fX1
x1 coordinate of the axis.
void SetX(Double_t x, Bool_t gl)
Set the X position of the axis in the case of a vertical axis.
void SetY(Double_t y, Bool_t gl)
Set the Y position of the axis in the case of a horizontal axis.
void SetBoxPlot(Bool_t box)
Set the axis to display a candle.
Double_t fMaxInit
Memory of the maximum when first initialized.
void SetCurrentMax(Double_t max)
Set the current maximum of the axis.
TList * fRanges
List of the TParallelRange owned by TParallelCoordVar.
void GetQuantiles()
Get the box plot values (quantiles).
Double_t fMinCurrent
Current used minimum.
void SetHistogramHeight(Double_t h=0)
Set the height of the bar histogram.
void DeleteVariable()
Delete variables.
TParallelCoordVar()
Default constructor.
Double_t fMinInit
Memory of the minimum when first initialized.
virtual void Draw(Option_t *option="")
Draw the axis.
TParallelCoord * fParallel
Pointer to the TParallelCoord which owns the TParallelCoordVar.
Int_t fId
Id identifying the variable for the editor.
Bool_t Eval(Long64_t evtidx, TParallelCoordSelect *select)
Check if the entry is within the range(s) of "select".
Int_t fNbins
Number of bins in fHistogram.
virtual void Paint(Option_t *option="")
Paint the axis.
Long64_t fNentries
Number of stored entries values.
Int_t GetEntryWeight(Long64_t evtidx)
Get the entry weight: The weight of an entry for a given variable is the bin content of the histogram...
Double_t * fVal
![fNentries] Entries values for the variable.
Int_t fHistoLW
Line width used to draw the histogram line.
virtual ~TParallelCoordVar()
Destructor.
Double_t fY2
y2 coordinate of the axis.
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Computes the distance from the axis.
void SetHistogramLineWidth(Int_t lw=2)
Double_t fX2
x2 coordinate of the axis.
virtual char * GetObjectInfo(Int_t px, Int_t py) const
Returns info about this axis.
void Init()
Initialise the TParallelVar variables.
virtual void ExecuteEvent(Int_t entry, Int_t px, Int_t py)
Execute the corresponding entry.
void GetXYfromValue(Double_t value, Double_t &x, Double_t &y)
Get a position corresponding to the value on the axis.
void GetMinMaxMean()
Get mean, min and max of those variable.
Double_t fQua1
First quantile (Q1).
void SetValues(Long64_t length, Double_t *val)
Set the variable values.
Double_t fQua3
Third quantile (Q3).
void SetHistogramBinning(Int_t n=100)
Set the histogram binning.
Double_t fMed
Median value (Q2).
void SetCurrentLimits(Double_t min, Double_t max)
Set the limits within which one the entries must be painted.
Double_t fHistoHeight
Histogram Height.
Double_t fMaxCurrent
Current used maximum.
Parallel Coordinates class.
TParallelCoordSelect * GetCurrentSelection()
Return the selection currently being edited.
Double_t GetGlobalMin()
return the global minimum.
Long64_t GetCurrentFirst()
Double_t GetGlobalMax()
return the global maximum.
void SetGlobalMax(Double_t max)
Force all variables to adopt the same max.
void SetGlobalMin(Double_t min)
Force all variables to adopt the same min.
void RemoveVariable(TParallelCoordVar *var)
Delete a variable from the graph.
void CleanUpSelections(TParallelCoordRange *range)
Clean up the selections from the ranges which could have been deleted when a variable has been delete...
@ kGlobalScale
Every variable is on the same scale.
@ kCandleChart
To produce a candle chart.
virtual Int_t IndexOf(const TObject *obj) const
Return index of object in collection.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Int_t GetColorPalette(Int_t i) const
Return color number i in current palette.
Int_t GetNumberOfColors() const
Return number of colors in the color palette.
virtual void SetText(Double_t x, Double_t y, const char *text)
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
void Quantiles(Int_t n, Int_t nprob, Double_t *x, Double_t *quantiles, Double_t *prob, Bool_t isSorted=kTRUE, Int_t *index=0, Int_t type=7)
Computes sample quantiles, corresponding to the given probabilities.
Double_t Log10(Double_t x)