Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Bug]: Quiver not working with subfigure? #22804

Milestone
@henry2004y

Description

@henry2004y

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp