|
From: Remo G. <su...@li...> - 2014-03-20 08:27:48
|
Stupid me! I overlooked parameter 'ax' of class Basemap. You can pass an axis when creating a Basemap instance: ax = fig.add_axes([0., 0., 1., 1.]) map = Basemap(...., ax=ax) Best, Remo On 03/19/2014 04:41 PM, Remo Goetschi wrote: > Dear matplotlib users, > > I'm having trouble using Basemap through the object oriented interface > of Matplotlib. All the examples on the website use pyplot. But that does > not work if plots are generated in a parallel environment, i.e., in a > web application, since pyplot is obviously not thread safe. > > Does anyone have a working example of Basemap without pyplot? > One of the issues I'm having is that > > coastlines = map.drawcoastlines(linewidth=0.25) > > does not show any coastlines. The underlying figure is created like this: > > from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas > from matplotlib.figure import Figure, Axes > > fig = Figure() > canvas = FigureCanvas(fig) > ax = Axes(fig, [0., 0., 1., 1.]) > fig.add_axes(ax) > > I feel a bit lost here. Any help is appreciated. > > Cheers, > Remo > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > http://p.sf.net/sfu/13534_NeoTech > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |