Visualization¶
The ash_model.viz module provides functions for visualizing hypergraph properties,
both for static snapshots and temporal evolution.
Static Plots¶
Functions for visualizing static hypergraph properties.
- ash_model.viz.static.plot_s_degrees(h, smax, loglog=True, **kwargs)[source]¶
Plot the s-degree distribution of a hypergraph.
A line for each s will be plotted, from 1 to smax inclusive. Matplotlib plotting parameters (e.g., color) can be passed as kwargs.
- ash_model.viz.static.plot_hyperedge_size_distribution(h, max_size=None, min_size=None, **kwargs)[source]¶
Plot the distribution of hyperedge sizes in a hypergraph.
min_size and max_size can be used to filter out hyperedges. Matplotlib plotting parameters (e.g., color) can be passed as kwargs.
- Parameters:
- Returns:
The matplotlib axes object
- Return type:
- ash_model.viz.static.plot_degree_distribution(h, loglog=True, **kwargs)[source]¶
Plot the degree distribution of an ASH hypergraph.
The default is to draw a log-log plot. Matplotlib plotting parameters (e.g., color) can be passed as kwargs.
Temporal Plots¶
Functions for visualizing temporal dynamics and evolution of hypergraphs.
- ash_model.viz.temporal.plot_hyperedge_activity_series(h, normalize=False, **kwargs)[source]¶
Plot the number of active hyperedges at each temporal snapshot.
- ash_model.viz.temporal.plot_node_activity_series(h, *, normalize=False, **kwargs)[source]¶
Plot the activity over time for selected nodes.
- ash_model.viz.temporal.plot_presence_timeline(h, *, hyperedges=None, nodes=None, **kwargs)[source]¶
Plot a presence timeline (Gantt‑like) for given hyperedges or nodes.
One of
hyperedgesornodesmust be provided. If both are provided,hyperedgestakes precedence.
- ash_model.viz.temporal.plot_inter_event_time_distribution(h, **kwargs)[source]¶
Plot distribution of inter‑event times for hyperedge activations.
We define an activation as a
+event produced byASH.stream_interactions. Inter‑event gaps are differences between consecutive activation times (across all hyperedges).- Parameters:
h (ASH) – ASH instance.
kwargs – Matplotlib bar customisation (
color,ax…).
- Returns:
Axes
- ash_model.viz.temporal.plot_hyperedge_lifespan_distribution(h, **kwargs)[source]¶
Histogram of hyperedge lifespans (duration in snapshots).
For each hyperedge we compute
(last_presence - first_presence + 1).- Parameters:
h (ASH) – ASH instance.
kwargs – Matplotlib customisation (
bins,color,ax…).
- Returns:
Axes