Re: curve colors

From: Will Hobbs <Will.Hobbs_at_nyahnyahspammersnyahnyah>
Date: Thu Dec 13 2012 - 16:28:54 MST

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<mailto:xiaoyancloud@gmail.com>>
Date: Friday, 14 December 2012 10:23 AM
To: "ncl-talk@ucar.edu<mailto:ncl-talk@ucar.edu> USERS" <ncl-talk@ucar.edu<mailto: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 16:29:08 2012

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