Centering GSN color bar

From: Chad Herman <chad.herman.us_at_nyahnyahspammersnyahnyah>
Date: Mon Apr 18 2011 - 00:28:18 MDT

I've often plotted grids where a large majority of the data was positive
and the rest negative. To get the colormap to give the correct
impression of the data, I would set the color bar to be symmetric so
blue would be interpreted as cold or cooling and red as warm or warming.
Sometimes the ratio of warm/cold was so large that the color bar extents
were too large and suppressed a great deal of detail.

I've figured out how to calculate the proper values of
gsnSpreadColorStart and gsnSpreadColorEnd to ensure that negative values
will be blue and positive values will be red. Attached is a
demonstration of the gsnColorRange function. You can tweek the plotting
limits to see how well the code correctly calculates the
gsnColorStart/End values. Note that if the color bar spacing is larger
than the value where you want blue to transition to red, the transition
will not occur at the intended value because it's too small to resolve.

Chad

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

Received on Mon Apr 18 00:28:32 2011

This archive was generated by hypermail 2.1.8 : Fri May 13 2011 - 10:21:56 MDT