|
Re: image display with different pixel size in x & y [message #46484 is a reply to message #46482] |
Tue, 22 November 2005 23:20  |
peter.albert@gmx.de
Messages: 108 Registered: July 2005
|
Senior Member |
|
|
As David has said, the pixel size on your monitor can't of course be
changed, but instead you can mimick that by using a different number of
window pixels in x- and y-direction for each of your data pixels. If,
as an example, you have an array of 200 x 200 pixels, where the (data)
pixel y-size is 3 times its x-size, than I'd try plotting it all in a
200x600 sized window:
IDL> window, 1, xsize = 200, ysize = 600
IDL> tv, congrid(data, 200, 600)
or, more general:
IDL> ds = size(data, /dim)
IDL> x_factor = 2
IDL> y_factor = x_factor * 3
IDL> window, 1, $
IDL> xsize = ds[0] * x_factor, $
IDL> ysize = ds[1] * y_factor
IDL> tv, congrid(data, ds[0] * x_factor, ds[1] * y_factor)
Now, for the contours, I'd try calculating them from the CONGRIDded
data, allowing to overlay them easily over the plot.
Cheers,
Peter
|
|
|
Re: image display with different pixel size in x & y [message #46486 is a reply to message #46484] |
Tue, 22 November 2005 21:18  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Jess writes:
> Is it possible to display a pixel image in which the pixel sizes are
> different in X and Y directions?
It is certainly possible in a device that supports
scaleable pixel sizes (e.g., the PostScript device).
It is considerably harder in devices (e.g., your computer
display) that have fixed their pixels sizes in hardware. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|