[ncl-talk] unsymetrical non linear colormaps for plots

Sri Nandini snandini at marum.de
Fri Aug 17 07:48:37 MDT 2018


On Aug 17, 2018 3:45:01 PM, Sri Nandini wrote:

> Hello
> 
> I am plotting a simple mean evaporation panel plot with extreme values. As such i decided to use a non linear color scale for this to try to focus on the smaller changes and use white to "mask" the larger variability because that's not important and i want the reader to focus on the smaller changes.
> 
> But i cannot seem to really distribute a good color scheme to highlight the smaller changes reasonably and i am trying to not use green. I think it becomes clearer once you view the attached plot. I have attached the plotting resources used in my script below.
> I have tried to change the ExplicitLevels values many times as well as the ;res at cnFillPalette        = (/"Snow","Black","Blue","PaleTurquoise","PaleGreen","SeaGreen3" ,"Yellow","Pink","Red","Orange","Brown"/)  colors = (/"white", "black", "PeachPuff", "MintCream", "SlateBlue",  \
>            ;  "Khaki", "OliveDrab","BurlyWood", "LightSalmon", "Coral", \
>            ;  "HotPink", "LemonChiffon", "AliceBlue", "LightGrey",      \
>            ; "MediumTurquoise", "DarkSeaGreen", "Peru", "Tomato",      \
>             ; "Orchid","PapayaWhip"/)
> I would b grateful for any advice on selecting a colormap for extreme values.
> 

> ;==================================================================
> ;Here is a section of my code that draws a color fill plot
> ;===================================================================
> 
>    wks = gsn_open_wks("pdf","all_Evaporation_diff1")>  gsn_define_colormap(wks,"prcp_1")
> 
>   res = True
> 
>   res at cnFillOn             = True                ; turn on color
>   ;res at gsnSpreadColors      = True                ; use full colormap
> 
>   res at cnLinesOn            = False               ; turn off contour lines
>   res at cnLevelSelectionMode = "ExplicitLevels"  ; set manual contour levels
>   res at cnLevels     = (/-1.5,-1.,-0.6,-0.4,-0.3,-0.2,-0.1,0,0.1,0.2,0.3,0.4,0.5/)   ; set levels
> 
>   ;res at cnFillPalette        =(/"Snow"/)
> ;res at cnFillPalette        =(/"Snow","Black","Blue", "DarkSeaGreen","PaleTurquoise","PaleGreen","SeaGreen3" ,"OliveDrab","Snow","Snow","BurlyWood","Pink","Salmon","Orange","Red"/)
> 
>   ;res at cnLevels    = (/ -3,-1.,-0.5,-0.4,-0.3,-0.2,-0.1,0.1,0.2,0.3,0.4,0.5,1.,3./)   ; set levels
>   ;res at cnLevels    = (/ -4,-1.5,-1.,-0.5,-0.4,-0.3,-0.2,-0.1,0.1,0.2,0.3,0.4,0.5,1./)   ; set levels
>   
>   res at gsnDraw              = False           ; Do not draw plot
>   res at gsnFrame             = False           ; Do not advance frome
>   res at lbLabelBarOn         = False              ; turn off individual label bars
>   res at tiMainString         = " "
>   ;res at tiMainOffsetYF      = 0.02   ; Move title up a little
>   res at gsnCenterString      = " "
>   res at gsnLeftString        = " "
>   res at gsnRightString       = " "
>   res at cnRasterModeOn       = True               ; Raster mode shows grid cells
>   ;gsn_reverse_colormap(wks)  
> 
>   minlat = 30.                          ; min lat to mask
>   maxlat = 80.                          ; max lat to mask
>   minlon = -10.                         ; min lon to mask
>   maxlon =  100.                        ; max lon to mask
> 
>   res at mpProjection = "LambertConformal"            ; choose projection
> 
> ;---masked plot
>   res at gsnAddCyclic = True                ; regional plot
> 
>   res at mpMinLatF = minlat              ; min lat to mask
>   res at mpMaxLatF = maxlat              ; max lat to mask
>   res at mpMinLonF = minlon              ; min lon to mask
>   res at mpMaxLonF = maxlon              ; max lon to mask
> 



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180817/8b62c6e0/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: all_Evaporation_diff0.pdf
Type: application/pdf
Size: 2043999 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180817/8b62c6e0/attachment-0001.pdf>


More information about the ncl-talk mailing list