Plotora1.0.0← LibraryScientific visualization, simplified.
DOCUMENTATION / REFERENCE

Plotora

Scientific visualization, simplified. A Matplotlib-native scientific plotting toolkit. 1.0.0 is a local release candidate, not a published or fully platform-certified release. No separate graphical editor, network calls, telemetry or API keys.

Install locally (Windows, PowerShell or CMD)

Extract the ZIP, open a terminal in the folder containing pyproject.toml, and run:

bash
python -m pip install .
python test.py

For developers: python -m pip install -e .. For all extras: python -m pip install ".[all]". For native RAW and control tools: python -m pip install ".[engineering]". For a Qt window backend: python -m pip install ".[qt]". The included wheel in dist/ can also be installed directly with python -m pip install dist/plotora-1.0.0-py3-none-any.whl. Installation may require network access to obtain dependencies; plotting itself is offline. Python 3.11+; tested here on Python 3.13/Linux only.

python test.py writes example figures and runs numerical assertions, then opens normal Matplotlib windows if an interactive backend is available. python test.py --headless only renders files. Example capacitor waveforms are synthetic, not measured or simulated LTspice results. For the full suite: python -m pip install pytest then python -m pytest -q. If testing from a fresh checkout without installing, set PYTHONPATH=src (shell-specific syntax).

Quick start

python
import plotora as pt

pt.set_theme('academic')
pt.plot([0,1,2], [0,2,4], xlabel='Time (s)', ylabel='Voltage (V)') \
  .save('figure.pdf').show()

# LTspice: click waveform window, File > Export data as text.
g = pt.ltspice('examples/capacitor_4700.txt', traces=['V(out)'], time_unit='ms')
g.save_all('output', formats=['pdf','svg','png','jpeg'], dpi=600).show()

# All Matplotlib functions remain available.
g.ax.set_title('Output voltage')
g.fig.savefig('custom.pdf')

For native windows, Plotora uses the backend selected by Matplotlib. If needed, select TkAgg or QtAgg before importing Plotora (import matplotlib; matplotlib.use('QtAgg')). This requires the appropriate backend and a desktop display. Native plotting windows are not Plotora Studio.

API reference by task

Every plotting function returns Graph with .fig, .figure, .ax (first axis), .axes (single or multiple axes), .data (where available), .metadata, .save(), .save_all(), .show(), .close(). Graph.add(x,y,label=...), .annotate, .shade, .hline, .vline chain; .secondary_y()/.secondary_x() return native axes. .show() invokes Matplotlib's pyplot.show for all currently open figures. Plotting functions accept common labels, limits, title, scale, theme and figsize where applicable; standard plot types pass remaining artist options through to Matplotlib. figure(rows=2,cols=2) creates native subplots. Native Matplotlib escape hatch is always available.

Area Public functions
Standard plot, line, scatter, bar, hist, area, boxplot, stem, polar, pie, heatmap, contour, vector_field, errorbar, compare, figure
SPICE read_ltspice, ltspice, compare_ltspice
Systems transfer_function, bode, bode_asymptotic, corner_frequencies, poles_zeros, nyquist, step_response, impulse_response, root_locus, stability_margins, bandwidth, phasors, impedance, power_triangle
Signals metrics, ripple, peaks, resample, spectrum, fft, spectrogram, timing, harmonics, phase_difference
Math function, parametric, taylor, derivative, tangent, integral, implicit, direction_field, ode, vectors, transform, fourier, sequence
Statistics describe, regression, curve_fit, residuals, distribution, correlation, outliers, integrate_data, differentiate_data, interpolate_data, smooth, moving_average, propagate
3D surface, wireframe, scatter3d, line3d, vector_field3d, contour3d
Data load, from_file, clean, normalize, merge, export_data, convert
Export animate, latex_figure, graph methods
Styles themes, set_theme, register_theme, style

LTspice and measurements

python
s = pt.read_ltspice('examples/capacitor_4700.txt')
print(s.traces, s.step_names)
print(s.metrics('V(out)', window=(0.06, 0.10)))  # window in original time units (seconds)
pt.ltspice(s, step=0, time_unit='ms', window=(0.06,0.10)).show()
pt.compare_ltspice('examples/capacitor_4700.txt','examples/capacitor_6800.txt',
                   trace='V(out)', labels=['4700 µF','6800 µF']).show()

