Coloring points in rooPlot


I have date in the form (x,y, z). While I will plot y against x, I wish every point on the graph be painted with a color scaled according the corresponding z value. (More like the Matlab scatter(x,y,S,C) function, where C is the third column used for coloring. Can someone help me on how to do this?

I am currently using rooPlot for plotting, so it will be great if such a thing can be done using rooPlot itself. Though, I am open for other options.


If your data are in a tree you can do tree->Draw(“px:py:pz”,"",“colz”)