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 #78129 is a reply to message #78128] Wed, 26 October 2011 16:16 Go to previous messageGo to previous message
Zhang Bo is currently offline  Zhang Bo
Messages: 22
Registered: October 2011
Junior Member
On Oct 26, 6:40 pm, David Fanning <n...@dfanning.com> wrote:
> 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.")

Thanks, again! David. Coyote Library fixes problem as usually.

I was hesitated to use Coyote Library when the build-in function
works, but it seems it's better to be familiar with it as earlier as
better.
[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: Thu Oct 09 21:23:58 PDT 2025

Total time taken to generate the page: 0.20410 seconds