Matplotlib savefig only saves image, not the lines
===

I have a matplotlib figure that I'm saving, using `figure.savefig(path)`. This saves the image that I have on my canvas, within the figure, but it doesn't save the lines that I have drawn over the image.

Here's how I'm creating my figure:

    if new:
        y, x = self.model.get_image_shape()
        self.figure = Figure(figsize=(x*2/72.0, y*2/72.0), dpi=72)
        self.canvas = FigureCanvasWxAgg(self.scroll, -1, self.figure)
        self.canvas.SetBackgroundColour('grey')
    self.axes = self.figure.add_axes([0.0, 0.0, 1.0, 1.0])
    self.axes.set_axis_off()
    self.axes.imshow(self.model.get_image(), aspect='auto') # aspect='auto' sets image aspect to match the size of axes
    self.axes.set_autoscale_on(False)
    self.mpl_bindings()
    y, = self.scroll.GetSizeTuple()[-1:]
    iHt, = self.model.get_image_shape()[:-1]
    self.aspect = (float(y)/float(iHt)) # zoom factor (0.0 - 1.0)
    self.controller.resize_image() # Resizes our figure according to the zoom factor

Now, I draw on the canvas as such (using the `draw_artist` method):

    def draw_polylines(self, adjustable, locked):
        if self.tmp_line: self.axes.draw_artist(self.tmp_line)
        for polyline in self.polylines:
            for line in polyline.lines:
                self.axes.draw_artist(line)
            if adjustable:
                for vertex in polyline.verticies:
                    self.axes.draw_artist(vertex)
            self.axes.draw_artist(polyline.label)

This works all good in the program (displaying the lines over the image) but when I try to use `savefig()`, only the image saves, not the lines.

Image should look like this (after saving to PNG):

![image with lines][1]

But I'm getting this:

![after saving (without lines)][2]

This is what I'm doing to save the figure:

    self.view.figure.savefig(dialog.GetPath(), dpi=self.view.figure.dpi)

Any ideas why this may not be saving the lines that I'm drawing, but only the image that the lines are being drawn on?

Thank you.


  [1]: http://i.stack.imgur.com/U4ysI.png
  [2]: http://i.stack.imgur.com/GBovH.png