Got a bit of a weird edge case here for you.
If I run the following code to make a subplots instance with three axes and shared y-axis labels, then hide the last one, everything looks good.
fig,axs=uplt.subplots(ncols=3, sharey='labs')
axs[-1].set_visible(False)
for ax in axs[:-1]:
ax.plot([0, 1], [0, 1], label='line')
However, if I then add a legend to the second axis, the y-axis ticks for that second axis become hidden:
axs[-2].legend(loc='r')
This doesn't happen if I place the legend inside the axis:
fig,axs=uplt.subplots(ncols=3, sharey='labs')
axs[-1].set_visible(False)
for ax in axs[:-1]:
ax.plot([0, 1], [0, 1], label='line')
axs[-2].legend(loc='lr')
Kind of a niche edge case, although it becomes relevant when I have say 15 plots to show in a figure, and want to make a 4x4 grid and hide the last one.
Got a bit of a weird edge case here for you.
If I run the following code to make a subplots instance with three axes and shared y-axis labels, then hide the last one, everything looks good.
However, if I then add a legend to the second axis, the y-axis ticks for that second axis become hidden:
axs[-2].legend(loc='r')This doesn't happen if I place the legend inside the axis:
Kind of a niche edge case, although it becomes relevant when I have say 15 plots to show in a figure, and want to make a 4x4 grid and hide the last one.