Design matplotlib figure layouts visually, then reuse them in Python.
PyPI package: https://pypi.org/project/pyplotdesigner/
pip install -U pip
pip install pyplotdesignerpython -m pyplotdesigner.gui.mainThis 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)
- 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.
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])git clone git@github.com:gnwong/pyplotdesigner.git
cd pyplotdesigner
pip install -U pip
pip install -e .pip install pytest
pytestThese tests exercise the real browser UI against the FastAPI app.
Install once:
npm install
npx playwright install chromiumRun E2E suite:
npm run e2eUseful variants:
npm run e2e:headed
npm run e2e:uiContributions 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.
MIT (see LICENSE).