wolfhece.assets.boxplot.zones_asset

Boxplot chart asset factory producing native Zones for mapviewer rendering.

Draws N side-by-side boxplots inside a configurable canvas rectangle. Each boxplot consists of:

  • a filled box (Q1 … Q3)

  • a median line (Q2)

  • lower/upper whiskers with end caps

  • optional outlier diamonds

  • optional mean diamond marker

  • an optional series label below the plot area

Module Contents

class wolfhece.assets.boxplot.zones_asset.BoxplotZonesAsset(series: Sequence[Sequence[float]], *, canvas_origin: tuple[float, float] = (0.0, 0.0), canvas_size: tuple[float, float] = (100.0, 80.0), area_fraction: tuple[float, float, float, float] = (0.1, 0.08, 0.92, 0.88), labels: Sequence[str] | None = None, colors: Sequence[tuple[int, int, int] | tuple[int, int, int, int]] | None = None, whis: float = 1.5, y_min: float | None = None, y_max: float | None = None, box_width_fraction: float = 0.55, show_mean: bool = False, show_outliers: bool = True, show_labels: bool = True, show_area_frame: bool = True, frame_color: tuple[int, int, int] = (40, 40, 40), border_color: tuple[int, int, int] = (25, 25, 25), median_color: tuple[int, int, int] = (20, 20, 20), legend_text_color: tuple[int, int, int] = (0, 0, 0), frame_line_width: float = 1.0, box_line_width: float = 1.0, whisker_line_width: float = 1.0, median_line_width: float = 2.0, idx: str = 'boxplot', parent=None, mapviewer=None)[source]

Build a side-by-side boxplot chart as a single Zones object.

DEFAULT_COLORS: tuple[tuple[int, int, int, int], Ellipsis] = ((41, 98, 255, 180), (0, 166, 118, 180), (255, 122, 69, 180), (138, 79, 255, 180), (255, 178, 0,...[source]
model[source]
canvas_origin[source]
canvas_size[source]
area_fraction[source]
_colors = [][source]
y_min[source]
y_max[source]
box_width_fraction[source]
show_mean = False[source]
show_outliers = True[source]
show_labels = True[source]
show_area_frame = True[source]
frame_color[source]
border_color[source]
median_color[source]
legend_text_color[source]
frame_line_width[source]
box_line_width[source]
whisker_line_width[source]
median_line_width[source]
idx = ''[source]
parent = None[source]
mapviewer = None[source]
to_zones() wolfhece.PyVertexvectors.Zones[source]

Build and return the Zones object containing all boxplot geometry.

_plot_area() tuple[float, float, float, float, float, float][source]

Return (ax0, ay0, ax1, ay1, aw, ah) of the plot area in world coords.

_effective_y_range(stats, ay0: float, ah: float) tuple[float, float][source]
static _yw(v: float, ay0: float, ah: float, y_lo: float, y_hi: float) float[source]

Map data value v to world Y coordinate.

_add_rect_outline(parent_zone: wolfhece.PyVertexvectors.zone, name: str, x1: float, y1: float, x2: float, y2: float, color: tuple, line_width: float) wolfhece.PyVertexvectors.vector[source]
_add_filled_rect(parent_zone: wolfhece.PyVertexvectors.zone, name: str, x1: float, y1: float, x2: float, y2: float, rgba: tuple, *, border_color: tuple | None = None, border_width: float = 1.0) wolfhece.PyVertexvectors.vector[source]
_add_open_line(parent_zone: wolfhece.PyVertexvectors.zone, name: str, pts: list[tuple[float, float, float]], color: tuple, line_width: float) wolfhece.PyVertexvectors.vector[source]
_normalize_colors(colors: Sequence[tuple] | None) list[tuple[int, int, int, int]][source]