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

Home » Public Forums » archive » Re: How to plot many lines simultaneously
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 plot many lines simultaneously [message #32729] Tue, 05 November 2002 21:47 Go to previous message
Jeff Guerber is currently offline  Jeff Guerber
Messages: 41
Registered: July 2000
Member
On Tue, 5 Nov 2002, David Fanning wrote:

> lily_zhang (fengliza@sina.com) writes:
>
>> Now I have two matrices, X and Y. Supposing X = FltArr(100), Y =
>> FltArr(8,100),
>> I just wonder how to plot all the columns of Y as the functions of X
>> in an image simultaneouly.
>
> I'd try something like this.
>
> Plot, x, y[0,*], YRange=[Min(y),Max(y)]
> FOR j=1,7 DO OPlot, x, y[j,*]


Lily, since no one else has mentioned this I'd just like to add that,
although it doesn't make a noticeable difference in this small example, if
you're doing this A LOT or the arrays are much bigger, it's much more
efficient if Y = FltArr(100,8) (and you make the corresponding changes to
David's programlet). Remember that in IDL, as in Fortran, the left index
varies the fastest.

Jeff Guerber
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: gurus: example code as main level code ?
Next Topic: Re: About file length

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

Current Time: Wed Oct 08 15:34:32 PDT 2025

Total time taken to generate the page: 0.00389 seconds