Skip to content
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

Breaking change in 3.2: quiver.set_UVC does not support single numbers any more #16743

Closed
maxnoe opened this issue Mar 12, 2020 · 1 comment
Closed
Labels
Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.
Milestone

Comments

@maxnoe
Copy link
Contributor

maxnoe commented Mar 12, 2020

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.

@QuLogic QuLogic added this to the v3.2.1 milestone Mar 13, 2020
@QuLogic QuLogic added the Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. label Mar 13, 2020
@tacaswell
Copy link
Member

Sorry about that!

jklymak added a commit that referenced this issue Mar 13, 2020
Allow numbers to set uvc for all arrows in quiver.set_UVC, fixes #16743
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this issue Mar 13, 2020
QuLogic added a commit that referenced this issue Mar 13, 2020
…745-on-v3.2.x

Backport PR #16745 on branch v3.2.x (Allow numbers to set uvc for all arrows in quiver.set_UVC, fixes #16743)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.
Projects
None yet
Development

No branches or pull requests

3 participants