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

Home » Public Forums » archive » Re: Map Function Question
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: Map Function Question [message #79866 is a reply to message #79865] Thu, 19 April 2012 02:34 Go to previous messageGo to previous message
lecacheux.alain is currently offline  lecacheux.alain
Messages: 325
Registered: January 2008
Senior Member
On 18 avr, 18:20, David Fanning <n...@idlcoyote.com> wrote:
> David Fanning writes:
>> I have a question about the Map() function. I've read the
>> documentation for the POSITION keyword and it suggests the
>> map should go into the specified position in the window.
>> And yet, it doesn't. It positions itself in the window
>> is a way that preserves the aspect ratio of the map.
>> This is a good thing, sometimes, but it's not what I
>> want just at the moment!
>
>> Is there some way to turn this feature off?
>
> Sorry, I just realized it's not the map that is doing
> this, it is the image!
>
>  im = IMAGE(scaledData, x, y, RGB_TABLE=rgb, $
>     POSITION=[0.1,0.1,0.9,0.9])
>
> This image is not going into this position. The map
> is going over the top of the image. Is there a way
> to get the image to honor the POSITION keyword?
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.idlcoyote.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
>
>

Well, it seems that the IMAGE function implicitly uses ASPECT_RATIO=1
and then adjust the position.
You can get the correct position by forcing ASPECT_RATIO=0 in the
call.

im = IMAGE(scaledData, x, y, RGB_TABLE=rgb, XRANGE=xrange,
YRANGE=yrange, GRID_UNITS='degrees', POSITION=[0.1,0.1,0.9,0.9])
print,im.convertCoord(x[0],y[0],/DATA,/TO_NORMAL)
0.10000000 0.24925925 0.00000000
im = IMAGE(scaledData, x, y, RGB_TABLE=rgb, ASPECT_RATIO=0,
XRANGE=xrange, YRANGE=yrange, GRID_UNITS='degrees',
POSITION=[0.1,0.1,0.9,0.9])
print,im.convertCoord(x[0],y[0],/DATA,/TO_NORMAL)
0.10000000 0.10000000 0.00000000

One more thing being not clearly documented and which cannot be
guessed !
alx.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: PyMOL in IDL
Next Topic: What color should it be?

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

Current Time: Sat Oct 11 11:15:54 PDT 2025

Total time taken to generate the page: 1.12571 seconds