Mapping colorbar to data

I'd really appreciate help on this, even though I'm new to matplotlib and

Consider the following lists:
[1537, 1686, 1858, 2113, 2832]
[1328, 2168]
with max value = 2850

For a colorbar with range 0 to max value and a colour gradient of blue,
green and red, I'd like to show green at y-axis values from the first list
and red at y-axis values from the second list. At any other value the bar
would be blue. Values from one list never occur in the other.

How would I go about accomplishing this?


View this message in context:
Sent from the matplotlib - users mailing list archive at