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

Home » Public Forums » archive » Re: Skipping plot discontinuities.
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Skipping plot discontinuities. [message #572] Mon, 05 October 1992 04:20
zawodny is currently offline  zawodny
Messages: 121
Registered: August 1992
Senior Member
Awhile back, PLOTS had an extra argument (pen, I think) which was a vector of
one's and zero's. When an entry was a zero the PLOTS command would "lift the
pen" until a non-zero value was encountered. This highly desirable feature is
now gone! I went through a program of mine which does what you are looking for
and extracted some code which does the segment isolation and plotting. It also
does a POLYFILL so it probably is more complicated than need be but, you can
hack it down to the bare necessities.


; for the purposes here plot segments are separated by points where t(i) = 0

; Locate segments
t = [0.,timave,0.]
; find the segment starting end
m = where(t eq 0.)
n = where((shift(m,-1)-m) gt 1,nms)
ms = m(n)+1
; find the segment finishing end
m = where(t ne 0.)
n = where((shift(m,-1)-m) gt 1,nme)
me = m(n)
; for all segments
for i=0,nme-1 do begin
; the reverse here is for polyfill and drawing a "box" around the hatched area
x = [ t(ms(i):me(i)-1 ), reverse(t(ms(i):me(i)-1 ))]
y = [hi(ms(i):me(i)-1,k),reverse(lo(ms(i):me(i)-1,k))]
oplot,x,y
polyfill,x,y,orient=45.
endfor


It may not be pretty but it does work!

Good Luck

*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- *-*-*-*-*-*-*-*-*-*
Joseph M. Zawodny (KO4LW) NASA Langley Research Center
zawodny@arbd0.larc.nasa.gov MS-475, Hampton VA, 23681
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- *-*-*-*-*-*-*-*-*-*
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: idl info wanted
Next Topic: Re: animation on X-Terminals

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

Current Time: Wed Oct 08 09:10:51 PDT 2025

Total time taken to generate the page: 0.00549 seconds