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.8.tar.gz
(40.8 kB
view details)
Built Distribution
mplpanel-0.1.8-py3-none-any.whl
(38.5 kB
view details)
File details
Details for the file mplpanel-0.1.8.tar.gz
.
File metadata
- Download URL: mplpanel-0.1.8.tar.gz
- Upload date:
- Size: 40.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b3a9c5b0e9b1d97f0177868fede01ac5428d665880787c8ae9492223d53c2b5 |
|
MD5 | bede9e222c3a5f03d8df5e615be9fffb |
|
BLAKE2b-256 | fc62dd5ecced694778e6f06b576a9b8044504627d7a8c84844af9856f7cfd2e9 |
File details
Details for the file mplpanel-0.1.8-py3-none-any.whl
.
File metadata
- Download URL: mplpanel-0.1.8-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 | 70fa2ffbd87b16900c1cd0dcf93a11cbb5c0ca21bba0d37621728814945d84d8 |
|
MD5 | c93a9aa7c1eaa36c762a2a0d86566032 |
|
BLAKE2b-256 | d48dc9e5f1e90f98c5046a30b92df7e76c31a6ee65068986ed262f0cde584d47 |