From 1786df7d5b7f21cb6f9e02ccd58526a30af55126 Mon Sep 17 00:00:00 2001 From: Janis Klaise Date: Wed, 27 Sep 2023 10:32:43 +0100 Subject: [PATCH] Simplify sharing axes --- alibi/explainers/partial_dependence.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/alibi/explainers/partial_dependence.py b/alibi/explainers/partial_dependence.py index 51053aeee..56a628727 100644 --- a/alibi/explainers/partial_dependence.py +++ b/alibi/explainers/partial_dependence.py @@ -1097,8 +1097,8 @@ def _is_categorical(feature): min_val = min([ax_pd_lim[0] for _, ax_pd_lim in ax_group]) max_val = max([ax_pd_lim[1] for _, ax_pd_lim in ax_group]) axs = [ax[0] for ax in ax_group] - for ax1, ax2 in zip(axs, axs[1:]): - ax1.sharey(ax2) + for ax in axs[1:]: + ax.sharey(axs[0]) axs[0].set_ylim(min_val, max_val) fig.set(**fig_kw)