TH3 and TH4?

Hi - would it be simple to add to root a new drawing option for TH3 such that a normal TH2 box plot for the first two variables is shown, but where the colour of each box corresponds to the third variable ? (With the colours allocated as per the “COL” option of a TH2 ?

This could be extended to the “BOX” version of drawing a TH3 where in this case the “cube” is coloured with a 4th variable, thereby creating a TH4. Does that make sense ?

I realise that for many datasets the colour wouldn’t give a great deal of detail but if the 3rd (or 4th) variable did not have a large number of values or was fairly uniformly distributed over its values it could be very useful.

Interested in your response,

elc.

If you have a TH3* h, you can do
h->Project3D(“xy”->Draw(“col”);
see:http://root.cern.ch/root/htmldoc/TH3.html#TH3:Project3D

The 4-th dimension is best used in a TTree::Draw

  • “e1:e2:e3:e4” produces a 3-d scatter-plot of “e1” versus “e2” versus “e3” and “e4” mapped on the color number.

see: root.cern.ch/root/htmldoc/TTree.html#TTree:Draw

Rene