Skip to main content

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.

  1. Install
$ pip install mplpanel
  1. 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


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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mplpanel-0.2.3-py3-none-any.whl (40.3 kB view details)

Uploaded Python 3

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

Hashes for mplpanel-0.2.3.tar.gz
Algorithm Hash digest
SHA256 cdbbc14de99848b10655fd19ef3077af731cc0e867c60ad1884577d98dbe7afd
MD5 f20737f0f932be491cf817d9cf120299
BLAKE2b-256 18151e90fbe54209c9f516b741e93f84dcda20aa6a6a3e159602c42c32188de3

See more details on using hashes here.

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

Hashes for mplpanel-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d31005825e23b58f6719be4edf9a25e3b430aa2fdefa41e84c3737a9deb0281a
MD5 96ea48e59e91f701513bb7c48f1b66ec
BLAKE2b-256 f7d748fa299602f1e8791c917ef6da0262e25e7a2753adf0f59540b66476ae69

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page