Internal API
PowerGraphics._auto_power_unit — Method
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).
PowerGraphics._camelcase_initials — Method
Extract uppercase initials from a CamelCase string.
PowerGraphics._resolve_power_units — Method
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).
PowerGraphics._signed_stack_bounds — Method
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]].