[ncl-talk] Question about Ocean/Land fill color

Sunmin Park mireiyue at gmail.com
Tue May 9 14:47:20 MDT 2017


Hello,

I am trying to fill colors in the ocean and land. I also use “rasterfill”. 

When I use raster fill, I cannot get colors over the ocean and land even though I have following;

  res at cnFillOn            = True
  res at mpOceanFillColor       = "lightblue"            ; array index in color map
  res at mpLandFillColor        = "light yellow" ;ienna"          ; for land, ocean, and inland h20

when I turn off raster fill I get less dataset presented over the plot… 

  res                     = True               ; plot mods desired
  res at cnFillOn            = True               ; turn on color
  res at gsnSpreadColors     = True               ; use full color map
  res at cnLinesOn           = False              ; no contour lines
  res at cnLineLabelsOn      = False              ; no line labels
  res at cnFillMode       = "RasterFill"       ; Raster Mode

  res at gsnDraw             = False              ; don't draw yet
  res at gsnFrame            = False              ; don't advance frame yet
  res at gsnAddCyclic        = False

  res at cnFillDrawOrder  = "Predraw"          ; areas before map gets set

  res at mpOceanFillColor       = "lightblue"            ; array index in color map
  res at mpLandFillColor        = "light yellow" ;ienna"          ; for land, ocean, and inland h20

res at cnLevelSelectionMode = "ExplicitLevels"
res at cnLevels=(/1,2,3,4,5/)
res at cnFillColors = (/2,3,4,8,9,10/) ;need to have one more number than levels, legend has one more space (room)

  res at tmXBLabelFontHeightF     = 0.014         ; adjust some font heights
  res at tmYLLabelFontHeightF     = 0.014
  res at tiMainFontHeightF        = 0.022
  res at txFontHeightF            = 0.017
  res at lbLabelBarOn             = False        ; turn off label bar

  plot = new(1,graphic)
  @cnFillOn            = Truelot(0) = gsn_csm_contour_map_ce(wks,mor,res)

  ppres                  = True
  ppres at gsnPanelLabelBar = True                   ; common label bar
  gsn_panel(wks,plot,(/1,1/),ppres)

I appreciate any helps and comments.

Thank you
Sun-


 


More information about the ncl-talk mailing list