# plot_diagram¶

gtda.plotting.plot_diagram(diagram, homology_dimensions=None, **input_layout)[source]

Plot a single persistence diagram.

Parameters
• diagram (ndarray of shape (n_points, 3)) – The persistence diagram to plot, where the third dimension along axis 1 contains homology dimensions, and the first two contain (birth, death) pairs to be used as coordinates in the two-dimensional plot.

• homology_dimensions (list of int or None, optional, default: None) – Homology dimensions which will appear on the plot. If None, all homology dimensions which appear in diagram will be plotted.