Text input: tab-separated exported traces (CSV with quoted complex cells also supported), UTF-8/UTF-16 BOM/CP1252, optional Step Information: separators, AC real/imaginary or dB/phase pairs. component='magnitude'|'db'|'phase'|'real'|'imag' applies to complex traces. Complex traces are magnitude by default; phase is unwrapped degrees. Time units are automatic or explicit. Mixed physical units should be plotted separately (or use native twin axes). Simulation.runs contains DataFrames; axis, trace, metrics select a zero-based step. Native RAW is delegated to optional spicelib, not verified with real RAW files in this build; stepped RAW may require its associated simulator log. compare_ltspice handles single-run transient files. Metrics use trapezoidal time-weighted mean and exact RMS of piecewise-linear interpolation, not sample-count averages. FFT requires uniform sampling; resample is explicit. Do not infer unsampled extrema or claim accuracy beyond the input data.

Engineering and math

python
pt.bode(num=[1], den=[0.01,1], unit='rad/s').show()
pt.bode_asymptotic([1],[0.01,1]).show()
pt.root_locus([1],[1,3,2]).show()
pt.function('sin(x)/x', domain=(-10,10)).show()
pt.taylor('sin(x)', degree=5, center=0).show()
pt.surface('sin(sqrt(x**2+y**2))', colorbar=True).show()

Systems use continuous-time SISO rational transfer functions and descending polynomial coefficients. w is in the declared frequency unit. Nyquist is a sampled frequency response (not a full indented Nyquist contour around imaginary-axis poles). Asymptotes are straight-line magnitude approximations; complex poles near resonance require exact response for accuracy. Root locus samples nonnegative gains by default and tracks nearby roots; near branch crossings, visually inspect the result. stability_margins and bandwidth require optional control. Math strings accept explicit multiplication and a restricted list of functions, not arbitrary Python; callable/SymPy inputs are for trusted local code. Function plots are sampled and do not guarantee detecting every discontinuity. ODE string form is scalar, with t and y; callable form supports systems.

Lab analysis

python
g = pt.regression([0,1,2,3], [1,3.1,4.9,7], interval='confidence')
print(g.metadata['coefficients'], g.metadata['r_squared'])
print(pt.propagate(lambda a,b:a+b,[2,3],[.3,.4]))

Polynomial coefficients are in ascending powers; intervals use standard OLS assumptions (independent errors, constant variance, normality for finite-sample inference). model='logarithmic' or 'exponential' also supported; nonlinear intervals are not implemented. propagate is first-order numerical uncertainty propagation; it is not suitable for all nonlinear or discontinuous models. describe reports sample variance/std. phase_difference is the second signal's phase minus the first, in degrees.

Export

save infers format from extension. Static: PDF, SVG/SVGZ, PNG, JPG/JPEG, TIFF, WebP, EPS, PS, RAW/RGBA (raster pixels), PGF (requires TeX, not verified here). dpi, transparent, bbox_inches are native save options. save_all supports a common stem. save('x.csv'|'x.xlsx'|'x.json'|'x.txt') exports tabular data where recorded; raw native edits to axes do not update the original dataset. save('x.tex',filename='x.pdf',caption='...',label='fig:x') writes a figure snippet; latex() returns it as text. Include \usepackage{graphicx} in your report. LaTeX arguments accept raw markup and should be trusted.

Optional HTML export (plotly) is offline and supports simple single-axis 2D line/scatter plots, not arbitrary Matplotlib artists, styling or layouts. Python export (.py) supports numeric single-axis data-coordinate line graphs and recreates common labels, ranges and line styles; it is not a complete Matplotlib scene serializer. Unsupported artist combinations may raise rather than silently pretend to be faithful. GIF/MP4 require pt.animate(x, frames); MP4 requires FFmpeg or imageio-ffmpeg. Example:

python
import numpy as np
x=np.linspace(0,2*np.pi,100)
pt.animate(x,[np.sin(x+v) for v in np.linspace(0,2*np.pi,40)]).save('wave.gif',fps=15)

CLI

bash
plotora --version
plotora ltspice examples/capacitor_4700.txt --trace "V(out)" --time-unit ms -o output.pdf
plotora plot measurements.csv --x time --y voltage --show

Dependencies and verification

Base: matplotlib, NumPy, SciPy, pandas, SymPy, Pillow, openpyxl, statsmodels. Optional extras: engineering (spicelib, control, Pint, uncertainties), interactive (Plotly, ipympl), qt (PySide6), video (imageio-ffmpeg), matlab (h5py). The uncertainties extra is available for user workflows; Plotora's own propagate implementation uses NumPy. SciPy reads standard MAT files; h5py fallback reads top-level arrays only, not full MATLAB objects. Version floors are provisional compatibility targets, not all individually tested.

See TEST_REPORT.md for verified coverage and limitations. Release candidate intentionally does not promise complete production readiness or performance gains over raw Matplotlib rendering: the goal is shorter code and convenient analysis. No standalone GUI. No publication has been attempted; package name availability and license must be confirmed by the owner before publishing.

Plotora 1.0.0 · Release candidate documentation