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

Home » Public Forums » archive » Re: IDL 8.0 image() scaling
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: IDL 8.0 image() scaling [message #75438] Tue, 08 March 2011 16:46
Mark Piper is currently offline  Mark Piper
Messages: 198
Registered: December 2009
Senior Member
Or:

i=image(dist(20), position=[0.1,0.1,0.9,0.9])

A 50% reduction in statements over Chris' solution. (Yesss!)

mp
Re: IDL 8.0 image() scaling [message #75442 is a reply to message #75438] Tue, 08 March 2011 11:36 Go to previous message
Henry Throop is currently offline  Henry Throop
Messages: 3
Registered: March 2011
Junior Member
That's perfect Chris -- thanks!

-Henry
Re: IDL 8.0 image() scaling [message #75443 is a reply to message #75442] Tue, 08 March 2011 11:01 Go to previous message
chris_torrence@NOSPAM is currently offline  chris_torrence@NOSPAM
Messages: 528
Registered: March 2007
Senior Member
On Mar 8, 9:32 am, Henry Throop <thr...@boulder.swri.edu> wrote:
> Let's say I've got a small 2D array, and I want to use IDL 8.0
> graphics to display it, filling up the whole window. Certainly there
> must be some simple way to do this, but I can't figure it out! I can
> do
>
> IDL> im = image(dist(20))
>
> but this just puts the tiny image at the screen center, unscaled (one
> pixel per pixel).  I can then use
>
> IDL> im.scale, 20, 20
>
> to zoom it. Or I can use the mouse and grab the handles, but of course
> I don't want to do that every time. In earlier versions I'd always use
> rebin(), but it seems like IDL 8.0 *should* do this properly by
> itself. In fact, image() will automatically scale *down* the image if
> it's larger than the screen size; what I want is for it to also scale
> *up* the image when it's too small.
>
> How do I do this? None of the seemingly obvious combinations of /
> INTERPOLATE, IMAGE_DIMENSIONS, DIMENSIONS, etc. do it.
>
> Thanks,
> -Henry

Hi Henry,

I think you could do the following:

p=plot(findgen(20),findgen(20),/nodata)
im=image(dist(20),/overplot)

Cheers,
Chris
ITTVIS
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Floating illegal operand error when reach end of for loop
Next Topic: How to implement periodic boundaries in IMSL_PDE_MOL?

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

Current Time: Wed Oct 08 15:17:54 PDT 2025

Total time taken to generate the page: 0.00535 seconds