Internal API

PowerGraphics._auto_power_unitMethod

Pick a power unit and scaling divisor from the peak magnitude of the plotted totals (values are assumed to be in MW): < 1e3 → MW, [1e3, 1e6) → GW, ≥ 1e6 → TW. Returns (divisor, unit_string).

source
PowerGraphics._resolve_power_unitsMethod

Resolve the y-axis label and data-scaling divisor for a fuel/generation plot. Honors an explicit :y_label or :power_scale kwarg; otherwise auto-detects MW/GW/TW from the peak stacked total of df, unless :auto_units => false or :bar => true (energy bar plots keep the existing MWh behavior).

source
PowerGraphics._signed_stack_boundsMethod

Per-series (lower, upper) envelopes for a sign-aware stacked-area/line plot. data is time × series. Positive values stack upward from 0, negative values (e.g. storage charging via ActivePowerInVariable) stack downward from 0, so charging renders below the zero axis instead of being folded into the positive generation stack. Returns (lower, upper) matrices the same size as data; band ix is [lower[:,ix], upper[:,ix]].

source