FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Removal of x-shared polar axes causes crash · Issue #19988 · matplotlib/matplotlib · GitHub

Repository navigation

Removal of x-shared polar axes causes crash #19988

Closed

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

from pylab import *
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_majloc
AttributeError: '_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.)

Activity

  1. added this to the v3.4.2 milestone on Apr 29, 2021
  2. anntzer commented on Apr 29, 2021

    ContributorAuthor

    feel free to remilestone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL