Hi Dave,
I'd try setting:
res@xyMarkLineModes = (/"Markers","Markers","Markers"/)
alternatively:
res@xyMonoMarkLineModes = True
res@xyMarkLineMode = "Markers"
For the former I think NCL wants you to tell it how to draw each of your
lines, you have 3 lines, so NCL wants three entries in xyMarkLineModes.
I do find it odd that the default for xyMarklineModes isn't Lines, in
that you would've gotten one line drawn by markers, and two lines drawn
as lines... (It's "NULL" according to the documentation.)
Adam
On 10/11/2010 09:11 AM, David Adams wrote:
> Hi Debasish et al.
> commenting these lines out has no effect.
> It was precisely xy_2.ncl that I was trying to mimick, but to no
> avail. It must be something
> simple that I am just not seeing.
>
> thanks,
> Dave
>
>
>
>
>
>
> On Mon, Oct 11, 2010 at 10:43 AM, <debasish@sca.uqam.ca
> <mailto:debasish@sca.uqam.ca>> wrote:
>
> Dear Dave,
> Could please try to run the script by commenting out following linemm
>
> ;res@gsnDraw = False
> ;res@gsnFrame = False
>
> ;draw(plot)
> ;frame(wks)
>
> Also check the example xy_2.ncl
> (http://www.ncl.ucar.edu/Applications/Scripts/xy_2.ncl)
>
> Thanks
>
> Debasish
>
> > Dear All,
> > should be a simple question, I am just a bit rusty with NCL.
> > I want to plot 3 timeseries of data points on a single xy graph.
> >
> > I can plot each one individually fine, but when I try to plot all
> three
> > only
> > one shows up.
> >
> > thanks in advance,
> > Dave
> >
> > -------------------------------------ncl
> > code------------------------------------------
> > load "/usr/local/lib/ncarg/nclex/gsun/gsn_code.ncl"
> > load "/usr/local/lib/ncarg/nclex/gsun/gsn_csm.ncl"
> > load "/usr/local/lib/ncarg/nclscripts/csm/contributed.ncl"
> > load "/usr/local/lib/ncarg/nclscripts/csm/shea_util.ncl"
> >
> > begin
> >
> > ; Read in Data
> >
> > ncol = 14
> > nlvl = 525599
> >
> > diri = "/home/dadams/Desktop/CPTEC_data/ZF2_swaying_tower/"
> > fili = "GPS_met_CTT_GIPSY_INPA_NOAA_2009.dat"
> > ZF2data = asciiread(diri+fili,(/nlvl,ncol/), "float")
> >
> > julian_day = ZF2data(:,1)
> > pw_RBDC = ZF2data(:,9)*10.0
> > pw_INPA = ZF2data(:,12)*10.0
> > pw_NOAA = ZF2data(:,13)*10.0
> >
> > julian_day!0 = "julian_day"
> > pw_RBDC!0 = "julian_day"
> > pw_INPA!0 = "julian_day"
> > pw_NOAA!0 = "julian_day"
> >
> > julian_day&julian_day = julian_day
> > pw_RBDC&julian_day = julian_day
> > pw_INPA&julian_day = julian_day
> > pw_NOAA&julian_day = julian_day
> >
> > pw_RBDC@units = "mm"
> > pw_INPA@units = "mm"
> > pw_NOAA@units = "mm"
> >
> >
> > ; create new data set for plotting the 3 lines on one figure
> > data1 = new((/3,dimsizes(julian_day&julian_day)/),float)
> > data1(0,:) = pw_INPA
> > data1(1,:) = pw_RBDC
> > data1(2,:) = pw_NOAA
> > data1@units = "mm"
> > data1@_FillValue = -9999.99
> >
> > wks = gsn_open_wks ("pdf","Figure_1") ; open ps
> or pdf
> > file
> >
> > ; plot figure
> > res = True ; plot mods desired
> > res@gsnDraw = False
> > res@gsnFrame = False
> >
> > res@xyMarkLineModes = "markers"
> > res@xyMarkers = (/3,3,3/)
> > res@xyMarkerColor = (/"blue","black","red"/)
> > res@tiYAxisString = "(PWV mm)" ; axis string
> >
> > res@trXMaxF = 197.0
> > res@trXMinF = 193.0
> > res@trYMaxF = 56.0 ; pwv in mm
> > res@trYMinF = 32.0
> >
> > plot = gsn_csm_xy(wks,julian_day({193:197}),data1(:,{193:197}),res)
> >
> > draw(plot)
> > frame(wks)
> > end
> >
> ---------------------------------------------------------------------------------------------------------------------------------------------
> > _______________________________________________
> > ncl-talk mailing list
> > List instructions, subscriber options, unsubscribe:
> > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> >
>
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
-- __________________________________________________ Adam Phillips asphilli@ucar.edu National Center for Atmospheric Research tel: (303) 497-1726 Climate and Global Dynamics Division fax: (303) 497-1333 P.O. Box 3000 Boulder, CO 80307-3000 http://www.cgd.ucar.edu/cas/asphilli _______________________________________________ ncl-talk mailing list List instructions, subscriber options, unsubscribe: http://mailman.ucar.edu/mailman/listinfo/ncl-talkReceived on Mon Oct 11 11:37:28 2010
This archive was generated by hypermail 2.1.8 : Tue Oct 12 2010 - 15:27:00 MDT