Getting started
Install
Use Python 3.11 or newer. In a terminal, create an isolated environment if desired:
python -m venv .venv
Activate on Windows PowerShell with .\.venv\Scripts\Activate.ps1, or on macOS/Linux with source .venv/bin/activate. You can also invoke the environment's Python directly if activation is restricted.
From the source directory before publication:
python -m pip install .
After the release candidate is published to PyPI:
python -m pip install --pre plotora
Verify the environment:
python -c "import plotora as pt; print(pt.__version__, pt.__file__)"
First plot
import numpy as np
import plotora as pt
x = np.linspace(0, 2*np.pi, 500)
g = pt.plot(x, np.sin(x), xlabel="Time (s)", ylabel="Amplitude")
g.save("wave.svg").show()
show() invokes Matplotlib's native window display for all open figures. Save before a blocking show. In scripts, call g.close() once finished to release the figure.
Optional features
| Extra | Dependencies |
|---|---|
| engineering | spicelib, control, pint, uncertainties |
| interactive | plotly, ipympl |
| qt | PySide6 |
| video | imageio-ffmpeg |
| matlab | h5py |
| all | all runtime extras |
| dev | pytest, pytest-cov, build, twine, ruff |
For example, from source: python -m pip install ".[engineering]". Base dependencies are NumPy, Matplotlib, SciPy, pandas, SymPy, Pillow, openpyxl and statsmodels. Exact minimum declarations are in pyproject.toml; not all minimum versions have been tested.
Run the demo
From the source directory, python test.py opens native windows and writes example files into test-output. Use python test.py --headless for file-only rendering. Install pytest and run python -m pytest -q for the suite.