Skip to content

Commit

Permalink
Fix plot_pd function to work with matplotlib 3.8.0 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jklaise committed Sep 18, 2023
1 parent 54d0c95 commit 5fb8dc8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions alibi/explainers/partial_dependence.py
Original file line number Diff line number Diff line change
Expand Up @@ -1096,8 +1096,10 @@ def _is_categorical(feature):
for ax_group in one_way_axs.values():
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])
ax_group[0][0].get_shared_y_axes().join(ax_group[0][0], *[ax[0] for ax in ax_group[1:]])
ax_group[0][0].set_ylim(min_val, max_val)
axs = [ax[0] for ax in ax_group]
for ax1, ax2 in zip(axs, axs[1:]):
ax1.sharey(ax2)
axs[0].set_ylim(min_val, max_val)

fig.set(**fig_kw)
return axes
Expand Down

0 comments on commit 5fb8dc8

Please sign in to comment.