Skip to main content

MatPlotEdit

Editable MATLAB .fig-style desktop files for Matplotlib.

matplotedit.save(fig, "plot.mpe") stores the Matplotlib figure as a portable JSON schema. matplotedit open plot.mpe launches a PyQt6 desktop editor where you can pan/zoom, edit titles, labels, limits, scales, trace colors, visibility, and export to PNG/SVG/PDF.

Install

From PyPI:

pip install matplotedit

From this folder:

pip install -e .

If PyQt6 is not already installed, the command above installs it with the package dependencies.

Save A Figure

import matplotlib.pyplot as plt
import matplotedit

fig, ax = plt.subplots(figsize=(8, 5))
ax.plot([1, 2, 3, 4], [2, 4, 1, 6], label="Series A", color="#e94560")
ax.scatter([1, 2, 3, 4], [1, 3, 5, 2], label="Points", color="#0f8fff")
ax.set_title("Demo")
ax.set_xlabel("X")
ax.set_ylabel("Y")
ax.legend()
ax.grid(True)

matplotedit.save(fig, "demo.mpe", open_after=True)

Open A File

matplotedit open demo.mpe

or:

import matplotedit
matplotedit.open_viewer("demo.mpe")

Inspect Metadata

matplotedit info demo.mpe

Desktop Editor Features

  • Matplotlib navigation toolbar: pan, zoom, reset, configure, save image.
  • Figure editor: title, size, DPI, background color.
  • Figure size controls include numeric inputs and sliders for width, height, and DPI.
  • Selected plot box controls let you resize/reposition the active subplot and change that subplot's background color independently. The active plot is shown and selectable directly in the Figure tab.
  • Axes editor: title, X/Y labels, X/Y limits, linear/log scales, grid toggle, font family, tick font size, title font size, label font size, and explicit X/Y tick values.
  • Axis label position controls let you move the X/Y labels in axes coordinates.
  • Grid editor: major grid, minor grid, color, alpha, line style, and line width.
  • Legend editor: visibility, title, font family, font size, frame, location, and X/Y anchor. Legends are also draggable inside the figure. A dragged legend keeps priority across redraws and figure-size edits until you choose Use Code Location.
  • Trace editor: label, color, line width, alpha, visibility.
  • Marker editor: marker type, size, fill color, edge color, edge width, and marker alpha for line/scatter plots.
  • Line/patch editor: line style, draw style, line width, bar edge color, and bar hatch where those properties apply.
  • Text editor: add/delete custom text with data-position, font family, font size, color, rotation, visibility, and direct dragging in the plot.
  • Default text styling is Times New Roman, 18 pt for generic Matplotlib fonts.
  • Data inspector: hover near a point to read X/Y values, click near a point to pin a callout on the figure. Line, scatter, and bar data are supported.
  • Zoom out: use the toolbar Home button, the toolbar Back button, or View > Reset View / Zoom Back.
  • Direct editing: double-click an axes title, X label, Y label, tick label, or legend to jump to the matching editor field.
  • Figure-layout pan: View > Pan Figure Layout moves all axes boxes together.
  • File menu: open, save, save as, export PNG/SVG/PDF.

Test Everything

python test_all_plots.py
python test_plot_types_separate.py
matplotedit open MatPlotEdit_all_plots.mpe
matplotedit open MatPlotEdit_matlab_style.mpe

Backward Compatibility

Older .mpe files created as self-contained HTML still load. The new default format is JSON because it is better suited to a desktop app.

To keep generating the old browser file:

matplotedit.save_html(fig, "demo.html")
# or
matplotedit.save(fig, "demo.mpe", legacy_html=True)

Supported Plot Types

Matplotlib call Desktop rendering
ax.plot() Line
ax.scatter() Scatter
ax.bar() Bar
ax.imshow() Image
ax.annotate() Annotation
Multiple axes Multiple Matplotlib axes

Build A Windows App

Install PyInstaller:

pip install pyinstaller

Build an executable launcher:

python -m PyInstaller --name MatPlotEdit --windowed --collect-all PyQt6 --collect-all matplotlib matplotedit\__main__.py

The executable will be created under dist\matplotedit.

Metadata

Release files for matplotedit 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for matplotedit 1.0.0
File Size Uploaded Provenance Actions
matplotedit-1.0.0.tar.gz 51.5 kB With provenance Details for matplotedit-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for matplotedit 1.0.0
File Interpreter ABI Platform Actions
matplotedit-1.0.0-py3-none-any.whl Python 3 none any Details for matplotedit-1.0.0-py3-none-any.whl

Total release size: 103.4 kB

Release files / matplotedit-1.0.0.tar.gz

Download URL matplotedit-1.0.0.tar.gz
Size 51.5 kB
Tags Source
SHA-256 checksum
How to use checksums
f12e869b5c4085301ee262079abcebfe4375cd0838b93b8007e341fb233c6458
BLAKE2b-256 checksum
How to use checksums
6ee0643a6329319962f2a2db82ed37382060b235cec34e60cf0617cd70d5af8b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 10, 2026.

Transparency log

Release files / matplotedit-1.0.0-py3-none-any.whl

Download URL matplotedit-1.0.0-py3-none-any.whl
Size 51.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0d91eb6f0f77ef6442a872aa87137526a6c578af79a4bf612839c66898138268
BLAKE2b-256 checksum
How to use checksums
1455611fcfa6be260252e12069ec64da0e03d1f905de1ad4b483c98623dc50a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 10, 2026.

Transparency log

Security for matplotedit 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for matplotedit-1.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 10, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page