I’d like to make a scatter plot, where each point has a different colour determined by a certain number, where that number represents some kind of an occupancy. I’d like to go from blue->green->yellow->red, as occupancy for that spot/data point is increasing. Now, I can do that with a few “if o<1, SetMarkerColor(kBlue)” or something, but then I’d end up having a lot of else if conditions until I get to red, and I’d like to have as many colours as I can.
Is there a way to extract the colours from the Rainbow palette, in which case having the colours would make it easier to make a linear scale with many "else if o<x, SetMarkerColor(…), lines, or is there a way to call the SetMarkerColor function with the colours of the rainbow palette, and somehow connect it to my occupancy based on which I’m colouring the points?
Thanks
