comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Time-Series problem
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Time-Series problem [message #2196 is a reply to message #2118] Tue, 31 May 1994 20:08 Go to previous message
Jackel is currently offline  Jackel
Messages: 30
Registered: April 1993
Member
There've already been a couple of responses to this post:

> From: esc@met.ed.ac.uk (E Carr)
> Subject: Time-Series problem
> Date: Tue, 31 May 1994 12:36:29 GMT
>
> OK, I'm running a time-series program
>
> <text deleted>
>
> 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
============================================================ =======================

But here goes another one. The basic idea is to use the COLOR keyword
for PLOTS, to draw "missing" lines in black. This will obviously be
a problem when drawing on top of an existing graph. Sample IDL code follows:

;----------------------------------------------------------- -------------------
-;Make some "data" arrays, with some gaps in the x's. Note that
; the first and last points are isolated, just to test the algorithm.
;
x=[0,2,3,4,5,6,7,8,9,12,13,14,15,17]
y= RANDOMN(seed,14)

;Create the plotting area. Don't draw symbols now, as
; they may get overwritten by a black (invisible) line.
;
plot,x,y,/NODATA

;For X values separated by one stepsize (1 in this case),
; the following logical statement will be true (1). Larger
; steps will be false. Note that the first element of color
; will be junk, but that's okay, as the PLOTS command doesn't use it.
;
stepsize= 1
color= (x - shift(x,1)) EQ stepsize

;Use the COLOR keyword to PLOTS. This will work for background=0,
; drawing color=255. Modify as necessary.
;
plots,x,y,COLOR=color*255
plots,x,y,PSYM=4

END
;----------------------------------------------------------- -------------------


Of course, I'd be interested in seeing other solutions.

Brian Jackel
University of Western Ontario
[Message index]
 
Read Message
Read Message
Previous Topic: Re: Time-Series problem
Next Topic: Re: Need more symbols for WAVE plots

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 16:13:37 PDT 2025

Total time taken to generate the page: 0.08254 seconds