Hi list,

I need to realize with matplotlib OO same figure as in the tutorial: Working with multiple figure and axe.

The problem is the two subplot are overlaping on the middle of the figure.

There is no margin between the first subplot and the second.

And the vertical axe of the second subplot is overlaping the vertical axe of the first subplot.

How can i solve out this problem?

Thanks a lot,

Philippe Collet

Here is my sample code.

#!/usr/bin/env python

"""

A pure OO (look Ma, no pylab!) example using the agg backend

"""

from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas

from matplotlib.figure import Figure

fig = Figure()

canvas = FigureCanvas(fig)

ax = fig.add_subplot(111)

ax.plot([1,2,3])

ax.set_title("hi mom")

ax.grid(True)

ax.set_xlabel("time")

ax.set_ylabel("volts")

bx = fig.add_subplot(211)

ax.plot([3,4,5])

canvas.print_figure("test2")