It sounds like you're using WxMpl to embed matplotlib in something. If that's the case, you should look at the example code below. Otherwise, please send a short example script to the list.
Also, please note that disabling the frame effectively makes the figure's background transparent when using the WXAgg backend. I'm not sure if this is the intended behavior. If that's not what you want, you can probably just set the Figure's face and edge colors to the same thing using Figure.set_edgecolor() and Figure.set_facecolor().
Ken
import wxmpl
import wx
class MyPlotPanel(wxmpl.PlotPanel):
def __init__(self, parent, id, **kwds):
wxmpl.PlotPanel.__init__(self, parent, id, **kwds)
fig = self.get_figure()
fig.set_frameon(False)
if __name__ == '__main__':
app = wx.PySimpleApp()
frame = wx.Frame(None, -1, 'Frame Off')
panel = MyPlotPanel(frame, -1)
szr = wx.BoxSizer(wx.VERTICAL)
szr.Add(panel, 1, wx.EXPAND|wx.ALL, 5)
frame.SetSizer(szr)
frame.Fit()
axes = panel.get_figure().gca()
axes.plot([0,1,2,3,4,5])
frame.Show(True)
app.MainLoop()
···
On Apr 1, 2007, at 11:27 PM, Chelonian wrote:
I'm new to matplotlib, and I can't even get this to work (let alone the
other fix of changing the colors). Could you elaborate about how to
implement this? I've tried putting these lines in the __init__ of the
PlotPanel() class, but I can't get it. Any help is appreciated, thank you.