tmd.view.plot¶
Plotting functions of TMD.
Functions
|
Generate a 2d figure (barcode) of the persistent homology of a tree. |
|
Generate a 2d figure (barcode) of the persistent homology of an enhanced tree. |
|
Generate a 2d figure (ph diagram) of the persistent homology of a tree. |
|
Generate a 2d figure (diagram) of the persistent homology of a enhanced tree. |
|
Extract and plot the binned histogram of a persistent homology array. |
|
Extract and plot the stepped histogram of a persistent homology array. |
|
Extract and plot the stepped histogram of a list of persistence diagrams. |
|
Plot the gaussian kernel of the ph diagram that is given. |
|
Plot the sum of 2 images from the gaussian kernel plotting function. |
|
Merge a list of ph diagrams and plot their respective average image. |
|
Plot the difference of 2 images from the gaussian kernel plotting function. |
|
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.