Is there any way to share Y axis among only part of subplots in matplotlib?

Viewed 2235

I have N subplots, and I want to share Y axis for all but one of them. Is it possible?

2 Answers

if you are using this format.

fig, axs = plt.subplots(4,1,sharex=True,figsize=(8,8))

You can try

axs[2].sharey(axs[1])

axs[3].sharey(axs[1])

After each subplot.

Related