popo.plotting#
Network diagrams, figure style, line plots and tables. Needs the plot extra. See
Plotting.
Network diagrams
Read the active, solved OpenDSS circuit into a |
|
Draw a network as a schematic icon diagram, buses coloured by voltage status. |
|
The parts of a circuit a topology diagram needs, as plain Python data. |
|
Lay out every bus as a tidy tree grown from |
|
Classify buses as |
|
Classify a per-unit voltage against fixed limits: |
Figure style
Apply popo's figure style globally: |
|
Apply popo's style for the duration of a block, then restore. |
|
Popo's style with hand-drawn lines, for concept illustrations rather than results. |
|
Size for one panel occupying |
|
|
|
Escape a string for LaTeX, for anything interpolated from data. |
Line plots
Apply popo's figure style with the compact line-plot sizes on top. |
|
A single-axes figure authored at its final size ( |
|
Lead time in hours (0 to 24) shown as time of day; every forecast window starts at 00:00. |
|
Y-limits and ticks from the plotted data. |
|
A horizontal reference (nominal level, zero, record mean) in the uniform dotted style. |
|
One-row legend centred below the axes; |
|
Left and bottom spines only, ticks pointing out, no minor ticks. |
|
Lay out the figure and its legends as |
|
Write a PDF and a 600 dpi PNG, tightly cropped, with legends placed below the axes. |
Tables
Apply popo's table style to a Great Tables table or a DataFrame. |
|
A two-column |
|
A themed metric-comparison table with each column's best value highlighted. |
popo.plotting.tokens holds the palette, PALETTE, and the colours named by role: PRIMARY for
the subject of a figure, INFO and WARNING for supporting series, DANGER for a failure and
TEXT_MUTED for context.