You can use an unadvertised routine called "fill_xy2". To see an
example, go to:
and look at example 17.
This function operates on a plot that's already been created, so you
want to first create the plot, but don't draw it or advance the
frame. Call this function to add the filled curves, and then call draw
res = True
res@gsnDraw = False
res@gsnFrame = False
plot = gsn_csm_xy(wks,...,res)
plot = fill_xy2(wks, plot, xi, yi1, yi2, colora, colorb)
The variable xi should be the X values associated with
both the yi1 and yi2 curves. "colora" and "colorb" are
the colors you want to use for the areas where yi1 is above
yi2, and below yi2. They can be color names ("red", "blue"),
RGB values ((/0.7,0.3,0.5/)), or color indices into
an existing color table.
On Mon, 21 Mar 2005, jerry wrote:
> I can draw X-Y plot with plot = gsn_csm_xy(.......)
> But how to shade the different color between the 2 lines like the attach fig ?
> Thank you
ncl-talk mailing list
This archive was generated by hypermail 2b29 : Mon Mar 21 2005 - 16:17:18 MST