application_vnd.jupyter.stderr_output_2.png text_plain_output_1.png
import umap
reducer = umap.UMAP(densmap=True, random_state=42)
r2 = reducer.fit_transform(X)
print(X.shape)
for i, j in [(0, 1)]:
    plt.figure(figsize=(20, 10))
    ax = sns.scatterplot(x=r2[:, i], y=r2[:, j], hue=v4color, palette=palette1, marker=marker1, alpha=alpha1)
    if 1:
        plt.setp(ax.get_legend().get_texts(), fontsize=20)
        plt.setp(ax.get_legend().get_title(), fontsize=20)
    plt.title('UMAP densmap On ' + str_data_inf + ' n_samples=' + str(len(X)), fontsize=20)
    plt.xlabel('UMAP' + str(i + 1), fontsize=12)
    plt.ylabel('UMAP' + str(j + 1), fontsize=12)
    plt.show()