Skip to content

Plot beta clusters

Functions converting input list of clusters and corresponding ids into a .html page visualizing the results as a 3D Plot

plot_clusters_js(beta_cluster, id_cluster, save_path, img_path=None, mark_outliers=False, mark_timestamp=True, filename='3d_beta_plot', write=True, show_res=True)

Creates a .html visualization of input data

Parameters:

Name Type Description Default
beta_cluster Sequence

Numpy array containing beta clusters

required
id_cluster Union[np.ndarray, Sequence]

Numpy array or sequence containing the ids samples in clusters. Must be of same structure as beta_clusters

required
save_path str

Where to save the .html visualization

required
img_path Union[None, str]

Path to images of samples

None
mark_outliers bool

Set to True if first entry in beta_cluster are outliers

False
mark_timestamp bool

Set to True if name of visualization shall contain time of creation. If set to False, visualization will override previous file

True
filename str

Name of .hmtl file

'3d_beta_plot'
write bool

Set to False to not write .html file and return as string instead

True
show_res bool

Set to False to not open resulting page in webbrowser

True

Returns:

Name Type Description
html_str_formatted str

If write=False returns .hmtl file as string, else None