Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Closed
Labels
Milestone
Description
Bug report
Bug summary
All's in the title.
(Note that x-sharing (which really means theta-sharing) polar axes makes sense because one can use set_thetalims to draw just a wedge.)
Code for reproduction
frompylabimport*ax1,ax2=gcf().subplots(2,sharex=True,subplot_kw={"projection":"polar"});ax2.remove()
Actual outcome
Traceback (most recent call last): File "<string>", line 4, in <module> File ".../path/to/matplotlib/artist.py", line 162, in remove self._remove_method(self) File ".../path/to/matplotlib/figure.py", line 967, in delaxes _reset_locators_and_formatters(last_ax.xaxis) File ".../path/to/matplotlib/figure.py", line 930, in _reset_locators_and_formatters isDefault = majloc.axis.isDefault_majlocAttributeError: '_AxisWrapper' object has no attribute 'isDefault_majloc'
Expected outcome
Normal axes removal.
Matplotlib version
- Operating system: linux
- Matplotlib version (
import matplotlib; print(matplotlib.__version__)
): head - Matplotlib backend (
print(matplotlib.get_backend())
): mplcairo - Python version: 39
- Jupyter version (if applicable):
- Other libraries:
#13482 happens to fix this, because it moves handling of isDefault_* to the tickers themselves (where they logically belong), rather than having them on the axis.
(Note that this is a separate issue from#19989 as the root cause seems very different.)