Colouring a TParallelCoordVar in a TParallelCoordRange?

Aye folks,

Is is possible to select a TParallelCoordVar and colour its values within a particular range?

So far, I’ve a wee piece of code to select a variable and range I’m interested in; but I failed to highlight this region on the TParallelCoord plot.
On the contrary, if I use the gui and move the markers on the selected variables axis, I get the range highlighted?

I do the following:



 _par = new TParallelCoord(tree1, n_data);


 TCanvas *c1 = new TCanvas("c1");

  TParallelCoordVar *var1 =  (TParallelCoordVar*)_par->GetVarList()->FindObject("isac");
  TParallelCoordRange *range1 = new TParallelCoordRange(var1,-0.8,-1.0000); 
  var1->AddRange( range1 );

Did you look at $ROOTSYS/tutorials/tree/parallelcoord.C ? it does exacty that.


Thanks. I’ve had a look at the mentioned tutorial. For me, I still seem to have problems. Perhaps this is a result of the way I create and assign attributes to the TParallelCoord object: in the tutorial, use is made of an NTuple object to do this, however I’m not using this object. I’ll look over my code again.

Thanks for the advice,


I see you are creating the ||-Coord yourself … that is more painful than using an ntuple or tree… I would recommend that you put your data in a ntuple or tree and then you draw it with option PARA.

Is there any reason why you do not want to use an ntuple ?

If yes, please send me a running example of what you are doing and I will investigate.


I agree. Creating your own TParallelCoord object is difficult in terms of getting the global scaling and selection of attributes working. I’ve quickly converted my code to using a TNtuple.



p.s. I used a TParrelCoord object - rather than a TNtuple - as this was my initial coding thought.

Yes ||-Coords in root are meant to be use via ntuple because, in any case, you need a data set to play with ||-Coord and using ntuple/tree allows to benefit from all the ntuple/tree power. In particular you can draw not only variables but expressions of variables.