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.4.tar.gz
(42.3 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.4-py3-none-any.whl
(40.2 kB
view details)
File details
Details for the file mplpanel-0.2.4.tar.gz.
File metadata
- Download URL: mplpanel-0.2.4.tar.gz
- Upload date:
- Size: 42.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
218e60178031d2607e46c6b518055508ecd3c5e76c25c5199f75e5e915771a54
|
|
| MD5 |
90dfd06acacfea180c31a763e88c39b6
|
|
| BLAKE2b-256 |
f219d3c7e266e0f6010a2e338b8fbfc07ace2f604841c34b7454da2587048ca4
|
File details
Details for the file mplpanel-0.2.4-py3-none-any.whl.
File metadata
- Download URL: mplpanel-0.2.4-py3-none-any.whl
- Upload date:
- Size: 40.2 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 |
cd41978c1c26992be566f73f8e545eaeb1e9498a426e684d20059839be5d5574
|
|
| MD5 |
4263cb66aa2f5c53436eeec1453e55ce
|
|
| BLAKE2b-256 |
f1ea06cb475e43ae2f21d8369ce1c607bd70b418d05d151ad2038d1c29b84c1c
|