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

Home » Public Forums » archive » Re: !p.multi and tv
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: !p.multi and tv [message #11743 is a reply to message #11733] Fri, 15 May 1998 00:00 Go to previous messageGo to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Cathy (csaute3@alumni.umbc.edu) writes:

> I would like to use !P.MULTI and TV to position images like you
> would plots.

> IDL> window, 0
> IDL> !p.multi = [0,1,4,0,0]
> IDL> plot, indgen(10)
> IDL> plot, indgen(20)
> IDL> plot, indgen(30)
> IDL> plot, indgen(40)
>
> tvimage.pro is not capable of positioning 4 images on the page like
> this. Is there something else that has this capability?
>
> Or is there a way to determine the position values that !p.multi
> "determines for you", and then use these with tvimage.pro?

I can see that "IDL doesn't work like this" won't satisfy
you. How about something like this:

************************************************************ ****
PRO MultiImages, multi
IF N_Params() NE 1 THEN multi = [0, 2, 2]
imageFile = Filepath(SubDir=['examples','data'], 'worldelv.dat')
image = BytArr(360, 360)
OpenR, lun, imageFile, /Get_LUN
ReadU, lun, image
Free_Lun, lun
Window, XSize=500, YSize=400
!P.Multi = multi
FOR j=0, multi[1]*multi[2]-1 DO BEGIN
Plot, Findgen(11), Color=!P.Background ; A hack, unfortunately. :-(
x1 = !X.Region[0] + 0.05
x2 = !X.Region[1] - 0.05
y1 = !Y.Region[0] + 0.05
y2 = !Y.Region[1] - 0.05
TVImage, image, Position=[x1, y1, x2, y2]
ENDFOR
END
************************************************************ ******

If you want the images in, for example, a 3-by-2 arrangement,
you can type this:

!P.Multi = [0, 3, 2]
IDL> MultiImages, !P.Multi

I'll leave it as an exercise for the reader to figure out
how to get the images into the program. (Here is a hint:
I would use an array of pointers.)

Cheers,

David
-----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: accessing Siemens magnetom MR images
Next Topic: Re: PostScript and IDL,

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

Current Time: Sun Oct 12 11:12:29 PDT 2025

Total time taken to generate the page: 7.36413 seconds