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

Home » Public Forums » archive » Re: !P.MULTI + POSITION keyword problem
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 + POSITION keyword problem [message #14187 is a reply to message #14186] Tue, 02 February 1999 00:00 Go to previous messageGo to previous message
Liam Gumley is currently offline  Liam Gumley
Messages: 473
Registered: November 1994
Senior Member
Grant W. Petty wrote:
> I just learned about the !P.MULTI variable and wanted to use it to put
> multiple panels on a single postscript page. The problem (I
> discovered after much head scratching) is that each of my panels use
> 'tv' and 'plot' calls which require the POSITION keyword for alignment
> (like David's 'imagebar' example in his book and for similar reasons).
> Unfortunately, the POSITION keyword causes IDL to disregard the
> contents of !P.MULTI (except for the first element). I had hoped that
> POSITION would be defined in terms of "virtual" Normalized Device
> Coordinates for the current panel indicated by !P.MULTI, but this is
> apparently not the case. Is there a simple way to get the desired
> effect without having to manually calculate new POSITION coordinates for
> each panel?

Try using PLOT to establish your position coordinates.
You'll need http://www.dfanning.com/programs/tvimage.pro

;---cut here---
PRO TEST

;- Set multiple plot options and make an image
!p.multi = [0,2,1,0,0]
image = bytscl( dist(32), top=!d.table_size-1 )
loadct, 0

;- Get plot position via PLOT
plot, [0], /nodata, xstyle=4, ystyle=4
position = [!x.window(0),!y.window(0),!x.window(1),!y.window(1)]

;- Display the image with title and axes
tvimage, image, /keep, position=position
plot, [0], /nodata, /noerase, position=position, title='Left Image'

;- Get next plot position
plot, [0], /nodata, xstyle=4, ystyle=4
position = [!x.window(0),!y.window(0),!x.window(1),!y.window(1)]

;- Display next image
tvimage, image, /keep, position=position
plot, [0], /nodata, /noerase, position=position, title='Right Image'

END
;---cut here---

Now when you turn on Postscript, everything should be positioned
correctly, e.g.

set_plot, 'PS'
device, /color, bits=8, /land
test
device, /close ; now look at idl.ps

Cheers,
Liam.

---
Liam E. Gumley
Space Science and Engineering Center, UW-Madison
1225 W. Dayton St., Madison WI 53706, USA
Phone (608) 265-5358, Fax (608) 262-5974
http://cimss.ssec.wisc.edu/~gumley
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: N_ELEMENTS and WHERE: Thanks!
Next Topic: Re: Map spanning Dateline?

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

Current Time: Sun Oct 12 12:19:34 PDT 2025

Total time taken to generate the page: 0.80028 seconds