A set of tools to help format matplotlib figures
Project description
pyplotdesigner
Design matplotlib figure layouts visually, then reuse them in Python.
PyPI package: https://pypi.org/project/pyplotdesigner/
Quickstart (recommended: PyPI)
1) Install with pip
pip install -U pip
pip install pyplotdesigner
2) Start the GUI
python -m pyplotdesigner.gui.main
This opens your browser automatically. If it does not, open:
http://127.0.0.1:8080/ui
Optional:
python -m pyplotdesigner.gui.main --no-browser(disable auto-open)python -m pyplotdesigner.gui.main --reload(enable auto-reload for dev)
3) Build a layout in the GUI
- Click Add Axis.
- Drag boxes into place.
- Add constraints (align, match size, aspect ratio, spacing, etc.).
- Click Import/Export and copy the base64 layout string.
4) Use the exported layout in Python
from pyplotdesigner.core.design_loader import make_figure_from_b64
layout_b64 = "PASTE_EXPORTED_STRING"
fig, axes = make_figure_from_b64(layout_b64)
# Example:
# left_panel = axes['left_panel']
# left_panel.plot([0, 1], [0, 1])
If you need to: clone and install locally
git clone git@github.com:gnwong/pyplotdesigner.git
cd pyplotdesigner
pip install -U pip
pip install -e .
Run tests
pip install pytest
pytest
Frontend E2E tests (Playwright)
These tests exercise the real browser UI against the FastAPI app.
Install once:
npm install
npx playwright install chromium
Run E2E suite:
npm run e2e
Useful variants:
npm run e2e:headed
npm run e2e:ui
Contributing
Contributions are welcome.
Expected workflow:
- Open an issue (or reference an existing one) describing the change.
- Create a focused branch and implement the change.
- Add or update tests for any new feature or behavior change.
- Run tests locally (
pytest) and make sure they pass. - Open a PR with a clear summary and testing notes.
Guidelines:
- Keep changes focused and minimal.
- Preserve existing behavior unless your PR intentionally changes it.
- If behavior changes, document it and include regression coverage.
License
MIT (see LICENSE).
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
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
File details
Details for the file pyplotdesigner-0.5.0.tar.gz.
File metadata
- Download URL: pyplotdesigner-0.5.0.tar.gz
- Upload date:
- Size: 16.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
245b543597f6c3200656bfb4dd7e26648b62a853e13888f98c66c9a3e4e3d71f
|
|
| MD5 |
7a86f3e6e560ccdea3b6b5332f386885
|
|
| BLAKE2b-256 |
21d066c3be908761bd592ea42b4101b49bb4f433b908631a35a0055f2add76a6
|
File details
Details for the file pyplotdesigner-0.5.0-py3-none-any.whl.
File metadata
- Download URL: pyplotdesigner-0.5.0-py3-none-any.whl
- Upload date:
- Size: 14.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ecac39c59a62005755f52e23403566fbe6a0e41d8a810afaf7cf5ba852b4459
|
|
| MD5 |
07e3666f5b7ecf7567ab08613664b9d2
|
|
| BLAKE2b-256 |
976d46dd216cc502646ff3838ab157de77b3834af043c0088bc3e7a8dbf81989
|