|
|
Re: IDL 8.0 image() scaling [message #75443 is a reply to message #75442] |
Tue, 08 March 2011 11:01  |
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
|
|
|