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

Home » Public Forums » archive » Re: image display with different pixel size in x & y
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: image display with different pixel size in x & y [message #46482] Wed, 23 November 2005 03:12
Jess is currently offline  Jess
Messages: 11
Registered: June 2005
Junior Member
Thanks Peter & David for the clarification. Congrid is just what I
need.
- Jess
Re: image display with different pixel size in x & y [message #46484 is a reply to message #46482] Tue, 22 November 2005 23:20 Go to previous message
peter.albert@gmx.de is currently offline  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 Go to previous message
David Fanning is currently offline  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/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: 3d space set up and plotting data on maps
Next Topic: Assignment Time for a 3d Variable

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

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

Total time taken to generate the page: 0.00573 seconds