Re: curve colors

From: cheryl Ma <xiaoyancloud_at_nyahnyahspammersnyahnyah>
Date: Thu Dec 13 2012 - 17:03:24 MST

Will,

Thanks. In my case, the array of line colors is the NOT in same size.
The first one has 3, and second has 1 only. I tried something as below, but
the curve color from the array 2 follow the color for array 1, i.e. red.

 anything wrong?

 res@xyLineColors = (/"red","green","blue"/)
 plot = gsn_csm_xy(wks,x,y,res)

res@xyLineColor = "brown"
 plot2 = gsn_csm_xy(wks, x2,y2,res)

On Thu, Dec 13, 2012 at 3:28 PM, Will Hobbs <Will.Hobbs@utas.edu.au> wrote:

> Cheryl
>
> Just change the xyLineColors resource between plotting the first and
> second plot. This will work as long as the array of line colors is the same
> size (if not, you would have to delete() and reset the resource):
>
> > res@xyLineColors = (/"red","green","blue"/)
>
> > plot1 = gsn_csm_xy(wks,x,y,res)
>
> > res@xyLineColors = (/"brown","violet","magenta"/)
>
> > plot2 = gsn_csm_xy(wks, x2,y2,res)
>
> Will
>
> From: cheryl Ma <xiaoyancloud@gmail.com>
> Date: Friday, 14 December 2012 10:23 AM
> To: "ncl-talk@ucar.edu USERS" <ncl-talk@ucar.edu>
> Subject: curve colors
>
> Hi all,
>
> I use one set of data to plot 3 curves by call
> plot = gsn_xy(wks,x,y,res)
>
> then I want to use another set of data to plot one more curve on the
> same plot.
> plot = gsn_xy(wks,x2,y2,res)
>
>
> My question is that 3 curve colors have been set in the first call
> gsn_xy, how to set the different colors to the more curves from the second
> data set? I tried to set the color by change the color with
> res@xyLineColors = (/line_col1,line_col2/)
> but this will change the colors for both the data from second sets of data
> and first sets of data.
>
> Thanks,
>
>

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Dec 13 17:03:41 2012

This archive was generated by hypermail 2.1.8 : Fri Dec 21 2012 - 10:43:23 MST