In article <Cqo30t.5p2@festival.ed.ac.uk>, esc@met.ed.ac.uk (E Carr) writes:
=OK, I'm running a time-series program
=e.g.
=----------------------------------------------
=Pro test
=X=[1,2,3,6,7,8,12,13,14]
=Y=[2.3,2.7,3.6,3.2,3.05,3.24,3.132,2.1,3.4]
=plot,X,Y
=end
=------------------------------------------------
=Ideally I would like three seperate lines so
=as to make clear the missing values at X=4,5,9,10,11.
=I know I can use "oplot" in the example above
=i.e.
=X1=[1,2,3]
=Y1=[2.3,2.7,3.6]
=plot,X1,Y1
=oplot...........
=olpot............
=but my time-series is much bigger than this.
=I also don't want to use the "psym= n" keyword.
=I'D LIKE CONTINOUS LINES JOINING ADJACENT POINTS
=AND GAPS IN BETWEEN.
=Any ideas would be much appreciated
=Ewan
Try this:
x=[1,2,3,6,7,8,12,13,14]
y=[2.3,2.7,3.6,3.2,3.05,3.24,3.132,2.1,3.4]
xmax=max(x)
ymax=max(y)
xi=indgen(xmax)+1
z=replicate(ymax+10,xmax)
z(x-1)=y
plot,xi,z,max=ymax+1
Hope it helps.
-xavier
|