[ncl-talk] Problem overlaying markers to blank map

Pan, Jianfu (GSFC-423.0)[COLUMBUS TECHNOLOGIES AND SERVICES INC] jianfu.pan at nasa.gov
Fri Jun 26 14:44:24 MDT 2015


NCL experts,

I'm new to ncl.  I have one-dimensional arrays of lat and lon.  I'm trying to plot the locations as markers in red to see the coverage on map.  My result only shows the blank map.  If I call frame(wks) (see snippet below), I got two png files as output, one shows the blank map and the other shows the marked region.  How can I overlay the markers to the blank map?

-------------------------------------------------------------------------------------------
wks = gsn_open_wks ("png", "ncl.png")            ; open workstation
gsn_define_colormap(wks, "WhViBlGrYeOrRe")    ; choose colormap
nc1 = NhlNewColor(wks,.8,.8,.8)                ; Add light gray to colormap for continents
...
res                        = True             ; plot mods desired
res at gsnMaximize            = True             ; maxmize plot in frame
res at mpDataBaseVersion      = "MediumRes"      ; use finer database
res at mpOutlineBoundarySets  = "National"
map = gsn_csm_map(wks,res)

gsres               = True
gsres at gsMarkerIndex = 16          ; Use filled dots for markers
gsres at gsMarkerSizeF = 5.0         ; select size to avoid streaking
gsres at gsMarkerColor      = (/"red"/)   ; Marker color
gsn_polymarker(wks, map, lon, lat, gsres)

; Call this will produce two png files
frame(wks)
----------------------------------------------------------------------------------------------

Regards,
Jianfu Pan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150626/ab64d08e/attachment.html 


More information about the ncl-talk mailing list