3D plot with color code

I would like to know whether it is possible to make a 3D plot with points where the color of the points depends on a fourth value. I know that it is possible to link the color to one of the axis but I would like to use a fourth dimension
thanks for help
best regards

Yes, simply plot a TTree using 4 variables. The 4th one will be mapped on colors.

could you give a short example how this would look like? I do not completely understand how to plot with Trees…
thanks for help

For instance take the TNtuple generated by:


and type: