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 #14186] Tue, 02 February 1999 00:00 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
gpetty@rain.atms.purdue.edu (Grant W. Petty) writes:
>
> 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?
>

I plot images quite a bit, and have developed a routine called
PLOTIMAGE which is available on my web site
(http://astrog.physics.wisc.edu/~craigm/idl/idl.html). If you get it,
be sure to get PLOTIMAGE, TVIMAGE, CMCONGRID, and probably OPLOTIMAGE.
TVIMAGE is taken from David Fanning but slightly modified because
CONGRID does not produce correct output. PLOTIMAGE et al are
documented with extensive comments.

It's pretty easy to use. The following command will do the trick, as
long as the image is already byte-scaled:

IDL> PLOTIMAGE, img

Often you will want to assign coordinate axes to the image. Do that
with the IMGXRANGE and IMGYRANGE which define the extent of the image.
You can display a subrange of the image quite naturally then by
specifying the XRANGE and YRANGE like you always would.

PLOTIMAGE will respect the !p.multi settings, but these can be
overridden by the POSITION keyword.

You also mention virtual coordinates. PLOTIMAGE can use virtual
coordinates. It considers a "panel" to be the entire plotting region
including annotations, and the "subpanel" to be the actual plot data
window, specified in coordinates *relative* to the panel. Coordinates
are fed in the same way as for POSITION, but with the PANEL and
SUBPANEL keywords. I do have a program that tiles the page with
smaller panels if you'd like. It helps remove the cavernous spacing
between plots under !P.MULTI too.

Cheers,
Craig

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@astrog.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
[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: Thu Oct 09 21:14:55 PDT 2025

Total time taken to generate the page: 0.83857 seconds