proplot icon indicating copy to clipboard operation
proplot copied to clipboard

Issue with the shared x-label when an axis is deleted

Open kinyatoride opened this issue 3 years ago • 2 comments

Description

The shared x-label does not appear when fig.delaxes is used.

Steps to reproduce

fig, axs = pplt.subplots(ncols=3, nrows=2)

axs.format(xlabel='xlabel', ylabel='ylabel')
fig.delaxes(axs[-1])

Actual behavior: [What actually happened] pplt

Equivalent steps in matplotlib

import matplotlib.pyplot as plt
fig, axs = plt.subplots(ncols=3, nrows=2)

fig.supxlabel('x-label')
fig.supylabel('y-label')
fig.delaxes(axs.flat[-1])

plt

Proplot version

0.9.5 3.4.3

kinyatoride avatar Feb 16 '22 00:02 kinyatoride

It works well for me:

image

matplotlib: 3.5.1
proplot: 0.9.5.post202

zxdawn avatar Feb 16 '22 08:02 zxdawn

Latest "dev" version shows the label, but proplot should probably be able to auto-update label positions when subplots are dynamically deleted. That is, it should have the same effect as passing a subplots array with "zero" slots:

fig, axs = pplt.subplots([[1, 2, 3], [4, 5, 0]])
axs.format(xlabel='xlabel', ylabel='ylabel')

iTerm2 rv6vCi tmpur7vp89g

lukelbd avatar Mar 29 '23 09:03 lukelbd