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
x/y margin from map_set to plot position and cgimage [message #85677] Mon, 26 August 2013 10:36 Go to previous message
Andy Sayer is currently offline  Andy Sayer
Messages: 127
Registered: February 2009
Senior Member
Hi all,

Suppose I have set up a part of a window to draw a map, and used xmargin and ymargin to specify the margins around this map. For example:

map_set,0,0,xmargin=[2,2],ymargin=[2,2]

Suppose I then want to draw an image (with cgimage) inside this map. Is there a way to pass the xmargin/ymargin information so the image is drawn inside the map region rather than the whole plot window? I don't see those as keywords to cgimage. If not, is there some way I can pull out the plot position which arose from my map_set call and pass this to cgimage? I can't necessarily assume that !p.multi=0, so I don't think the cgimage position keyword would help me here?

(I am switching over a lot of old code written for IDL 5/6 to use newer features and the Coyote library... so am now becoming familiar with some 'under the hood' stuff which I had not looked at in detail before. I'm now using IDL 7.1.1 and 8.2.2.)

I would not be averse to recoding to use something like the Coyote Graphics position keyword in my map_set call, but as far as I know that can't be done with map_set (and I don't want to pass the position keyword to map_set because often !p.multi will not be 0).

The longer story for what I am trying to do is that I have written code to map regularly or irregularly lat-lon gridded data from e.g. satellites. This basically makes use of polyfill to draw each point. If the grid is not regular, my code allows for a proper expression of the ground pixel size. But if the grid is regular (e.g. level 3 data), I figure I should be able to map it as an image, which could be a lot faster than using polyfill.

Thanks,

Andy
[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: Wed Oct 08 15:36:38 PDT 2025

Total time taken to generate the page: 0.00447 seconds