Graph/Waveform on wxpython

Hi guys,

I’m looking for a way to plot a waveform on wxpython. i know that there is already wxpyplot include in wxpython, but i can’t seem to find a demo/example that i can work with. attached is also my code. i welcome criticism on my style as well as my method so i can further improve.

regards,

Rey

gui.py (6.42 KB)

The wxPython demo shows how to use the PyPlot widget. I also have a tutorial on the subject: http://www.blog.pythonlibrary.org/2010/09/27/wxpython-pyplot-graphs-with-python/

You can also use matplotlib in wxPython. Just Google for examples of that. It’s more complex, but it also handles much many more graph types.

Mike

···

On Thursday, February 12, 2015 at 10:38:52 AM UTC-6, Chong Hong Rui wrote:

Hi guys,

I’m looking for a way to plot a waveform on wxpython. i know that there is already wxpyplot include in wxpython, but i can’t seem to find a demo/example that i can work with. attached is also my code. i welcome criticism on my style as well as my method so i can further improve.

regards,

Rey

Hi Mike,

I tried running your example, but only to be met with this error.

wx._core.PyAssertionError: C++ assertion “m_window” failed at …/src/gtk/dcclient.cpp(2043) in DoGetSize(): GetSize() doesn’t work without window

does this look familiar to you?

regards,

Rey

···

On Friday, February 13, 2015 at 3:54:41 AM UTC+10, Mike Driscoll wrote:

On Thursday, February 12, 2015 at 10:38:52 AM UTC-6, Chong Hong Rui wrote:

Hi guys,

I’m looking for a way to plot a waveform on wxpython. i know that there is already wxpyplot include in wxpython, but i can’t seem to find a demo/example that i can work with. attached is also my code. i welcome criticism on my style as well as my method so i can further improve.

regards,

Rey

The wxPython demo shows how to use the PyPlot widget. I also have a tutorial on the subject: http://www.blog.pythonlibrary.org/2010/09/27/wxpython-pyplot-graphs-with-python/

You can also use matplotlib in wxPython. Just Google for examples of that. It’s more complex, but it also handles much many more graph types.

Mike

No, I don’t think I’ve seen that one before. Hopefully someone else on the list has…

Mike

···

On Thursday, February 12, 2015 at 5:41:37 PM UTC-6, Chong Hong Rui wrote:

Hi Mike,

I tried running your example, but only to be met with this error.

wx._core.PyAssertionError: C++ assertion “m_window” failed at …/src/gtk/dcclient.cpp(2043) in DoGetSize(): GetSize() doesn’t work without window

does this look familiar to you?

regards,

Rey

Chong Hong Rui wrote:

Hi Mike,

I tried running your example, but only to be met with this error.
wx._core.PyAssertionError: C++ assertion "m_window" failed at
../src/gtk/dcclient.cpp(2043) in DoGetSize(): GetSize() doesn't work
without window
does this look familiar to you?

Which version of wxPython?

···

--
Robin Dunn
Software Craftsman