All, It took a fair bit of trial and error to coax a KML-friendly image out of matplotlib and to understand what was and was not necessary. Below is a demo script demonstrating how to accomplish a KML-friendly image with and without a basemap. I hope this will help someone out.
What do I mean by a KML-friendly image? In KML you can overlay a complicated geo-referenced image but it is geo-referenced based on the boundaries of the image. So, for the image to be correctly displayed in a KML document, the edges of the image have to be relatable to a latitude or longitude. Most of the time this will mean you are using Basemap and you'll need an image that encompasses only the bounding box and nothing outside...no whitespace, extra room for titling, etc. The below examples accomplish this. Turns out, the two key elements are (1) ax = pyplot.axes((0,0,1,1)) and if you are using Basemap: (2) a kwarg in Basemap: fix_aspect=False Thanks! Bruce --------------------------------------- Bruce W. Ford Clear Science, Inc. br...@clearscienceinc.com http://www.ClearScienceInc.com Phone/Fax: 904-379-9704 8241 Parkridge Circle N. Jacksonville, FL 32211 Skype: bruce.w.ford Google Talk: for...@gmail.com ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users