Plotting
Module: equser.plotting
Dependencies: [analysis] extra (matplotlib)
Static matplotlib plots for PMon and CPOW data. Install with:
pip install equser[analysis]
PowerMonitorPlotter
Plot power monitor (PMon) time-series data.
from equser.plotting import PowerMonitorPlotter
plotter = PowerMonitorPlotter()
# Plot from a file
plotter.plot_file('pmon_data.parquet')
# Plot from a PyArrow Table
from equser.data import load_pmon
table = load_pmon('pmon_data.parquet')
plotter.plot(table)
Methods
| Method | Description |
|---|---|
plot_file(path) | Load and plot a PMon Parquet file |
plot(table) | Plot from a PyArrow Table |
Output
Generates a multi-panel figure with:
- Frequency vs. time
- Phase RMS voltages vs. time
- Phase RMS currents vs. time
- Phase active power vs. time
Color scheme follows standard power systems convention (black/red/blue for phases A/B/C).
WaveformPlotter
Plot CPOW waveform captures.
from equser.plotting import WaveformPlotter
plotter = WaveformPlotter()
# Plot from a file
plotter.plot_file('cpow_data.parquet')
Methods
| Method | Description |
|---|---|
plot_file(path) | Load and plot a CPOW Parquet file |
Output
Generates voltage and current waveform plots with proper scaling. The neutral
current is automatically adjusted by the CT sensitivity ratio
(NEUTRAL_CT_RATIO = 30).
Color schemes
Both plotters support named color schemes:
| Scheme | Description |
|---|---|
"standard" | Black/Red/Blue (default, power systems convention) |
"colorblind" | Colorblind-friendly palette |
"monochrome" | Grayscale with line style variation |
Saving plots
All plotters return matplotlib figure objects. Save in any format:
fig = plotter.plot_file('data.parquet')
fig.savefig('output.png', dpi=150, bbox_inches='tight')
fig.savefig('output.svg')
fig.savefig('output.pdf')