setting zorder for basemap.imshow(); overlay on continents

Hi,
Im trying to create a precipitation contour plot using imshow() and basemap.
Id like to draw the imshow() plot so that it overlays the filled continents, yet NOT the continental outlines.
unfortunately, it appears that imshow()'s graphics are always drawn before everything else, so its ‘zorder’ argument is useless with basemap.
the imshow() output is always at the bottom layer, with everthing else being overlaid on it & covering it up.

is there a work-around for this, so that I can layer imshow()'s output between my calls to ‘basemap.fillcontinents()’ and ‘basemap.drawcoastlines()’???

please help,

thanks,
p.romero

···

Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox. Learn more.

I don’t think this is possible - zorder doesn’t work with images. You
can use transparency though.

-Jeff

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

Jeffrey.S.Whitaker@…259…http://tinyurl.com/5telg

Jeff,
would it be possible to achieve this type of layering using multiple overlaid (sub) plots?
If so, how would I go about this?

Send

do you know of any way I might be able to create a custom ‘hack’ into the imshow code (within the
matplotlib core) ???

thanks again,
p.romero

···

Date: Mon, 24 May 2010 11:43:04 -0600
From: jswhit@…146…
Subject: Re: [Matplotlib-users] setting zorder for basemap.imshow(); overlay on continents
To: romero619@…32…; matplotlib-users@…563…eforge.net

On 5/24/10 10:09 AM, P. R.M. wrote:

Hi,

Im trying to create a precipitation contour plot using imshow() and
basemap.

Id like to draw the imshow() plot so that it overlays the filled
continents, yet NOT the continental outlines.

unfortunately, it appears that imshow()'s graphics are always drawn
before everything else, so its ‘zorder’ argument is useless with
basemap.

the imshow() output is always at the bottom layer, with everthing else
being overlaid on it & covering it up.

is there a work-around for this, so that I can layer imshow()'s output
between my calls to ‘basemap.fillcontinents()’ and
‘basemap.drawcoastlines()’???

please help,

thanks,

p.romero

I don’t think this is possible - zorder doesn’t work with images. You
can use transparency though.

-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-113
Boulder, CO, USA 80303-3328 Web : [http://tinyurl.com/5telg](http://tinyurl.com/5telg)


The New Busy is not the old busy. Search, chat and e-mail from your inbox. Get started.

Zorder works with images in svn, but maybe this change was after the last release.

Eric

···

On 05/24/2010 07:43 AM, Jeff Whitaker wrote:

On 5/24/10 10:09 AM, P. R.M. wrote:

Hi,
Im trying to create a precipitation contour plot using imshow() and
basemap.
Id like to draw the imshow() plot so that it overlays the filled
continents, yet NOT the continental outlines.
unfortunately, it appears that imshow()'s graphics are always drawn
before everything else, so its 'zorder' argument is useless with basemap.
the imshow() output is always at the bottom layer, with everthing else
being overlaid on it & covering it up.

is there a work-around for this, so that I can layer imshow()'s output
between my calls to 'basemap.fillcontinents()' and
'basemap.drawcoastlines()'???

please help,

thanks,
p.romero

I don't think this is possible - zorder doesn't work with images. You
can use transparency though.