From f292b6f7ad0cd727a2b7cc3ad124f7e441025cc9 Mon Sep 17 00:00:00 2001 From: jolaem Date: Wed, 5 Jun 2024 14:53:50 +0000 Subject: [PATCH 1/4] Fix matplotlib 3.9.0 failure Swap matplotlil.cm.* to matplotlib.colormaps.* --- avae/vis.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/avae/vis.py b/avae/vis.py index 4380268c..f175c11c 100644 --- a/avae/vis.py +++ b/avae/vis.py @@ -5,6 +5,7 @@ import typing import altair +import matplotlib import matplotlib.gridspec as gridspec import matplotlib.pyplot as plt import numpy as np @@ -1886,7 +1887,7 @@ def plot_affinity_matrix( ax = plt.subplot(gs[0]) ax.set_title("Affinity Matrix", fontsize=16) - im = ax.imshow(lookup, vmin=-1, vmax=1, cmap=plt.cm.get_cmap("RdBu")) + im = ax.imshow(lookup, vmin=-1, vmax=1, cmap=matplotlib.colormaps.get_cmap("RdBu")) ax.set_xticks(np.arange(0, len(all_classes))) ax.set_xticklabels(all_classes) From 199befff5d93378c94d5aebe9dd90fb388b0a20e Mon Sep 17 00:00:00 2001 From: jolaem Date: Wed, 5 Jun 2024 15:32:29 +0000 Subject: [PATCH 2/4] Fix black --- avae/vis.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/avae/vis.py b/avae/vis.py index f175c11c..17180d5c 100644 --- a/avae/vis.py +++ b/avae/vis.py @@ -1887,7 +1887,9 @@ def plot_affinity_matrix( ax = plt.subplot(gs[0]) ax.set_title("Affinity Matrix", fontsize=16) - im = ax.imshow(lookup, vmin=-1, vmax=1, cmap=matplotlib.colormaps.get_cmap("RdBu")) + im = ax.imshow( + lookup, vmin=-1, vmax=1, cmap=matplotlib.colormaps.get_cmap("RdBu") + ) ax.set_xticks(np.arange(0, len(all_classes))) ax.set_xticklabels(all_classes) From 9d207925c16f75f796dd0e3fc3e6b7e7ca07bc2f Mon Sep 17 00:00:00 2001 From: jolaem Date: Wed, 5 Jun 2024 15:39:33 +0000 Subject: [PATCH 3/4] Fix missing bracket --- avae/vis.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/avae/vis.py b/avae/vis.py index d39fa7e3..cd878ea7 100644 --- a/avae/vis.py +++ b/avae/vis.py @@ -1885,8 +1885,8 @@ def plot_affinity_matrix( # Plot the data on the left grid ax = plt.subplot(gs[0]) - ax.set_title("Affinity Matrix", fontsize=1 - + ax.set_title("Affinity Matrix", fontsize=1) + im = ax.imshow( lookup, vmin=-1, vmax=1, cmap=matplotlib.colormaps.get_cmap("RdBu") ) From 868de217205439a8dc2e50664e96822fa9a7a4b6 Mon Sep 17 00:00:00 2001 From: jolaem Date: Wed, 5 Jun 2024 15:40:21 +0000 Subject: [PATCH 4/4] Fix font --- avae/vis.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/avae/vis.py b/avae/vis.py index cd878ea7..17180d5c 100644 --- a/avae/vis.py +++ b/avae/vis.py @@ -1885,7 +1885,7 @@ def plot_affinity_matrix( # Plot the data on the left grid ax = plt.subplot(gs[0]) - ax.set_title("Affinity Matrix", fontsize=1) + ax.set_title("Affinity Matrix", fontsize=16) im = ax.imshow( lookup, vmin=-1, vmax=1, cmap=matplotlib.colormaps.get_cmap("RdBu")