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.0.tar.gz
(42.2 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.0-py3-none-any.whl
(40.1 kB
view details)
File details
Details for the file mplpanel-0.2.0.tar.gz.
File metadata
- Download URL: mplpanel-0.2.0.tar.gz
- Upload date:
- Size: 42.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0725497f97f3ac8493435ba70731a6e4efe13f2e402cd0766c4af210a9355d05
|
|
| MD5 |
fef5978751b2c2c84b0569e6a71f5b55
|
|
| BLAKE2b-256 |
9d4c24831d598d47809ea372cd8f015dfd1dbd64e5c22810d4e3c10c74357e02
|
File details
Details for the file mplpanel-0.2.0-py3-none-any.whl.
File metadata
- Download URL: mplpanel-0.2.0-py3-none-any.whl
- Upload date:
- Size: 40.1 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 |
650cc76644bfd37af6c89363a377c3af3fee16d83f04d543e394f7abbeff4042
|
|
| MD5 |
9af2a0900426c1fe9c38ba842f48e307
|
|
| BLAKE2b-256 |
46709a4959bdb98cb01a24d101452c32b93efd631dcfdb24247a38ddeec567a3
|