[ncl-talk] Making zero value white in contour plot

Jake Huff jake.huff at stonybrook.edu
Tue Oct 4 19:57:16 MDT 2016


Hello Everyone,

I am currently using gsn_csm_contour_map along with cnFillColors to specify
which colors I want on the label bar.

For example I am specifiying the minimum, maximum and spacing of values for
the contour levels.

wks = gsn_open_wks("pdf","example")
gsn_define_colormap(wks,"BlWhRe")

res = True

res at cnLevelSpacingF  = 10

res at cnMinLevelValF = -75

res at cnMaxLevelValF = 75

res at cnFillColors = (/2,9,13,18,22,28,34,40,0,55,62,70,77,84,90,95,102/)


So this makes the contour level from -5 to 5 be white by using value 0 in
the cnFillColors. The problem I have is that this is misleading because it
makes a lot of values white instead of just the zero value.


My question is how to make a contour plot with a color bar that has the
zero value be white and all other values be non-white.


Thanks,

Jake
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20161004/c444538d/attachment.html 


More information about the ncl-talk mailing list