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.

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()

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to