8000 Breaking change in 3.2: quiver.set_UVC does not support single numbers any more · Issue #16743 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
Breaking change in 3.2: quiver.set_UVC does not support single numbers any more #16743
Closed
@maxnoe

Description

@maxnoe

Bug report

Bug summary

In prior versions of matplotlib, it was possible to set all UVC values to the same by calling quiver.set_UVC with single numbers for U and V. This raises an error in matplotlib 3.2.

Code for reproduction

import matplotlib.pyplot as plt

q = plt.quiver(
    [0, 0, 1],
    [0, 1, 1],
    [0.5, 0.5, 0.5],
    [0, 0, 0],
)

q.set_UVC(0, 0.5)
plt.xlim(-1, 2)
plt.ylim(-1, 2)
plt.show()

Actual outcome

matplotlib 3.1 works as expected, matplotlib 3.2 raises:

    q.set_UVC(0, 0.5)
  File "/home/maxnoe/.local/anaconda3/lib/python3.7/site-packages/matplotlib/quiver.py", line 604, in set_UVC
    raise ValueError(f'Argument {name} has a size {var.size}'
ValueError: Argument U has a size 1 which does not match 3, the number of arrow positions

Expected outcome

No breaking changes between minor revisions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Release criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0