[ncl-talk] Sub: MaskArea...

Adv advita6 at gmail.com
Sun Mar 27 18:41:03 MDT 2016


Hi ,
I have been trying to mask specific states. I didn't get any error, though
no specified region is masked out. Could someone help me to fix this?

Thank you
;**************************************************
; plot parameters
;**************************************************

wks = gsn_open_wks("x11","test")
  gsn_define_colormap(wks,"BlWhRe")       ; choose colormap
;  gsn_define_colormap(wks,"testcmap")       ; choose colormap
  plot = new(neof,graphic)                ; create graphic array
                                          ; only needed if paneling
; EOF patterns

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

;---This resource not needed in V6.1.0
  res at gsnSpreadColors      = True         ; spread out color table
res at cnLevelSelectionMode = "ManualLevels"  ; set manual contour levels
  res at cnMinLevelValF       = -2       ; set min contour level
  res at cnMaxLevelValF       = 2      ; set max contour level
  res at cnLevelSpacingF      = 0.25      ; set contour spacing


  res at gsnAddCyclic         = False        ; plotted dataa are not cyclic

  res at mpFillOn             = False        ; turn off map fill
res at mpMinLatF            = prc&lat(0)+3         ; zoom in on map
  res at mpMaxLatF            = prc&lat(nlat-1)
  res at mpMinLonF            = prc&lon(0)
  res at mpMaxLonF            = prc&lon(mlon-1)
;res at mpCenterLonF         = Center

 res at cnFillOn             = True         ; turn on color fill
  res at cnLinesOn            = False        ; True is default
res at cnLineLabelsOn       = False
  res at lbLabelBarOn         = False        ; turn off individual lb's
res at mpDataBaseVersion           = "Ncarg4_1"
  res at mpDataSetName               = "Earth..4"   ; For counties
res at mpAreaMaskingOn = True
res at mpMaskAreaSpecifiers  =(/"North Dakota","Montana" /)
;res at mpSpecifiedFillColors       = (/"white","transparent"/)

;  res at mpInlandWaterFillColor      = "white"
  res at mpLandFillColor             = "transparent"

  res at mpOutlineOn                 = True
res at mpGeophysicalLineThicknessF = 3.0
res at mpGeophysicalLineColor = "Black"; (/22/)
res at mpOutlineBoundarySets = "GeophysicalAndUSStates" ; add state boundaries
res at mpNationalLineColor  = res at mpGeophysicalLineColor
res at mpUSStateLineThicknessF = 3.0
res at mpUSStateLineColor  = res at mpGeophysicalLineColor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160327/d9647845/attachment.html 


More information about the ncl-talk mailing list