captest.plotting.ScatterPlot
- class captest.plotting.ScatterPlot(*, am_color, am_marker, cd, filtered, height, pm_color, pm_marker, split_day, split_time, tc_force_recompute, tc_mode, tc_power, tc_power_calc, timeseries, width, name)
Composable scatter plot for
CapTestregression diagnostics.Resolves x and y from
cd.regression_formula(lhs vs first rhs) and optionally:splits points into morning / afternoon glyphs (
split_day=True),swaps the y-axis to a temperature-corrected power column (
tc_power=True, with modereplace/add_panel/overlay), and / orpairs the scatter with a linked timeseries panel (
timeseries=True).
- Parameters:
cd (CapData or None) – CapData instance whose
data/column_groups/regression_formuladrive the plot. Required at view time.filtered (bool, default True) – When True (default), pulls regression columns from
cd.data_filtered; when False, fromcd.data.split_day (bool, default False) – Render morning and afternoon points as two distinct overlaid Scatters with different colors and markers.
split_time (str or None, default None) – Clock-time override (
"HH:MM") for the AM/PM boundary. When None andsplit_day=True, the boundary is detected viacaptest.util.detect_solar_noon(idxmax of clock-time-binnedghi_mod_cskymean) with a 12:30 fallback.am_color (str, default
"#1f77b4"/"#d62728") – Glyph colors for the AM and PM Scatters whensplit_day=True.pm_color (str, default
"#1f77b4"/"#d62728") – Glyph colors for the AM and PM Scatters whensplit_day=True.am_marker (str, default
"circle"/"triangle") – Glyph markers for the AM and PM Scatters whensplit_day=True.pm_marker (str, default
"circle"/"triangle") – Glyph markers for the AM and PM Scatters whensplit_day=True.tc_power (bool, default False) – Plot against temperature-corrected power instead of (or in addition to) raw power.
tc_mode ({"replace", "add_panel", "overlay"}, default "replace") – Layout strategy when
tc_power=True.tc_power_calc (dict or None, default None) – Calc-params nested dict that produces the tc-power column. When None,
DEFAULT_TC_POWER_CALCis used (tuned for measured DAS data; sim users must override).tc_force_recompute (bool, default False) – When True, recomputes the tc-power column even if it already exists on
cd.data.timeseries (bool, default False) – Pair the principal scatter with a linked timeseries panel below. The timeseries panel overlays a thin gray curve of the full unfiltered y-series under the linked scatter of the filtered data so removed points remain visible as background context. Only valid for the single-panel
tc_modevalues (replaceandoverlay); raisesValueErrorif combined withtc_mode='add_panel'.height (int, default 400 / 500) – Pixel dimensions forwarded to the Scatter / Curve options.
width (int, default 400 / 500) – Pixel dimensions forwarded to the Scatter / Curve options.
- __init__(**params)
Methods
__init__(**params)view()Build and return the
hv.Layoutfor the configured options.Attributes
param