Lionel Roubeyrie wrote:
> Hi Jeff,
> yes I see this method, but set_xlim and set_ylim use axes coordinates, and I 
> would like to use geographic coordinates.
> It would be great if we could put an image in a map directly by specifying 
> its 
> geographic coordinates
>   

Lionel:  There's no way to do that - but it's pretty easy to convert to 
geographic to map (axes) coordinates using the Basemap instance __call__ 
method.  So, if m is the Basemap instance, you can do something like

x1,y1 = m(lon1,lon1)
x2,y2 = m(lon2,lat2)
ax.set_ylim(y1,y2)
ax.set_xlim(x1,x2)

-Jeff
> Le mardi 26 février 2008, Jeff Whitaker a écrit :
>   
>> Lionel Roubeyrie wrote:
>>     
>>> Hi all,
>>> I'm sure it's a trivial question, but can't find any valid answer in the
>>> basemap examples directory or with google : I have a georeferenced TIFF
>>> file in 'lcc' projection, representing a little portion of France, and I
>>> need to put it on a map, resets map limits to a closed portion of the
>>> map, and put contours on it. I see how to initialise Basemap with the
>>> limits of the raster, but not how to "make a zoom" in the map by
>>> specifing coordinates. Thanks for your help
>>>       
>> Lionel:  You can use the set_xlim and set_ylim axes methods to manually
>> 'zoom' the plot.  It has to be done after all the other plotting though,
>> since all the Basemap methods (contour, imshow etc) will reset the axes
>> limits to show the entire map region.
>>
>> -Jeff
>>     
>
>
>
>   


-- 
Jeffrey S. Whitaker         Phone : (303)497-6313
NOAA/OAR/CDC  R/PSD1        FAX   : (303)497-6449
325 Broadway                Boulder, CO, USA 80305-3328


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to