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

Home » Public Forums » archive » Re: dumb q: waterfall
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: dumb q: waterfall [message #13184 is a reply to message #13179] Mon, 26 October 1998 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Nancy R. Galbraith (ngalbraith@whoi.edu) writes:

> Sorry, I can't find this in the manual. I need to make a "waterfall
> plot" in which the y axis applies to the first bin of data in a 2d
> time series, and the subsequent bins are offset from the first. Its
> pretty simple in a lot of plotting pkgs, but I cat see the right
> way to do it in idl. Any advice would be greatly appreciated.

I guess there are many ways to do this, but here is
a short example that I modified a bit to make it look
like your little drawing. I hope it will be enough
to give you the idea anyway.

Cheers,

David

----------------------------------------------------------
PRO Waterfall

; Create the data.

seed = 1L
data = FltArr(101, 6)
FOR count = 0, 5 DO BEGIN
row = RandomU(seed, 101)
FOR j=0,4 DO row = Smooth(row, 3)
data[*, count] = row * 30
ENDFOR

; Display window

Window, XSize=300, YSize=500

; Draw the plots.

Plot, data[*,0], XStyle=8, YStyle=4, XTitle='Time', $
Position=[0.1, 0.1, 0.9, 0.2], YRange=[0,30]
Plot, data[*,1], XStyle=4, YStyle=4, YRange=[0,30], $
Position=[0.1, 0.2, 0.9, 0.3], /NoErase
Plot, data[*,2], XStyle=4, YStyle=4, YRange=[0,30], $
Position=[0.1, 0.3, 0.9, 0.4], /NoErase
Plot, data[*,3], XStyle=4, YStyle=4, YRange=[0,30], $
Position=[0.1, 0.4, 0.9, 0.5], /NoErase
Plot, data[*,4], XStyle=4, YStyle=4, YRange=[0,30], $
Position=[0.1, 0.5, 0.9, 0.6], /NoErase
Plot, data[*,5], XStyle=4, YStyle=4, YRange=[0,30], $
Position=[0.1, 0.6, 0.9, 0.7], /NoErase
Plot, data[*,5], XStyle=4, YStyle=4, YRange=[0,30], $
Position=[0.1, 0.7, 0.9, 0.8], /NoErase
Plot, data[*,5], XStyle=4, YStyle=8, YRange=[0,30], $
Position=[0.1, 0.8, 0.9, 0.9], /NoErase
Axis, XAxis=1
END

----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438, Toll-Free Book Orders: 1-888-461-0155
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Anybody !!! Help me !!! About IDL!!! And ...
Next Topic: Re: double event

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

Current Time: Sat Oct 11 14:34:53 PDT 2025

Total time taken to generate the page: 0.40324 seconds