X Tutup
Skip to content

quiverkey problem when angles=array #6972

@mlandriau

Description

@mlandriau

With matplotlib 1.5.1 and python 3.5.2, quiverkey plots every vector when angles=array instead of 'uv' or 'xy' in the quiver object used to create the key.

import matplotlib.pyplot as plt
import numpy as np

fig, ax = plt.subplots()

X, Y = np.meshgrid(np.arange(5), np.arange(7))
U = V = np.ones_like(X)

phi = (np.random.rand(5, 7) - .5) * 150
q = ax.quiver(X, Y, U, V*.5, angles=phi, color='r', alpha=1)

qk = ax.quiverkey(q, 0.5, 0.92, 2, r'$2 \frac{m}{s}$',
                      labelpos='W',
                      fontproperties={'weight': 'bold'})
plt.show()

quiverkey_issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    Difficulty: Mediumhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issues

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup