You can use an unadvertised routine called "fill_xy2". To see an
example, go to:
http://www.cgd.ucar.edu/csm/support/CSM_Graphics/xy.shtml
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
and frame:
res = True
res@gsnDraw = False
res@gsnFrame = False
...
plot = gsn_csm_xy(wks,...,res)
plot = fill_xy2(wks, plot, xi, yi1, yi2, colora, colorb)
draw(plot)
frame(wks)
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.
--Mary
On Mon, 21 Mar 2005, jerry wrote:
>
>
>
>
> Hi
> 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
ncl-talk@ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
This archive was generated by hypermail 2b29 : Mon Mar 21 2005 - 16:17:23 MST