From c3f5fdaed4a71b4d2ae8dbf33ece5597ecba2686 Mon Sep 17 00:00:00 2001 From: Bora Uyar Date: Mon, 10 Jun 2024 11:26:38 +0200 Subject: [PATCH] use get_cmap from pylot instead of matplotlib.cm (changed in matplotlib 3.9.0) --- flexynesis/utils.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/flexynesis/utils.py b/flexynesis/utils.py index 8691f18..ad18bef 100644 --- a/flexynesis/utils.py +++ b/flexynesis/utils.py @@ -15,7 +15,6 @@ import seaborn as sns import matplotlib.pyplot as plt import matplotlib -import matplotlib.cm from sklearn.decomposition import PCA from sklearn.metrics import balanced_accuracy_score, f1_score, cohen_kappa_score, classification_report from sklearn.metrics import mean_squared_error @@ -91,7 +90,7 @@ def plot_dim_reduced(matrix, labels, method='pca', color_type='categorical', sca if color_type == 'categorical': unique_labels = sorted(set(labels)) - colormap = matplotlib.cm.get_cmap("tab20", len(unique_labels)) + colormap = plt.get_cmap("tab20", len(unique_labels)) for i, label in enumerate(unique_labels): plt.scatter(