[wxPython-users] can a pyplot exist on a wxPanel or does it need to be in a wxFrame?

Christopher Barker Chris.Barker at noaa.gov
Thu Mar 8 16:02:21 PST 2007


C M wrote:
> Can you recommend a good method of embedding plots with wxPython?
> (MPlot <http://cars9.uchicago.edu/%7Enewville/Python/MPlot/>?  WxMpl =

> <http://agni.phys.iit.edu/%7Ekmcivor/wxmpl/>?)   I'd be willing to use =

> matplotlib if it wouldn't be too difficult.

wxMpl has worked well for me, though I haven't done a whole lot with it.

The advantage of MPL is that you can do a lot with it, and it has a =

great user/support community. I'll future-proof you against needing more =

complex plotting in the future.

>      > 2) Can one have points connected by lines in pyplot?

> I don't see it in the demo.  I mean what Excel calls a "line graph with
> markers displayed at each data value."

Maybe you need to add both a line and markers, if you want both:

         m.append(wx.lib.plot.PolyLine(points))
         m.append(wx.lib.plot.PolyMarker(points))
         return wx.lib.plot.PlotGraphics(m, "Test plot", "X axis", "Y Axis")

see enclosed.

-CHB


-- =

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testPlotApp4.py
Type: text/x-python
Size: 2213 bytes
Desc: not available
Url : http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/20070=
308/0bae9248/testPlotApp4.py


More information about the wxpython-users mailing list