Skip to content

Commit

Permalink
use get_cmap from pylot instead of matplotlib.cm (changed in matplotl…
Browse files Browse the repository at this point in the history
…ib 3.9.0)
  • Loading branch information
borauyar committed Jun 10, 2024
1 parent 5136682 commit c3f5fda
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions flexynesis/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit c3f5fda

Please sign in to comment.