[ncl-talk] help with mpLandFillColor

Rick Brownrigg brownrig at ucar.edu
Fri Aug 29 11:31:02 MDT 2014


Hi David,

It looks like you have mpFillOn set to False.  I set it to True and your
script (with minor mods) worked for me.

BTW:  its not necessary to explicitly add colors to the workstation
colormap with newer versions of ncl.  You could simply write:

  res at mpLandFillColor  = (/222,184,135/) / 255.0

Hope that helps...
Rick


On Fri, Aug 29, 2014 at 11:08 AM, David Hebert <david.hebert at nrlssc.navy.mil
> wrote:

> I am trying to use mpLandFillColor on a plot to fill the land. However,
> this does not seem to be working, and I get a white background. I am
> using NCL V6.1.0. Here is the major plotting portion of the code. Any
> help is greatly appreciated!
>
> Thank you,
> David
>
>
>    cmap = "BlAqGrYeOrRe"
>
>    res             = True
>    res at gsnDraw     = True
>    res at gsnFrame    = True
>    res at gsnMaximize = False
>
>    res at mpProjection      = "Mercator"
>    res at mpGridAndLimbOn   = True              ; turn on lat/lon lines
>    res at mpPerimOn         = True             ; turn off box around plot
>    res at mpGridSpacingF    = 1.
>    es at mpGridLatSpacingF = 1.               ; spacing for lat lines
>    res at mpGridLonSpacingF = 1.               ; spacing for lon lines
>    res at mpFillOn          = False
>
>    res at mpLimitMode       = "LatLon"     ; use lat/lon
>    res at mpMinLonF         = -95.5
>    res at mpMinLatF         = 29.0
>    res at mpMaxLonF         = -91.5
>    res at mpMaxLatF         = 30.5
>
>
>    res at gsnAddCyclic          = False
>    ; res at mpDataBaseVersion    = "HighRes"
>    res at mpDataBaseVersion    = "MediumRes"
>    res at mpDataSetName        = "Earth..4"
>    res at mpOutlineSpecifiers  = (/"North America:States"/)
>
>    res at cnFillOn         = True                ; fill contours
>    res at cnFillMode       = "RasterFill"        ; turn raster on
>    res at cnLinesOn        = False               ; turn off the contour lines
>    res at cnLineLabelsOn   = False               ; turn off line labels
>    res at cnFillDrawOrder  = "Predraw"           ; draw contours first,
> then continents
>
>    res at trGridType           = "TriangularMesh" ; allow missing
> coordinates?
>
>    res at cnLevelSelectionMode = "ManualLevels"  ; set manual contour levels
>    res at gsnSpreadColors      = True            ; use full color range
>    res at cnMinLevelValF       = 0.              ; set min contour level
>    res at cnMaxLevelValF       = 10.           ; set max contour level
>    res at cnLevelSpacingF      = 0.1              ; set contour spacing
>    res at gsnSpreadColorStart  =  2              ; start at color 2
>    res at gsnSpreadColorEnd    = -2              ; don't use added burlywood
>
>
>    ; --- make plot
>    wks = gsn_open_wks("ps","Images/elevation_max_zoom_ncl")
>    gsn_define_colormap(wks,cmap)      ; choose colormap defined above
>
>
>    ; add "burlywood" for land color
>    bwood = (/222,184,135/) / 255.0
>    bw = NhlNewColor(wks,bwood(0),bwood(1),bwood(2))
>    res at mpLandFillColor  = bw
>    ; res at mpLandFillColor  = "burlywood"
>    plot = gsn_csm_contour_map(wks,elev,res)
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140829/855bc9ee/attachment.html 


More information about the ncl-talk mailing list