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.6.tar.gz
(40.1 kB
view details)
Built Distribution
mplpanel-0.1.6-py3-none-any.whl
(37.8 kB
view details)
File details
Details for the file mplpanel-0.1.6.tar.gz
.
File metadata
- Download URL: mplpanel-0.1.6.tar.gz
- Upload date:
- Size: 40.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1afe56ab073280f7565798b8147cbd4a3851ae288441144ad2085de5188bedf3 |
|
MD5 | 4b69f591a0b6692f200535d355551989 |
|
BLAKE2b-256 | d11d22c8c92d196c476833e854f8792655f28088ede7cc1e3a7c324f419a664c |
File details
Details for the file mplpanel-0.1.6-py3-none-any.whl
.
File metadata
- Download URL: mplpanel-0.1.6-py3-none-any.whl
- Upload date:
- Size: 37.8 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 | 51991d8c4330b8066e92b710f80e981da0aadcc9a592e7a6ee4fcc39b3444bea |
|
MD5 | b9d48b700da22226715217e1fc8bc9d6 |
|
BLAKE2b-256 | ee9b4f731de27387115da7c187c53003354ebd6cd7b36b4d17bfc289dc418589 |