2D Graph with color as a third dimension


I’m somewhat new to ROOT. I have data stored in a TTree, and I’ve been able to use the Draw() function to plot one branch against another. In my case, the branches are called R1, eta, and clust_charge.

This may be an elementary question, but I can’t seem to find any information on it anywhere. I’d like to plot R1 vs. eta, but then have the color of each point set by clust_charge. So this is a bit like the COLZ option for a 2D histogram, but instead of coloring based on the number of points in a bin, I want the color to be set by a third “column.”

Is this possible?

Thanks for your help.

your_tree->Draw("R1:eta: clust_charge","","col")