tmd.view.plot

Plotting functions of TMD.

Functions

barcode(ph[, new_fig, subplot, color, linewidth])

Generate a 2d figure (barcode) of the persistent homology of a tree.

barcode_enhanced(ph[, new_fig, subplot, ...])

Generate a 2d figure (barcode) of the persistent homology of an enhanced tree.

diagram(ph[, new_fig, subplot, color, ...])

Generate a 2d figure (ph diagram) of the persistent homology of a tree.

diagram_enhanced(ph[, new_fig, subplot, ...])

Generate a 2d figure (diagram) of the persistent homology of a enhanced tree.

histogram_horizontal(ph[, new_fig, subplot, ...])

Extract and plot the binned histogram of a persistent homology array.

histogram_stepped(ph[, new_fig, subplot, ...])

Extract and plot the stepped histogram of a persistent homology array.

histogram_stepped_population(ph_list[, ...])

Extract and plot the stepped histogram of a list of persistence diagrams.

persistence_image(ph[, new_fig, subplot, ...])

Plot the gaussian kernel of the ph diagram that is given.

persistence_image_add(Z2, Z1[, new_fig, ...])

Plot the sum of 2 images from the gaussian kernel plotting function.

persistence_image_average(ph_list[, ...])

Merge a list of ph diagrams and plot their respective average image.

persistence_image_diff(Z1, Z2[, new_fig, ...])

Plot the difference of 2 images from the gaussian kernel plotting function.

start_length_diagram(ph[, new_fig, subplot, ...])

Plot a transformed ph diagram that represents lengths and starting points of a component.

tmd.view.plot.barcode(ph, new_fig=True, subplot=False, color='b', linewidth=1.2, **kwargs)

Generate a 2d figure (barcode) of the persistent homology of a tree.

The persistent homology should have been computed by Topology.get_persistent_homology method.

tmd.view.plot.barcode_enhanced(ph, new_fig=True, subplot=False, linewidth=1.2, valID=2, cmap=<matplotlib.colors.LinearSegmentedColormap object>, **kwargs)

Generate a 2d figure (barcode) of the persistent homology of an enhanced tree.

The tree is enhanced by a parameter encoded in ph[valID].

tmd.view.plot.diagram(ph, new_fig=True, subplot=False, color='b', alpha=1.0, edgecolors='black', s=30, **kwargs)

Generate a 2d figure (ph diagram) of the persistent homology of a tree.

tmd.view.plot.diagram_enhanced(ph, new_fig=True, subplot=False, alpha=1.0, valID=2, cmap=<matplotlib.colors.LinearSegmentedColormap object>, edgecolors='black', s=30, **kwargs)

Generate a 2d figure (diagram) of the persistent homology of a enhanced tree.

The tree is enhanced by a parameter encodes in ph[valID].

tmd.view.plot.histogram_horizontal(ph, new_fig=True, subplot=False, bins=100, color='b', alpha=0.7, **kwargs)

Extract and plot the binned histogram of a persistent homology array.

tmd.view.plot.histogram_stepped(ph, new_fig=True, subplot=False, color='b', alpha=0.7, **kwargs)

Extract and plot the stepped histogram of a persistent homology array.

tmd.view.plot.histogram_stepped_population(ph_list, new_fig=True, subplot=False, color='b', alpha=0.7, **kwargs)

Extract and plot the stepped histogram of a list of persistence diagrams.

The histogram is normalized according to the number of persistence diagrams.

tmd.view.plot.persistence_image(ph, new_fig=True, subplot=111, xlim=None, ylim=None, masked=False, colorbar=False, norm_factor=None, threshold=0.01, vmin=None, vmax=None, cmap=<matplotlib.colors.LinearSegmentedColormap object>, bw_method=None, weights=None, resolution=100, **kwargs)

Plot the gaussian kernel of the ph diagram that is given.

tmd.view.plot.persistence_image_add(Z2, Z1, new_fig=True, subplot=111, xlim=None, ylim=None, norm=True, vmin=0, vmax=2.0, cmap=<matplotlib.colors.LinearSegmentedColormap object>, **kwargs)

Plot the sum of 2 images from the gaussian kernel plotting function.

tmd.view.plot.persistence_image_average(ph_list, new_fig=True, subplot=111, xlim=None, ylim=None, norm_factor=1.0, vmin=None, vmax=None, cmap=<matplotlib.colors.LinearSegmentedColormap object>, weighted=False, **kwargs)

Merge a list of ph diagrams and plot their respective average image.

tmd.view.plot.persistence_image_diff(Z1, Z2, new_fig=True, subplot=111, xlim=None, ylim=None, norm=True, vmin=-1.0, vmax=1.0, cmap=<matplotlib.colors.LinearSegmentedColormap object>, **kwargs)

Plot the difference of 2 images from the gaussian kernel plotting function.

The difference is computed as: diff(Z1 - Z2))

tmd.view.plot.start_length_diagram(ph, new_fig=True, subplot=False, color='b', alpha=1.0, **kwargs)

Plot a transformed ph diagram that represents lengths and starting points of a component.