The multidimensional system of Parallel coordinates is a common way of studying high-dimensional geometry and visualizing multivariate problems. It has first been proposed by A. Inselberg in 1981.
To show a set of points in an n-dimensional space, a backdrop is drawn consisting of n parallel lines. A point in n-dimensional space is represented as a polyline with vertices on the parallel axes; the position of the vertex on the i-th axis corresponds to the i-th coordinate of the point.
This tool comes with a rather large gui in the editor. It is necessary to use this editor in order to explore a data set, as explained below.
The main issue for parallel coordinates is the very high cluttering of the output when dealing with large data set. Two techniques have been implemented to bypass that so far:
Selections of specific entries can be defined over the data se using parallel coordinates. With that representation, a selection is an ensemble of ranges defined on the axes. Ranges defined on the same axis are conjugated with OR (an entry must be in one or the other ranges to be selected). Ranges on different axes are are conjugated with AND (an entry must be in all the ranges to be selected). Several selections can be defined with different colors. It is possible to generate an entry list from a given selection and apply it to the tree using the editor ("Apply to tree" button).
Options can be defined each axis separatly using the right mouse click. These options can be applied to every axes using the editor.
The order in which the variables are drawn is essential to see the clusters. The axes can be dragged to change their position. A zoom is also available. The logarithm scale is also available by right clicking on the axis.
TParallelCoord can also be used to display a candle chart. In that mode, every variable is drawn in the same scale. The candle chart can be combined with the parallel coordinates mode, drawing the candle sticks over the axes.
{ TCanvas *c1 = new TCanvas("c1"); TFile *f = TFile::Open("$ROOTSYS/tutorials/tree/cernstaff.root"); TTree *T = (TTree*)f->Get("T"); T->Draw("Age:Grade:Step:Cost:Division:Nation","","para"); TParallelCoord* para = (TParallelCoord*)gPad->GetListOfPrimitives()->FindObject("ParaCoord"); TParallelCoordVar* grade = (TParallelCoordVar*)para->GetVarList()->FindObject("Grade"); grade->AddRange(new TParallelCoordRange(grade,11.5,14)); para->AddSelection("less30"); para->GetCurrentSelection()->SetLineColor(kViolet); TParallelCoordVar* age = (TParallelCoordVar*)para->GetVarList()->FindObject("Age"); age->AddRange(new TParallelCoordRange(age,21,30)); return c1; }
Some references:
virtual void | TObject::DoError(int level, const char* location, const char* fmt, va_list va) const |
void | TObject::MakeZombie() |
void | Init() |
void | PaintEntries(TParallelCoordSelect* sel = NULL) |
void | SetAxesPosition() |
enum { | kVertDisplay | |
kCurveDisplay | ||
kPaintEntries | ||
kLiveUpdate | ||
kGlobalScale | ||
kCandleChart | ||
kGlobalLogScale | ||
}; | ||
enum TObject::EStatusBits { | kCanDelete | |
kMustCleanup | ||
kObjInCanvas | ||
kIsReferenced | ||
kHasUUID | ||
kCannotPick | ||
kNoContextMenu | ||
kInvalidObject | ||
}; | ||
enum TObject::[unnamed] { | kIsOnHeap | |
kNotDeleted | ||
kZombie | ||
kBitMask | ||
kSingleKey | ||
kOverwrite | ||
kWriteDelete | ||
}; |
TString | TNamed::fName | object identifier |
TString | TNamed::fTitle | object title |
TGaxis* | fCandleAxis | ! An axis used when displaying a candle chart. |
TEntryList* | fCurrentEntries | -> Current selected entries in the tree. |
Long64_t | fCurrentFirst | First entry to display. |
Long64_t | fCurrentN | Number of entries to display. |
TParallelCoordSelect* | fCurrentSelection | ! Current Selection being edited. |
Int_t | fDotsSpacing | Spacing between dots to draw the entries. |
TEntryList* | fInitEntries | -> Selected entries when TParallelCoord first initialized. |
Color_t | fLineColor | entries line color. |
Width_t | fLineWidth | entries line width. |
Long64_t | fNentries | Number of entries; |
UInt_t | fNvar | Number of variables. |
TList* | fSelectList | List of selections over the variables. |
TTree* | fTree | ! Pointer to the TTree. |
TString | fTreeFileName | Name of the file containing the tree. |
TString | fTreeName | Name of the tree. |
TList* | fVarList | List of the variables. |
Int_t | fWeightCut | Specify a cut on the entries from their weight (see TParallelCoordVar::GetEvtWeight(Long64_t)) |
Constructor without a reference to a tree, the datas must be added afterwards with TParallelCoord::AddVariable(Double_t*,const char*).
Normal constructor, the datas must be added afterwards with TParallelCoord::AddVariable(Double_t*,const char*).
Call constructor and add the variables.
Clean up the selections from the ranges which could have been deleted when a variable has been deleted.
return the tree if fTree is defined. If not, the method try to load the tree from fTreeFileName.
Save the entry lists in a root file "filename.root".
Save the tree in a file if fTreeFileName == "".