colormaps/colorbars and zero point

From: David B.Reusch (dbr AT geosc.psu.edu)
Date: Thu Nov 03 2005 - 09:25:12 MST


I would like to be able to use asymmetric colorbars but still have
the zero point anchored to the switch between, for example, blue and
red in the BlueRed colormap. I am contouring (filled) data that has
both positive and negative values (e.g., anomalies or zonal wind
speeds) and am trying to get positives in one color (red) and
negatives in the other (blue) but this does not always work when
using an asymmetric contours range. Sometimes the zero value is two
or more levels into the blue (or red). Symmetric values work (i.e.,
the blue/red transition is reliably anchored to zero) but this often
results in one side of zero having an awkward number of contours
(e.g., the data are in the range -5 to +30, so a symmetric range
would be +/-30, which does a bad job for the negative values).

I've looked at the online info about cnLevels, cnFillColors and
colormaps and could *probably* come up with code (eventually) to do
this for specific cases, but was hoping someone could provide a
generic approach.

I've attached an example figure that shows the problem I'd like to
resolve. I can also provide data/code as needed for testing.

thanks,
dave
dbr@geosc.psu.edu



contour_example.jpg

_______________________________________________
ncl-talk mailing list
ncl-talk@ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk



This archive was generated by hypermail 2b29 : Thu Nov 03 2005 - 22:32:41 MST