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.2.3.tar.gz
(42.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
mplpanel-0.2.3-py3-none-any.whl
(40.3 kB
view details)
File details
Details for the file mplpanel-0.2.3.tar.gz.
File metadata
- Download URL: mplpanel-0.2.3.tar.gz
- Upload date:
- Size: 42.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cdbbc14de99848b10655fd19ef3077af731cc0e867c60ad1884577d98dbe7afd
|
|
| MD5 |
f20737f0f932be491cf817d9cf120299
|
|
| BLAKE2b-256 |
18151e90fbe54209c9f516b741e93f84dcda20aa6a6a3e159602c42c32188de3
|
File details
Details for the file mplpanel-0.2.3-py3-none-any.whl.
File metadata
- Download URL: mplpanel-0.2.3-py3-none-any.whl
- Upload date:
- Size: 40.3 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 |
d31005825e23b58f6719be4edf9a25e3b430aa2fdefa41e84c3737a9deb0281a
|
|
| MD5 |
96ea48e59e91f701513bb7c48f1b66ec
|
|
| BLAKE2b-256 |
f7d748fa299602f1e8791c917ef6da0262e25e7a2753adf0f59540b66476ae69
|