RenderContext¶
yohou.plotting.RenderContext
dataclass
¶
Typed context passed to facet render callbacks.
Replaces the previous 6-positional-arg callback signature with named, self-documenting fields.
Parameters ¶
| Name | Type | Description | Default |
|---|---|---|---|
fig
|
Figure
|
The subplots figure to add traces to. |
required |
sub_df
|
DataFrame
|
Subset DataFrame with |
required |
display_name
|
str
|
The name of the overlaid entity (member name when
|
required |
entity_idx
|
int
|
Index of the overlaid entity in the color palette. In non-panel
(column) mode this is always 0; such callbacks should use
|
required |
row
|
int
|
Subplot row (1-indexed). |
required |
col
|
int
|
Subplot column (1-indexed). |
required |
facet_by
|
str
|
|
required |
facet_name
|
str
|
The facet axis value (group name when |
required |
group_name
|
str
|
Panel group name, always available for context. For column faceting this equals the column name. |
required |
member_name
|
str
|
Panel member name, always available for context. For column faceting this equals the column name. |
required |
See Also ¶
LegendTracker : De-duplicates legend entries across subplots.
Notes ¶
facet_figure is the factory that creates faceted figures and passes
RenderContext to callbacks.