comp.lang.idl-pvwave archive - RDF feed
type: channel
description: Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
items: Re: Time-Series problem

Re: Time-Series problem
type: item
description: 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 Hello, I just got some old programs off old news postings that solve your problem. These are plot_drop, and oplot_drop. They handle missing values nicely. There may be newer versions of these two programs around, but I will include them now anyways. They were originall write by Bill Thompson. I haven't used them much, but they seem to work great. hope these help. -stephen (share and share alike. Promotes good code!) ------------they start here ------------------- PRO PLOT_DROP,X_ARRAY,Y_ARRAY,DROP_VALUE,TITLE=TITLE,XTITLE=XTIT LE, $ YTITLE=YTITLE,XTYPE=XTYPE,YTYPE=YTYPE,PSYM=PSYM,COLOR=COLOR, $ LINESTYLE=LINESTYLE,XRANGE=XRANGE,YRANGE=YRANGE ;+ ; NAME: ; PLOT_DROP ; PURPOSE: ; Plots arrays where some points have data dropout. Only those segments ; with data are plotted. If !PSYM is not positive, then lines will ; connect the data points only within complete segments and will not ; cross over segments with data dropout. ; CATEGORY: ; CALLING SEQUENCE: ; PLOT_DROP, [ X_ARRAY, ] Y_ARRAY [, DROP_VALUE ] ; INPUTS: ; Y_ARRAY - Array of y values, including data dropouts. ; OPTIONAL INPUT PARAMETERS: ; X_ARRAY - Array of x values, defaults to indices of Y_ARRAY. ; DROP_VALUE - Values of …
creator: stl
date: 1994-06-01T12:45:17-00:00