Skip to content

Instantly share code, notes, and snippets.

@erdogant
Last active October 23, 2022 20:46
Show Gist options
  • Select an option

  • Save erdogant/ec13d345834f07ab366db554b0a9c9af to your computer and use it in GitHub Desktop.

Select an option

Save erdogant/ec13d345834f07ab366db554b0a9c9af to your computer and use it in GitHub Desktop.
flameplot
# Create interactive scatter plot
from d3blocks import D3Blocks
# Initialize
d3 = D3Blocks()
# Make scatter
d3.scatter(map_pca[:,0],
map_pca[:,1],
x1=map_tsne[:,0],
y1=map_tsne[:,1],
x2=map_umap[:,0],
y2=map_umap[:,1],
label_radio=['PCA', 't-SNE', 'UMAP'],
scale=True,
tooltip=list(map(lambda x: 'Sample_id: '+x, np.arange(0, map_pca.shape[0]).astype(str))),
color=y.astype(int).astype(str),
filepath='scatter_flameplot.html')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment