[ncl-talk] add color dots to map

Yun Yue yunyue at huskers.unl.edu
Thu Mar 5 15:53:31 MST 2015


Hi NCL users,

I'm trying to plot observation data to model simulated data map. I think I should use gsn_add_polymarker to overlay them. But for the @gsMarkerColor, I want use the same color for plotting simulated data map, so I tried to use code like the following. But I got black dots on the map. Can somebody help me to solve this? Thank you very much.

Yun

wks = gsn_open_wks("x11", "overlay")

gsn_define_colormap(wks,"WhAqGrYeOrReVi200")

cmap      = gsn_retrieve_colormap(wks)

cnLevels = (/5,10,15,20,25,30/)

res_poly = True

res_poly at gsMarkerIndex = 16

res_poly at gsMarkerSizeF = 10

do i = 0, station_numb

res_poly at gsMarkerColor = GetFillColor(cnLevels, cmap, pmvalue(i))

dum = gsn_add_polymarker(wks, plot, x, y, res_poly)
str1  = unique_string("dum")
plot@$str1$=dum
end do
draw (plot)




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150305/7c54d739/attachment.html 


More information about the ncl-talk mailing list