After seeing tight_layout() already in your code, I did a complete re-write of my answer. I hope this is the behavior you want. Somehow tight_layout kind of works in this case (in your snippet tight_layout did not change margina at all on my windows XP box). Probably wx.Frame plays better with FigureCanvasWxAgg than wx.Panel?
import wx
import matplotlib
from matplotlib.figure import Figure
from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg
class GraphFrame(wx.Frame):
def __init__(self, parent):
wx.Frame.__init__(self, parent, -1, size=(300,300))
figure = Figure()
fc = FigureCanvasWxAgg(self, -1, figure)
axes = figure.add_subplot(111)
figure.tight_layout()
self.Show(True)
if __name__ == "__main__":
app = wx.PySimpleApp(0)
graphframe = GraphFrame(None)
app.MainLoop()