tanat.visualization.sequence.type package#
Subpackages#
- tanat.visualization.sequence.type.barplot package
- Submodules
- tanat.visualization.sequence.type.barplot.builder module
- tanat.visualization.sequence.type.barplot.data module
- tanat.visualization.sequence.type.barplot.exception module
- tanat.visualization.sequence.type.barplot.settings module
- Module contents
- tanat.visualization.sequence.type.distribution package
- Submodules
- tanat.visualization.sequence.type.distribution.builder module
- tanat.visualization.sequence.type.distribution.data module
- tanat.visualization.sequence.type.distribution.settings module
DistributionAestheticsDistributionAesthetics.modeDistributionAesthetics.bin_sizeDistributionAesthetics.stackedDistributionAesthetics.time_modeDistributionAesthetics.display_unitDistributionAesthetics.__init__()DistributionAesthetics.bin_sizeDistributionAesthetics.display_unitDistributionAesthetics.modeDistributionAesthetics.model_dump()DistributionAesthetics.stackedDistributionAesthetics.time_mode
DistributionMarkerSettingsDistributionSettings
- Module contents
DistributionAestheticsDistributionAesthetics.modeDistributionAesthetics.bin_sizeDistributionAesthetics.stackedDistributionAesthetics.time_modeDistributionAesthetics.display_unitDistributionAesthetics.__init__()DistributionAesthetics.bin_sizeDistributionAesthetics.display_unitDistributionAesthetics.modeDistributionAesthetics.model_dump()DistributionAesthetics.stackedDistributionAesthetics.time_mode
DistributionMarkerSettingsDistributionSettingsDistributionVizBuilder
- tanat.visualization.sequence.type.spanplot package
- Submodules
- tanat.visualization.sequence.type.spanplot.builder module
- tanat.visualization.sequence.type.spanplot.data module
- tanat.visualization.sequence.type.spanplot.settings module
- Module contents
- tanat.visualization.sequence.type.timeline package
- Submodules
- tanat.visualization.sequence.type.timeline.builder module
- tanat.visualization.sequence.type.timeline.data module
- tanat.visualization.sequence.type.timeline.settings module
TimelineAestheticsTimelineMarkerSettingsTimelineMarkerSettings.sizeTimelineMarkerSettings.bar_heightTimelineMarkerSettings.alphaTimelineMarkerSettings.edge_colorTimelineMarkerSettings.shapeTimelineMarkerSettings.__init__()TimelineMarkerSettings.alphaTimelineMarkerSettings.bar_heightTimelineMarkerSettings.edge_colorTimelineMarkerSettings.model_dump()TimelineMarkerSettings.shapeTimelineMarkerSettings.size
TimelineSettings
- Module contents
TimelineAestheticsTimelineMarkerSettingsTimelineMarkerSettings.sizeTimelineMarkerSettings.bar_heightTimelineMarkerSettings.alphaTimelineMarkerSettings.edge_colorTimelineMarkerSettings.shapeTimelineMarkerSettings.__init__()TimelineMarkerSettings.alphaTimelineMarkerSettings.bar_heightTimelineMarkerSettings.edge_colorTimelineMarkerSettings.model_dump()TimelineMarkerSettings.shapeTimelineMarkerSettings.size
TimelineSettingsTimelineVizBuilder
Module contents#
Register BaseSequenceVizBuilder subtypes.
- class tanat.visualization.sequence.type.BarplotVizBuilder(settings: dict | BaseVizSettings | None = None, *, allow_large: bool = False)[source]#
Bases:
BaseSequenceVizBuilderBuilds bar charts from a SequencePool or an individual Sequence.
Typical usage via
SequenceVisualizer:SequenceVisualizer.barplot(show_as="count") \ .title("Event counts") \ .draw(pool, entity_feature="status") \ .show()
- SETTINGS_CLASS[source]#
alias of
BarplotSettings
- marker(*, alpha: float | None = None, edge_color: str | None = None, bar_width: float | None = None) BarplotVizBuilder[source]#
Configure bar visual properties. Chainable.
- Parameters:
alpha – Opacity (0–1).
edge_color – Bar border color.
Nonemeans no border.bar_width – Width fraction of available slot, 0–1 (default 0.8).
- x_axis(*, show: bool | None = None, label: str | None = None, rotation: int | None = None, limit_min: float | None = None, limit_max: float | None = None) BarplotVizBuilder[source]#
Configure the x (horizontal) axis. Chainable.
Role depends on orientation:
"vertical"(default): categories on x, values on y →limit_min/limit_maxare not meaningful here."horizontal": values on x, categories on y → uselimit_min/limit_maxto constrain the value range.
- Parameters:
show – Hide the axis entirely when
False.label – Axis label text.
rotation – Tick label rotation in degrees.
limit_min – Minimum x value (meaningful in horizontal orientation only).
limit_max – Maximum x value (meaningful in horizontal orientation only).
- y_axis(*, show: bool | None = None, label: str | None = None, rotation: int | None = None, limit_min: float | None = None, limit_max: float | None = None) BarplotVizBuilder[source]#
Configure the y (vertical) axis. Chainable.
Role depends on orientation:
"vertical"(default): values on y, categories on x → uselimit_min/limit_maxto constrain the value range (e.g.limit_max=1.0for rates)."horizontal": categories on y, values on x →limit_min/limit_maxare not meaningful here.
- Parameters:
show – Hide the axis entirely when
False.label – Axis label text.
rotation – Tick label rotation in degrees.
limit_min – Minimum y value (meaningful in vertical orientation only).
limit_max – Maximum y value (meaningful in vertical orientation only).
- class tanat.visualization.sequence.type.DistributionVizBuilder(settings: Any | None = None, *, allow_large: bool = False)[source]#
Bases:
BaseSequenceVizBuilderBuilds state-occupancy distribution charts from a StateSequencePool.
Each time bin on the x-axis counts (or normalises) how many sequences are in each state at that point in time, using occupancy-based binning: a segment contributes to every bin it overlaps, not just the one containing its start.
Only compatible with
statesequence types.Typical usage via
SequenceVisualizer:SequenceVisualizer.distribution(mode="percentage", bin_size="1d") \ .title("State distribution over time") \ .colors("Set2") \ .draw(pool, entity_feature="status") \ .show()
- SETTINGS_CLASS[source]#
alias of
DistributionSettings
- marker(*, alpha: float | None = None, line_width: float | None = None) DistributionVizBuilder[source]#
Configure fill visual properties. Chainable.
- Parameters:
alpha – Opacity of the filled areas (0-1).
line_width – Width of the area boundary line.
- x_axis(*, show: bool | None = None, label: str | None = None, rotation: int | None = None, limit_min: float | None = None, limit_max: float | None = None, autofmt_xdate: bool | None = None) DistributionVizBuilder[source]#
Configure the time (x) axis. Chainable.
- Parameters:
show – Hide the axis entirely when
False.label – Axis label text.
rotation – Tick label rotation in degrees.
limit_min – Left bound (zooms into a time window).
limit_max – Right bound (zooms into a time window).
autofmt_xdate – Auto-rotate date tick labels.
- y_axis(*, show: bool | None = None, label: str | None = None, rotation: int | None = None, limit_min: float | None = None, limit_max: float | None = None) DistributionVizBuilder[source]#
Configure the value (y) axis. Chainable.
- Parameters:
show – Hide the axis entirely when
False.label – Axis label text.
rotation – Tick label rotation in degrees.
limit_min – Minimum y value.
limit_max – Maximum y value.
- class tanat.visualization.sequence.type.SpanplotVizBuilder(settings: Any | None = None, *, allow_large: bool = False)[source]#
Bases:
BaseSequenceVizBuilderBuilds duration distribution charts from a SequencePool or an individual Sequence.
Each point in the resulting chart represents one segment (interval or state occurrence). Distributions can be grouped by category label or by sequence ID.
Only compatible with
stateandintervalsequence types: duration is undefined for events.Typical usage via
SequenceVisualizer:SequenceVisualizer.spanplot(kind="violin", display_unit="hours") \ .title("ICU stay durations by status") \ .colors("Set2") \ .draw(pool, entity_feature="status") \ .show()
- SETTINGS_CLASS[source]#
alias of
SpanplotSettings
- marker(*, alpha: float | None = None, edge_color: str | None = None, point_size: float | None = None, line_width: float | None = None) SpanplotVizBuilder[source]#
Configure marker visual properties. Chainable.
- Parameters:
alpha – Opacity (0–1).
edge_color – Marker/box border color.
Nonemeans no border.point_size – Scatter point diameter in points (strip kind only).
line_width – Box or violin outline thickness.
- x_axis(*, show: bool | None = None, label: str | None = None, rotation: int | None = None, limit_min: float | None = None, limit_max: float | None = None) SpanplotVizBuilder[source]#
Configure the x (horizontal) axis. Chainable.
Role depends on orientation:
"vertical"(default): group labels on x, durations on y."horizontal": durations on x, group labels on y. Uselimit_min/limit_maxto clip outliers.
- Parameters:
show – Hide the axis entirely when
False.label – Axis label text.
rotation – Tick label rotation in degrees.
limit_min – Minimum x value (meaningful in horizontal orientation).
limit_max – Maximum x value (meaningful in horizontal orientation).
- y_axis(*, show: bool | None = None, label: str | None = None, rotation: int | None = None, limit_min: float | None = None, limit_max: float | None = None) SpanplotVizBuilder[source]#
Configure the y (vertical) axis. Chainable.
Role depends on orientation:
"vertical"(default): durations on y, group labels on x. Uselimit_min/limit_maxto clip outliers."horizontal": group labels on y, durations on x.
- Parameters:
show – Hide the axis entirely when
False.label – Axis label text (e.g.
"Duration (hours)")..rotation – Tick label rotation in degrees.
limit_min – Minimum y value (meaningful in vertical orientation).
limit_max – Maximum y value (meaningful in vertical orientation).
- class tanat.visualization.sequence.type.TimelineVizBuilder(settings: Any | None = None, *, allow_large: bool = False)[source]#
Bases:
BaseSequenceVizBuilderBuilds timeline charts from a SequencePool or an individual Sequence.
Typical usage via
SequenceVisualizer:SequenceVisualizer.timeline() \ .title("Status over time") \ .draw(pool, entity_feature="status") \ .show()
- SETTINGS_CLASS[source]#
alias of
TimelineSettings
- marker(*, alpha: float | None = None, edge_color: str | None = None, size: float | None = None, bar_height: float | None = None, shape: str | None = None) TimelineVizBuilder[source]#
Configure marker visual properties. Chainable.
- Parameters:
alpha – Opacity (0–1).
edge_color – Marker border color.
Nonemeans no border.size – Scatter point size (event sequence only).
bar_height – Height fraction of each row slot, 0–1 (interval/state pools only).
shape – Matplotlib marker string, e.g.
"o","s","^"(event sequence only).
- x_axis(*, show: bool | None = None, label: str | None = None, rotation: int | None = None, limit_min: float | None = None, limit_max: float | None = None, autofmt_xdate: bool | None = None) TimelineVizBuilder[source]#
Configure the time (x) axis. Chainable.
- Parameters:
show – Hide the axis entirely when
False.label – Axis label text.
rotation – Tick label rotation in degrees.
limit_min – Left bound (zooms into a time window).
limit_max – Right bound (zooms into a time window).
autofmt_xdate – Auto-rotate date tick labels (useful for dense datetime scales).
- y_axis(*, show: bool | None = None, label: str | None = None) TimelineVizBuilder[source]#
Configure the sequence / category (y) axis. Chainable.
rotationandlimit_min/limit_maxare intentionally not exposed: y-positions are integer ranks managed internally, so rotating string labels or constraining numeric limits is not meaningful here.- Parameters:
show – Hide the axis entirely when
False(useful when y-axis labels are too dense to read).label – Axis label text.