>>>>> "Daniel" == Daniel Poelzleithner <[EMAIL PROTECTED]> writes:
Daniel> Hi, I'm developing a websuite for open meshed networks Daniel> written in django. I must admit, matplotlib and such was Daniel> kinda hard stuff to step into. Most examples and Daniel> documentation is only based on the pylab api, which isn't Daniel> well suited for my purpos, because Django runs best with Daniel> mod-python. There are a few resources http://matplotlib.sourceforge.net/faq.html#OO and http://matplotlib.sourceforge.net/leftwich_tut.txt and Ken McIvorhas converted many of the pylab examples to OO style (link?) See also http://matplotlib.sourceforge.net/examples/pythonic_matplotlib.py and http://matplotlib.sourceforge.net/examples/webapp_demo.py Daniel> Anyways. I'm wrote a function which generates tiles for Daniel> google maps and those should be overlayers with Daniel> transparent background. Daniel> My code currently looks like this: Daniel> from matplotlib.toolkits.basemap import Basemap from Daniel> matplotlib.backends.backend_agg import FigureCanvasAgg as Daniel> FigureCanvas from matplotlib.figure import Figure Daniel> [...] Daniel> def mktopo(ll_lng, ll_lat, ur_lng, ur_lat, aspect, Daniel> filename, state): """Generates atopo tile for given Daniel> latitude/longitude pairs""" dpi = 64 fig = Figure() canvas Daniel> = FigureCanvas(fig) # what does this do ??? Daniel> #fig.set_facecolor((1.0,1.0,0,0.0)) To make the figure background transparent, do: fig.figurePatch.set_alpha(0.0) You can set the alpha channel of any matplotlib artist (Text, Line2D, Rectangle, etc.). The two of most interest to you will be fig.figurePatch (a rectangle) and ax.axesPatch (ditto) JDH ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users