Re: [Matplotlib-users] raster in basemap

2008-02-28 Thread Lionel Roubeyrie
Jeff,
yes it works, the unique constraint is to put the image when we create the 
basemap instance.

Le jeudi 28 février 2008, Jeff Whitaker a écrit :
 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



-- 
Lionel Roubeyrie - [EMAIL PROTECTED]
Chargé d'études et de maintenance
LIMAIR - la Surveillance de l'Air en Limousin
http://www.limair.asso.fr


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


Re: [Matplotlib-users] raster in basemap

2008-02-27 Thread Lionel Roubeyrie
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

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



-- 
Lionel Roubeyrie - [EMAIL PROTECTED]
Chargé d'études et de maintenance
LIMAIR - la Surveillance de l'Air en Limousin
http://www.limair.asso.fr


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


Re: [Matplotlib-users] raster in basemap

2008-02-27 Thread Jeff Whitaker
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/PSD1FAX   : (303)497-6449
325 BroadwayBoulder, 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/vse012070mrt/direct/01/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] raster in basemap

2008-02-26 Thread Lionel Roubeyrie
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 Roubeyrie - [EMAIL PROTECTED]
Chargé d'études et de maintenance
LIMAIR - la Surveillance de l'Air en Limousin
http://www.limair.asso.fr


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


Re: [Matplotlib-users] raster in basemap

2008-02-26 Thread Jeff Whitaker
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
Meteorologist   FAX: (303)497-6449
NOAA/OAR/PSD  R/PSD1Email  : [EMAIL PROTECTED]
325 BroadwayOffice : Skaggs Research Cntr 1D-124
Boulder, CO, USA 80303-3328 Web: http://tinyurl.com/5telg


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