Dear NCL users,
I'm trying to add a polygon to a XY plot to enhance a specific region of
the plot. However, when I use gsn_add_polygon, the polygon hides the XY
graph. I only could draw this graph with gsn_polygon. But, gsn_polygon
isn't appropriated for multi panels plot, so I would like to make these
plots with gsn_add_polygon.
Please, see the script below for an example:
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
begin
y = (/1,2,3,4,5,5,6,5,4,3,2,1,0,-1,-2,3/)
x = ispan(1,16,1)
ypol = (/-2,-2,6,6/)
xpol = (/1,16,16,1/)
wks = gsn_open_wks("ps","testXY")
xyRes = True
xyRes_at_gsnFrame = False
xyRes_at_gsnDraw = False
poliRes = True
poliRes_at_gsFillColor = "gray"
plot = gsn_xy(wks,x,y,xyRes)
gsn_polygon(wks,plot,xpol,ypol,poliRes)
draw(plot)
frame(wks)
plot1 = gsn_xy(wks,x,y,xyRes)
plotPoli = gsn_add_polygon(wks,plot1,xpol,ypol,poliRes)
draw(plot1)
frame(wks)
end
Can you help me?
Thanks
Mateus.
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Apr 16 2007 - 10:49:30 MDT
This archive was generated by hypermail 2.2.0 : Tue Apr 17 2007 - 15:41:32 MDT