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

Home » Public Forums » archive » Questions about NG image with (log) axis
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: Questions about NG image with (log) axis [message #85441 is a reply to message #85440] Tue, 06 August 2013 23:53 Go to previous messageGo to previous message
Fabzi is currently offline  Fabzi
Messages: 305
Registered: July 2010
Senior Member
Hi Xin Tao,

On 08/07/2013 08:38 AM, Xin Tao wrote:
> data = dist(300)
>
> My question 1: What determines the size of the image?
> If I have
>
> x=dindgen(300)*2
> y=dindgen(300)
>
> then im=image(data, x, y, axis_style=2) will give me an elongated image.
>
> If I have
> x=dindgen(300)
> y=dindgen(300)
>
> then im=image(data, x, y, axis_style=2) will give me an square image.
>
> This behavior of the IMAGE function is strange to me.

This is documented here I think:

ASPECT_RATIO
A floating point value indicating the ratio of the Y dimension to the X
dimension in data units. If this property is set to a nonzero value, the
aspect ratio will be preserved as the graphic is stretched or shrunk.
The default value is 0 for all graphics except images, meaning that the
aspect ratio is not fixed, but is allowed to change as the graphic is
stretched or shrunk.

IDL> y=dindgen(300)
IDL> x=dindgen(300)*2
IDL> im=image(data, x, y, axis_style=2, ASPECT_RATIO=2.)

is quadratic

>
> My question 2: This looks like a bug.
>
> If I have
>
> x=dlinear(10, 100, 300) ;; create an array from 10 to 100 with 300 elements
> y=dindgen(300)
>
> and
>
> im=image(data, x, y, /xlog, axis_style=2)
>
> the image x axis has a value from 10^20, 10^40, ..., 10^100. This is certainly wrong to me.

I don't know what dlinear does so I can't say anything here.

Cheers,

Fab
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to clear a NG window without erase method?
Next Topic: 'Reading' a file from binary data?

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

Current Time: Fri Oct 10 02:32:37 PDT 2025

Total time taken to generate the page: 0.08047 seconds