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

Home » Public Forums » archive » Re: expanded area is shown when trying to plot an image on a map
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: expanded area is shown when trying to plot an image on a map [message #78130 is a reply to message #78129] Wed, 26 October 2011 15:40 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Zhang Bo writes:

> I have a north hemisphere 2D consentration array. 360*90
> I set up a map
> map_set, /mercator, 0, -50, limit = [ymin, xmin, ymax, xmax], $
> color = cgcolor('black'), $
> position = [xregion(0), yreg_bot(0), xregion(1), yreg_bot(1)], $
> charsize = 1, /noerase
>
> I warp the image
> new_img = map_image(img, startx,starty,/BILINEAR, /WHOLE_MAP, $
> latmin = 1, latmax = 90, lonmin = -179, $
> lonmax = 180, compress = 1)
>
> and then I show the image
> TV, new_img, startx,starty
>
> My problems are:
> 1 Since I have a color bar to show, I squeeze the map by setting
> posiont in map_set. However, the img shown by TV does not squeeze.
> 2 Although I set up start position for TV, data are shown outside the
> map area and overlap with plot title.
> Basically I am asking when you have a global data set, how to plot the
> data any place you want to zoom in and also make sure the data align
> with the lat-lon postion correctly.

I would say, use Coyote Library routines. :-)

For example, cgImage honors the Position keyword:

cgImage, new_image, $
Position=[xregion(0), yreg_bot(0), xregion(1), yreg_bot(1)]

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.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Creating a jpeg file from a colored plot
Next Topic: Re: plot 3 array one up to another

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

Current Time: Wed Oct 08 20:10:39 PDT 2025

Total time taken to generate the page: 0.00260 seconds