Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Description
Bug summary
There seems to be an issue when trying to plot quivers in the axes created within subfigures.
Code for reproduction
importmatplotlib.pyplotaspltfig=plt.figure()subfigs=fig.subfigures(1,2)axsLeft=subfigs[0].subplots(1,2)axsLeft[0].quiver(1,1,1,1)
Actual outcome
Traceback (most recent call last):
File "", line 1, in
File "/home/hyzhou/.local/lib/python3.8/site-packages/matplotlib/init.py", line 1361, in inner
return func(ax, *map(sanitize_sequence, args), **kwargs)
File "/home/hyzhou/.local/lib/python3.8/site-packages/matplotlib/axes/_axes.py", line 5117, in quiver
q = mquiver.Quiver(self, *args, **kw)
File "/home/hyzhou/.local/lib/python3.8/site-packages/matplotlib/quiver.py", line 510, ininit
self._cid = ax.figure.callbacks.connect('dpi_changed', on_dpi_change)
AttributeError: 'SubFigure' object has no attribute 'callbacks'
Expected outcome
Expect the same outcome as
fig,ax=plt.subplots(1,2,)ax[0].quiver(1,1,1,1)
Additional information
No response
Operating system
Ubuntu
Matplotlib Version
3.4.3
Matplotlib Backend
No response
Python version
3.8.5
Jupyter version
No response
Installation
No response