Displaying a title in wxPython embedded plot

I figured it out myself

self.axes.set_title(title)

Sorry to bother you all...

mc

···

At 12:22 PM 2/1/2006, mike cantor wrote:

Hi,

I embed a matplotlib canvas in a wxPython dialog. This works great and the title of the figure is displayed as the window title for the dialog, which is dandy. Here is a stripped down version of the code (minus navigation toolbar etc)

class PlotDialog(wx.Dialog):
  def __init__(
            self, parent, ID, title, MakeFigArgs, size=wx.DefaultSize, pos=wx.DefaultPosition, style=wx.DEFAULT_DIALOG_STYLE):

        # Precreation code
        pre = wx.PreDialog()
        pre.SetExtraStyle(wx.DIALOG_EX_CONTEXTHELP)
        pre.Create(parent, ID, title, pos, size, style)
        self.PostCreate(pre)

        self.canvas = FigureCanvas(self, -1, self.figure)
        self.figure = Figure(figsize=(5,4), dpi=100)
        self.axes = self.figure.add_subplot(111)
        self.axes.plot([1,2,3], [1,2,3]

However, I also want the title to appear in the plot itself, so that when I issue:

self.canvas.Copy_to_Clipboard(event=evt).

I have a title with my plot. Simply adding

title("The Title")

Does nothing.

Any tips?
Thanks -mike