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

Home » Public Forums » archive » Re: How to handle gaps in plot?
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: How to handle gaps in plot? [message #45104] Fri, 12 August 2005 21:16 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
"caitouer" <caitouer@yahoo.com> writes:
> Thanks for your quick reply. It is true that it is easy when you have
> filled the gap with some values. However, I am trying to figure out
> how to plot when you do not fill the gap. Here is an example:
>
> X (time):[1,2,3,5,6,7,10,11,12,19,20,21,22,23,24]
> ;Hourly data in one day. There are several gaps in the data
> ;array. You do not know when you will have gap nor
> ; how large the gap is. The actual data is not so regular and
> ;huge. So it is not practical to fill the data.
>
> Y (some values):
> [1.1,0.9,1.3,1.6,2.1,0.7,2.3,0.1,0.3,0.6,0.9,1.4,1.3,1.7,1.8 ]
> ; these are the measurements you take at above time.
>
> Then when you type:
> plot,x,y
> There will have lines between the intervals. However, these lines are
> meaningless.

I have a routine called GTISEG which groups data points into segments.
With that routine, it is up to you to decide how big of a time
separation is a gap.

Once you have the time segments, you can do a FOR loop and plot each
segment separately, i.e. use WHERE to find the points in each segment,
and then OPLOT those points onto your graph.

Craig

GTISEG can be found here:
http://cow.physics.wisc.edu/~craigm/idl/arrays.html

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@REMOVEcow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Speeding Up Oracle DataBase Access with IDL DataMiner
Next Topic: Re: Check if a point is inside a polygon mesh

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

Current Time: Sat Oct 11 04:00:37 PDT 2025

Total time taken to generate the page: 0.80024 seconds