Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 704ae87

Browse files
committed
Add release note
1 parent eabbedf commit 704ae87

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
Add ``U``, ``V`` and ``C`` setter to ``Quiver``
2+
-----------------------------------------------
3+
4+
The ``U``, ``V`` and ``C`` values of the `~matplotlib.quiver.Quiver`
5+
can now be changed after the collection have been created.
6+
7+
.. plot::
8+
:include-source: true
9+
10+
import matplotlib.pyplot as plt
11+
from matplotlib.quiver import Quiver
12+
import numpy as np
13+
14+
fig, ax = plt.subplots()
15+
X = np.arange(-10, 10, 1)
16+
Y = np.arange(-10, 10, 1)
17+
U, V = np.meshgrid(X, Y)
18+
C = np.hypot(U, V)
19+
qc = Quiver(ax, X, Y, U, V, C)
20+
21+
qc.set_U(U/5)
22+
23+
ax.add_collection(qc)
24+
ax.autoscale_view()

0 commit comments

Comments
 (0)