The Blue Marble is upside down!

Dear Jeff & ALL,

Attached is the latest version of my Basemap embedded in wxPython
sample application. I have added a check menu option that allows one
to toggle the overlay of the Blue Marble image on and off the Basemap
figure. Everything works well -- except that the Blue Marble image is
plotted upside down! I could not figure out the cause of this, say,
rather bizarre behaviour. Any hints?

Thanks in advance for any assistance you can provide.

Best regards,

PS This version has another known bug, to be eventually fixed -- if
the user has plotted a point coordinate file, the points are erased if
the Blue Marble overlay is requested because the PlotMap() routine
calls ax.cla() at the start.

Gaia.py (8.28 KB)

···

--
Dr. Mauro J. Cavalcanti
Ecoinformatics Studio
P.O. Box 46521, CEP 20551-970
Rio de Janeiro, RJ, BRASIL
E-mail: maurobio@...287...
Web: http://studio.infobio.net
Linux Registered User #473524 * Ubuntu User #22717
"Life is complex. It consists of real and imaginary parts."

Mauro Cavalcanti wrote:

Dear Jeff & ALL,

Attached is the latest version of my Basemap embedded in wxPython
sample application. I have added a check menu option that allows one
to toggle the overlay of the Blue Marble image on and off the Basemap
figure. Everything works well -- except that the Blue Marble image is
plotted upside down! I could not figure out the cause of this, say,
rather bizarre behaviour. Any hints?

Thanks in advance for any assistance you can provide.

Best regards,

PS This version has another known bug, to be eventually fixed -- if
the user has plotted a point coordinate file, the points are erased if
the Blue Marble overlay is requested because the PlotMap() routine
calls ax.cla() at the start.

Mauro: The image flipping looks to be a Wx backend bug - it doesn't happen if you use WxAgg instead.

-Jeff

P.S. It's not recommended to use tabs in python code. Especially don't mix tabs and spaces (http://www.python.org/dev/peps/pep-0008/).

···

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

It's not recommended to use tabs in python code.

That is project dependent. And a religious war.
(Note that tabs have many advantages.
E.g., explicit is better than implicit,
and one tab is explicitly one level on indent.)

Especially don't mix tabs and spaces (http://www.python.org/dev/peps/pep-0008/).

True enough. (For indenting.)
Maybe PEP 666 should have been accepted.
http://www.python.org/dev/peps/pep-0666/

Alan Isaac

···

On 12/12/2008 7:48 AM Jeff Whitaker apparently wrote:

Dear Jeff,

2008/12/12 Jeff Whitaker <jswhit@...146...>:

Mauro: The image flipping looks to be a Wx backend bug - it doesn't happen
if you use WxAgg instead.

Thank you very much. It works quite well with WxAgg. Incidentally, the
WXAgg backend also provides for a slightly better and faster rendering
(not of the Blue Marble itself, but of usual maps).

P.S. It's not recommended to use tabs in python code. Especially don't mix
tabs and spaces (http://www.python.org/dev/peps/pep-0008/).

I do agree that tabs and spaces have *never* to be mixed. The mixing
of tabs and spaces may be a misconfiguration of the IDE I use
(DrPython). Have to check.

With best regards,

···

--
Dr. Mauro J. Cavalcanti
Ecoinformatics Studio
P.O. Box 46521, CEP 20551-970
Rio de Janeiro, RJ, BRASIL
E-mail: maurobio@...287...
Web: http://studio.infobio.net
Linux Registered User #473524 * Ubuntu User #22717
"Life is complex. It consists of real and imaginary parts."