Fixing a color to a value

From: Ertl, John <john.ertl_at_nyahnyahspammersnyahnyah>
Date: Thu, 24 Feb 2005 12:10:07 -0800

All,

I have looked and I bet it is out there but I cannot find a straightforward
way when filling in a contour to have a color represent a specific value
range even when the low and high end ranges are not always in the grid.

I have a 2d grid of Relative Humidity and I want to color certain value
ranges specific colors. This automatically falls into place when I have a
full range of 0 - 100 but if the min value of the RH is say 40% then I still
get the colors associated with 0-40% in the plot. The same is true at the
upper end.

For example I want:
0-10% red
10-40% yellow
40-60% light green
60-80% green
80-100% blue

If there is no RH below 40% then I don't want the red and yellow in the
plot. If there is no RH above 80 then I don't want the max value to be blue

Any ideas. I have thought about getting the max and min values in the grid
and then trying to use SpreadColorEnd and SpreadColorStart but this seems a
bit more complicated then I would think is needed and I have tried playing
with the nglSpreadColors command and I did not get the results I expected.
Also I would think it would have repercussions on the other colors in the
plot.

John Ertl
_______________________________________________
pyngl-talk mailing list
pyngl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/pyngl-talk
Received on Thu Feb 24 2005 - 13:10:07 MST

This archive was generated by hypermail 2.2.0 : Thu Jan 19 2006 - 21:31:53 MST