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

Home » Public Forums » archive » x/y margin from map_set to plot position and cgimage
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: x/y margin from map_set to plot position and cgimage [message #85684 is a reply to message #85682] Tue, 27 August 2013 05:45 Go to previous messageGo to previous message
Andy Sayer is currently offline  Andy Sayer
Messages: 127
Registered: February 2009
Senior Member
Thanks for the tips, David. I'd looked at !p.position to try to find the position after my map_set call but that was set to zero, looking at !x.window/!y.window had not crossed my mind! I agree that margin is a slightly odd unit to use but it seems to be what we have in standard IDL (if you want something which you can define coordinates with respect to the fraction of the plotting device assigned assuming even divisions from !p.multi).

I found that just using the tv command got the position right without requiring any explicit positioning information, although I kind of want to swap out tv for cgimage eventually. So my first working attempt basically consists of map_set, followed by map_image and then tv. I did notice a few differences between the image and the polyfill for one projection (satellite) so need to dig into that a bit more today. I've read discussion here and on your webpage about why this (i.e. map_set, map_image) is Not A Great Way To Approach Maps but guess the lessons have not sunk in yet. ;) Perhaps I will write a 'third generation' of my mapping codes when it does...

Andy

On Monday, August 26, 2013 9:12:36 PM UTC-4, David Fanning wrote:
> AMS writes:
>
>
>
>> I guess this question could be posed more generally as: how can I identify what parts of an image window lie within the portion available for drawing the map after a call to map_set, and how can I pass this to other routines such as cgimage?
>
>
>
> I would get the position from the !X.Window and !Y.Window system
>
> variables.
>
>
>
> Cheers,
>
>
>
> David
>
>
>
>
>
>
>
> --
>
> David Fanning, Ph.D.
>
> Fanning Software Consulting, Inc.
>
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: programmatically compile a procedure without a .pro extension
Next Topic: create a colorbar for negative and positive values

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

Current Time: Sat Oct 11 01:54:42 PDT 2025

Total time taken to generate the page: 0.96496 seconds