plot_betti_surfaces¶
-
gtda.plotting.
plot_betti_surfaces
(betti_curves, samplings=None, homology_dimensions=None, plotly_params=None)[source]¶ Plot Betti surfaces (Betti numbers against “time” and filtration parameter) by homology dimension.
- Parameters
betti_curves (ndarray of shape (n_samples, n_homology_dimensions, n_bins)) – Collection whose each entry contains the Betti numbers for
n_homology_dimensions
discretised Betti curves. Index i along axis 1 is assumed to correspond to homology dimension i.samplings (ndarray of shape (n_homology_dimensions, n_bins)) – Filtration parameter values to be used as one of the independent variables when plotting the Betti surfaces. The other independent variable is “time”, i.e. the sample index.
homology_dimensions (list, tuple or None, optional, default:
None
) – Homology dimensions for which the Betti surfaces should be plotted. IfNone
, all available dimensions will be used.samplings – For each homology dimension, (filtration parameter) values to be used on the x-axis against the corresponding values in betti_curves on the y-axis.
plotly_params (dict or None, optional, default:
None
) – Custom parameters to configure the plotly figure. Allowed keys are"traces"
and"layout"
, and the corresponding values should be dictionaries containing keyword arguments as would be fed to theupdate_traces
andupdate_layout
methods ofplotly.graph_objects.Figure
.
- Returns
figs/fig – If
n_samples > 1
, a tuple of figures representing the Betti surfaces, with one figure per dimension in homology_dimensions. Otherwise, a single figure representing the Betti curve of the single sample present.- Return type
tuple of
plotly.graph_objects.Figure
/plotly.graph_objects.Figure
object