visualization.get_barcode_data

visualization.get_barcode_data(psi2tree, *, modes=None, threshold=0.0)

Get data for a barcode chart.

Parameters

Name Type Description Default
psi2tree psiclone.psi2tree.Psi2tree A computed Psi2tree object. required
modes list Specify types of which barcodes are drawn. - ‘sub’: a sublevelset filtration - ‘sup’: a superlevelset filtration - ‘reeb’: a Reeb graph (default: all of above) None
threshold Cut-off threshold for barcode length. 0.0

Returns

Name Type Description
barcodes dict[str, tuple(numpy.ndarray, numpy.ndarray, numpy.ndarray)] Dictionary that maps modes to corresponding barcode data. Each barcodes[mode] consists of x, y0 and y1 that are used like plt.bar(x, y1 - y0, bottom=y0) to draw the barcode plot.