plotting#
Overview#
Plotting and visualisation utilities.
Functions#
Create animation of 2skeleton of filtered simplicial complex. 

Visualise a filtration at given time, optionally including only certain colours. 

Plot a specific diagram from a 6pack. 

Plots the 6pack of persistence diagrams returned by 
Details#
 animate_filtration(K, points, filtration_times, animation_length)#
Create animation of 2skeleton of filtered simplicial complex.
 Parameters:
K (FilteredComplex) – A filtered complex.
points (ndarray) – The vertices of
K
as a \(2\times N\) numpy matrix.filtration_times (Sequence[float]) – Sequence of filtration times for which to draw animation frames.
animation_length (float) – Total length of the animation in seconds.
 Return type:
 draw_filtration(K, points, time, include_colours=None, ax=None)#
Visualise a filtration at given time, optionally including only certain colours.
 Parameters:
K (FilteredComplex) – A filtered complex.
points (ndarray) – The vertices of
K
as a \(2\times N\) numpy matrix.time (float) – Filtration times for which to draw simplices.
include_colours (Collection[int]  None) – Optional collection of colours to include. If not specified then all colours will be drawn.
ax (Axes  None) – A matplotlib axes object. If provided then the diagram will be plotted on the given axes.
 Return type:
 plot_diagram(dgms, diagram_name, truncation=None, max_diagram_dimension=None, ax=None, tolerance=0)#
Plot a specific diagram from a 6pack.
 Parameters:
dgms (DiagramEnsemble) – The 6pack of persistence diagrams.
diagram_name (str) – One of
('ker', 'cok', 'dom', 'cod', 'im', 'rel')
.truncation (float  None) – The maximum entrance time for which the diagrams are plotted. A sensible default will be calculated if not provided.
max_diagram_dimension (int  None) – The maximum homological dimension for which to plot points. If not provided, all dimensions will be included in the plots.
ax (Axes  None) – A matplotlib axes object. If provided then the diagram will be plotted on the given axes.
tolerance (float) – Only features with persistence greater than this value will be plotted.
 Return type:
 plot_sixpack(dgms, truncation=None, max_diagram_dimension=None, tolerance=0)#
Plots the 6pack of persistence diagrams returned by
compute
. Parameters:
dgms (DiagramEnsemble) – The 6pack of persistence diagrams.
truncation (float  None) – The maximum entrance time upto which features are plotted. A sensible default will be calculated if not provided.
max_diagram_dimension (int  None) – The maximum homological dimension for which to plot features. If not provided, all dimensions will be included in the plots.
tolerance (float) – Only features with persistence greater than this value will be plotted.
 Return type: