From 3e0dba9654f01d31f5ccdcf6cfd5e85bcd644552 Mon Sep 17 00:00:00 2001 From: Damian Date: Mon, 8 Apr 2024 16:01:54 +0200 Subject: [PATCH] proper `share{x/y} = row/col` support when `col_wrap=True` --- seaborn/axisgrid.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/seaborn/axisgrid.py b/seaborn/axisgrid.py index 17d333bc89..2f0fe38fac 100644 --- a/seaborn/axisgrid.py +++ b/seaborn/axisgrid.py @@ -485,6 +485,10 @@ def __init__( if sharey: subplot_kws["sharey"] = axes[0] for i in range(1, n_axes): + if sharey == "row": + subplot_kws["sharey"] = axes[int(i // ncol * ncol)] + if sharex == "col": + subplot_kws["sharey"] = axes[int(i % ncol)] axes[i] = fig.add_subplot(nrow, ncol, i + 1, **subplot_kws) axes_dict = dict(zip(col_names, axes))