A wx.Panel to use matplotlib plot in wxPython
Project description
mplpanel
mplpanel is a wx.Panel that makes it easy to use matplotlib plot in wxPython application.
- Install
$ pip install mplpanel
- Usage
# step 1: derive a class from MPLPanel
import matplotlib
matplotlib.use('module://path.to.demo_backend')
class DemoPanel(MPLPanel):
...
# step 2: create a backend, e.g,. to provide some helper functions
...
def new_figure_manager(num, *args, **kwargs):
...
from .demo_panel import DemoPanel
FigureClass = kwargs.pop('FigureClass', Figure)
thisFig = FigureClass(*args, **kwargs)
return DemoPanel.AddFigure('Figure %d' % num, num, thisFig)
...
# step 3: create a figure
...
import matplotlib.pyplot as plt
class MainFrame(wx.Frame):
...
def __init__(self, parent, **kwargs):
...
plt.figure()
...
Check the demo for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mplpanel-0.1.7.tar.gz
(40.7 kB
view details)
Built Distribution
mplpanel-0.1.7-py3-none-any.whl
(38.5 kB
view details)
File details
Details for the file mplpanel-0.1.7.tar.gz
.
File metadata
- Download URL: mplpanel-0.1.7.tar.gz
- Upload date:
- Size: 40.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | da13b819a4a8f65786070fa626a251307991e8be164d882e7bef32bea0e857c6 |
|
MD5 | 770f44b61175915f463561ef3f1f18b3 |
|
BLAKE2b-256 | d92f55e85944a1230d85eb3d55144751c62e63a151e221d968b442d3f9df8ca3 |
File details
Details for the file mplpanel-0.1.7-py3-none-any.whl
.
File metadata
- Download URL: mplpanel-0.1.7-py3-none-any.whl
- Upload date:
- Size: 38.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b1f032012f7ae345f502592948c191d9f402c2ff091d1031a61005b7ae77920 |
|
MD5 | 524b37e714a46c5d24849780744024ab |
|
BLAKE2b-256 | ed61ce89b8caf529f4a40e3ebb385f7873be1735eba5b99eb85f612e48ea561a |