load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
begin
ncurves = 5
npts = 100
x = ispan(1,npts,1)
y = generate_2d_array(5, 10, -19, 15, 0, (/ncurves,npts/))
wks = gsn_open_wks("x11","markers")
res = True
res@gsnMaximize = True
;---All curves will be drawn as different dashed lines
res@tiMainString = "All curves drawn as different dashed lines"
plot = gsn_csm_xy(wks,x,y,res)
;---All curves will be drawn as markers
res@tiMainString = "All curves drawn as markers (asterisk)"
res@xyMarkLineMode = "Markers"
plot = gsn_csm_xy(wks,x,y,res)
;---All markers will be blue
res@tiMainString = "All curves drawn as blue asterisks"
res@xyMarkerColor = "blue"
plot = gsn_csm_xy(wks,x,y,res)
;---Each set of markers will be a different color.
res@tiMainString = "Each set of 5 markers drawn in a different color"
res@xyMarkerColors = (/"red","green","blue","brown","purple"/)
; res@xyMonoMarkerColor = False ; It doesn't seem to matter if you set this.
plot = gsn_csm_xy(wks,x,y,res)
;---The markers will be drawn as solid dots
res@tiMainString = "All markers drawn as different colored filled dots"
res@xyMarker = 17
plot = gsn_csm_xy(wks,x,y,res)
;---The markers will be drawn in different five styles
res@tiMainString = "Each set of 5 markers drawn in different styles and colors"
res@xyMarkers = (/3,7,9,11,13/)
; res@xyMonoMarker = False ; It doesn't seem to matter if you set this.
plot = gsn_csm_xy(wks,x,y,res)
;---Add five new markers
mstrings = (/"u","z","y","q","o"/)
fontnums = (/34, 35, 35, 37, 19/)
xoffset = 0.0
yoffset = 0.0
ratio = 1.0
sizes = (/2.0,2.0,0.75,1.0,2.5/)
angle = 0.0
new_indexes = NhlNewMarker(wks, mstrings, fontnums, xoffset, yoffset, \
ratio, sizes, angle)
res@xyMarkers = new_indexes ; New array of marker indexes
res@tiMainString = "Five new markers added to marker table"
plot = gsn_csm_xy(wks,x,y,res)
end