-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[Bug]: AttributeError: 'NoneType' object has no attribute 'rowspan' with mpl >=3.7 #25538
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This should likely be reported to Pandas. Drilling down, the problem is precisely that the colorbar is not part of the gridspec, and therefore Since #23573 Subplot is a simple alias of #23573 also contains a direct address of this change in behavior. >>> from matplotlib.axes import Subplot
>>> [ax for ax in fig.get_axes() if isinstance(ax, Subplot)]
[<Axes: label='A'>, <Axes: label='B'>, <Axes: label='C'>, <Axes: label='<colorbar>'>]
>>> [x.get_subplotspec() for x in fig.get_axes()]
[GridSpec(2, 2)[0:1, 0:1], GridSpec(2, 2)[0:1, 1:2], GridSpec(2, 2)[1:2, 0:2], None] |
Makes sense. I ended up reporting here b/c it does work with older mpl versions. |
This used to work because
used to ignore the colorbar axes because it was not a |
I could not find a pandas issue, but I opened a PR I think will fix it. |
- colab runs currently on python 3.10 with pandas 1.5.3 and matplotlib 3.7.1. This leads to an issue with the scatter plot in log_reg.py... ref: matplotlib/matplotlib#25538 - otherwise code runs in principle now on colab Next: merge to main and set paths in documentation.
Bug summary
With mpl <3.7 this code works the code snippet below works but it is broken in 3.7.0 and 3.7.1. The odd thing is that if I move the colorbar to the last line or if I don't use pandas to the the
C
plotting it works just fine. I guess there is a bad interaction somewhere that is messing up with the subplots.Code for reproduction
Actual outcome
Expected outcome
Additional information
No response
Operating system
No response
Matplotlib Version
3.7.0 and 3.7.1
Matplotlib Backend
module://matplotlib_inline.backend_inline
Python version
3.11
Jupyter version
6.5.3
Installation
conda
The text was updated successfully, but these errors were encountered: