[ncl-talk] Plotting markers with different colors

G.Monte at isac.cnr.it G.Monte at isac.cnr.it
Tue Oct 6 10:34:48 MDT 2020


Dears all,
in a script of mine I have a 1-dimensional array like this:

a=(/1,2,3,1,2,3,3,2,1/)

I would like to plot its value as some markers having different colors
(for exemple, value 1 in blue, 2 in green and 3 in red).
I have already tried to plot them with "gsn_coordinates" procedure, by
setting:

1) a1=where(a.eq.1,a,a at _FillValue)
res at gsMarkerColor = "blue"
gsn_coordinates(wks,map,a1,res)
2) a2=where(a.eq.2,a,a at _FillValue)
res at gsMarkerColor = "green"
gsn_coordinates(wks,map,a2,res)
3)  a3=where(a.eq.3,a,a at _FillValue)
res at gsMarkerColor = "red"
gsn_coordinates(wks,map,a3,res)

I eventually got three different plots: the first for a1, the second for
a2 and the third for a3.
I really want these images to be plotted on the same map; how can I proceed?

Thanks,
Giulio



More information about the ncl-talk mailing list