109 Error(
"AddRange",
"You must create a selection before adding ranges.");
131 if(!
gPad)
return 9999;
141 if (
dist<=0.005)
return 0;
171 if (noOwnedRange)
return kTRUE;
172 else return inarange;
185 static Int_t pxold, pyold;
187 static Int_t pzoomold;
190 Int_t px1,px2,py1,py2,
n=-1;
209 if(
gPad->AbsPixeltoX(px)-
fX1 > 0){
219 if(
gPad->AbsPixeltoY(py)-
fY1 > 0){
249 min = max; max = mem;
271 else if (n<fParallel->GetVarList()->IndexOf(
this)) ++
n;
286 gVirtualX->DrawLine(pxold,py1,pxold,py2);
297 gVirtualX->DrawLine(px1,pyold,px2,pyold);
394 static char info[128];
397 if (!
gPad)
return info;
430 quantiles[0]=0.; quantiles[1]=0.; quantiles[2] = 0.;
432 prob[0]=0.25; prob[1]=0.5; prob[2] = 0.75;
443 else val[selected] =
fVal[
n];
450 else val[selected] =
fVal[
n];
457 fQua1 = quantiles[0];
459 fQua3 = quantiles[2];
488 if(value < fMinCurrent || value >
fMaxCurrent)
return;
567 box->SetLineWidth(1);
569 box->SetLineStyle(1);
570 box->SetFillStyle(0);
578 if (boxSize >= 0.03) boxSize = 0.03;
622 if (min<frame->GetY1()) min = frame->
GetY1();
627 if (min<frame->GetX1()) min = frame->
GetX1();
635 else box->PaintBox(qua1,
fY1-boxSize,qua3,
fY1+boxSize);
686 for (i=1; i<=
fNbins; i++) {
691 b->PaintBox(
fX1,y1,
x2,y2,
"l");
701 for (i=1; i<=
fNbins; i++) {
734 for (i=1; i<=
fNbins; i++) {
749 for (i=1; i<=
fNbins; i++) {
774 if (
fX1-0.5*tlength<0.01) {
778 }
else if (
fX1+0.5*tlength > 0.99) {
796 if (
fX1-0.04-tlength<0.01) {
820 printf(
"at x1=%f, y1=%f, x2=%f, y2=%f.\n",
fX1,
fY1,
fX2,
fY2);
833 out<<
" var->SetBit(TParallelCoordVar::kLogScale,"<<
TestBit(
kLogScale)<<
");"<<std::endl;
834 out<<
" var->SetBit(TParallelCoordVar::kShowBox,"<<
TestBit(
kShowBox)<<
");"<<std::endl;
836 out<<
" var->SetHistogramBinning("<<
fNbins<<
");"<<std::endl;
837 out<<
" var->SetHistogramLineWidth("<<
fHistoLW<<
");"<<std::endl;
838 out<<
" var->SetInitMin("<<
fMinInit<<
");"<<std::endl;
839 out<<
" var->SetInitMax("<<
fMaxInit<<
");"<<std::endl;
840 out<<
" var->SetHistogramHeight("<<
fHistoHeight<<
");"<<std::endl;
841 out<<
" var->GetMinMaxMean();"<<std::endl;
842 out<<
" var->GetHistogram();"<<std::endl;
843 out<<
" var->SetFillStyle("<<
GetFillStyle()<<
");"<<std::endl;
844 out<<
" var->SetFillColor("<<
GetFillColor()<<
");"<<std::endl;
845 out<<
" var->SetLineColor("<<
GetLineColor()<<
");"<<std::endl;
846 out<<
" var->SetLineWidth("<<
GetLineWidth()<<
");"<<std::endl;
847 out<<
" var->SetLineStyle("<<
GetLineStyle()<<
");"<<std::endl;
853 out<<
" //***************************************"<<std::endl;
854 out<<
" // Create the "<<i<<
"th range owned by the axis \""<<
GetTitle()<<
"\"."<<std::endl;
855 out<<
" TParallelCoordSelect* sel = para->GetSelection(\""<<range->
GetSelection()->
GetTitle()<<
"\");"<<std::endl;
856 out<<
" TParallelCoordRange* newrange = new TParallelCoordRange(var,"<<range->
GetMin()<<
","<<range->
GetMax()<<
",sel);"<<std::endl;
857 out<<
" var->AddRange(newrange);"<<std::endl;
858 out<<
" sel->Add(newrange);"<<std::endl;
980 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 an 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.
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.
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 * 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.
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.
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.
void SetCurrentMax(Double_t max)
Set the current maximum of the axis.
TList * fRanges
[fNentries] Entries values for the variable.
void GetQuantiles()
Get the box plot values (quantiles).
void SetHistogramHeight(Double_t h=0)
Set the height of the bar histogram.
void DeleteVariable()
Delete variables.
TParallelCoordVar()
Histogram holding the variable distribution.
virtual void Draw(Option_t *option="")
Draw the axis.
TParallelCoord * fParallel
Bool_t Eval(Long64_t evtidx, TParallelCoordSelect *select)
Check if the entry is within the range(s) of "select".
virtual void Paint(Option_t *option="")
Paint the axis.
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...
virtual ~TParallelCoordVar()
Destructor.
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Computes the distance from the axis.
void SetHistogramLineWidth(Int_t lw=2)
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.
void SetValues(Long64_t length, Double_t *val)
Set the variable values.
void SetHistogramBinning(Int_t n=100)
Set the histogram binning.
void SetCurrentLimits(Double_t min, Double_t max)
Set the limits within which one the entries must be painted.
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...
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)
double dist(Rotation3D const &r1, Rotation3D const &r2)
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)