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 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: dumb q: waterfall [message #13179] Mon, 26 October 1998 00:00
Phillip & Suzanne is currently offline  Phillip & Suzanne
Messages: 31
Registered: June 1998
Member
David Fanning wrote:

> 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.

> David

David has a good idea to start, but it turns out that the SURFACE routine
actually makes this type of plot VERY simple. Here's David's code hacked to
use it.

PRO Waterfall

; Create the data.

seed = 1L
data = FltArr(6, 101)
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.
surface, data, ax=70, az=0, /horizontal, /upper, zaxis=-1
END


Phillip
Re: dumb q: waterfall [message #13180 is a reply to message #13179] Mon, 26 October 1998 00:00 Go to previous message
Pete Riley is currently offline  Pete Riley
Messages: 12
Registered: June 1998
Junior Member
Nancy R. Galbraith wrote in message <3634D856.1E836D42@whoi.edu>...
> 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.
>

Hi Nancy,


If I understand what you're after, the 'threed' function should do what you
want. Check the IDL online help. If it's not quite what you need, you can
always hack the code which everyone does and is in the lib subdirectory of
the IDL distribution.

-Pete Riley
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/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Anybody !!! Help me !!! About IDL!!! And ...
Next Topic: Re: double event

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

Current Time: Fri Nov 28 09:02:58 PST 2025

Total time taken to generate the page: 0.00978 seconds