images layers

Hi all,
I think it's a trivial question, but don't find a solution:
Drawing an image with imshow (in fact basemap.imshow), I need to put others
images on it, but smallers, at specified locations.
Is there a way to do so, I have tried with extent parameter, but doesn't do
what I expect?
Thanks

···

--
Lionel Roubeyrie - lroubeyrie@...1068...
Chargé d'études et de maintenance
LIMAIR - la Surveillance de l'Air en Limousin
http://www.limair.asso.fr

Lionel Roubeyrie wrote:

Hi all,
I think it's a trivial question, but don't find a solution:
Drawing an image with imshow (in fact basemap.imshow), I need to put others images on it, but smallers, at specified locations.
Is there a way to do so, I have tried with extent parameter, but doesn't do what I expect?
Thanks
  

Lionel: I think you'll need to add other axes to the figure, and then draw the image with axes.imshow.

See http://matplotlib.sourceforge.net/screenshots/axes_demo.py for an example of how to use inset axes.

-Jeff

···

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

Hi Jeff,
I've saw that, but I have the smalls images coordinates in geographic system,
then I need to recompute their position everytime the user will change the
figure's aspect, ... Not very usefull. Is there a way to extend the missing
areas around each small image by a "transparent" value, and put this new
image layer on the background image? My last chance is to perform the
operation directly with PIL, but BTW, I'll lose Basemap projections
facilities.

···

Le jeudi 04 octobre 2007, Jeff Whitaker a écrit :

Lionel: I think you'll need to add other axes to the figure, and then
draw the image with axes.imshow.

See http://matplotlib.sourceforge.net/screenshots/axes_demo.py for an
example of how to use inset axes.

-Jeff

--
Lionel Roubeyrie - lroubeyrie@...1068...
Chargé d'études et de maintenance
LIMAIR - la Surveillance de l'Air en Limousin
http://www.limair.asso.fr

Lionel Roubeyrie wrote:

Hi Jeff,
I've saw that, but I have the smalls images coordinates in geographic system,
then I need to recompute their position everytime the user will change the figure's aspect, ... Not very usefull. Is there a way to extend the missing areas around each small image by a "transparent" value, and put this new image layer on the background image?

Lionel: Not sure what you mean here, but you plot masked arrays with imshow, making the missing values transparent (see the image_masked.py example). Perhaps you could pad the 'small' image with missing values so that it's the same size as the background image, then just plot it over the top with basemap.imshow().

My last chance is to perform the operation directly with PIL, but BTW, I'll lose Basemap projections facilities.
  

As a last resort you can perform the layering with PIL, the plot the PIL image with matplotlib (see image_demo3.py and geos_demo_2.py in the basemap examples).

-Jeff

···

Le jeudi 04 octobre 2007, Jeff Whitaker a �crit :
  

Lionel: I think you'll need to add other axes to the figure, and then
draw the image with axes.imshow.

See http://matplotlib.sourceforge.net/screenshots/axes_demo.py for an
example of how to use inset axes.

-Jeff
    
--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@...259...
325 Broadway Office : Skaggs Research Cntr 1D-124
Boulder, CO, USA 80303-3328 Web : Jeffrey S. Whitaker: NOAA Physical Sciences Laboratory