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 #85444 is a reply to message #85441] Wed, 07 August 2013 02:22 Go to previous messageGo to previous message
Xin Tao is currently offline  Xin Tao
Messages: 40
Registered: April 2011
Member
Thank you very much, Fab.

The purpose of dlinear is to create an array (in my case) from 10 to 100 linearly with 300 elements.
It's equivalent to

x=10.0+dindgen(300)*(100-10.0)/(300-1)

Best,

Xin

On Wednesday, August 7, 2013 2:53:30 PM UTC+8, Fabien wrote:
> 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: Wed Oct 08 17:58:50 PDT 2025

Total time taken to generate the page: 0.00439 seconds