Varying arrow length in 3D quiver in matplotlib
<p>I try to have arrows of different length created by a single quiver command in matplotlib (for 3D). For the <strong>2D</strong> version of quiver I get arrows of different length, but they are not scaled right:</p>

<pre><code>x = linspace(0, 10, 11)

fig = plt.figure()
ax = fig.gca()
ax.quiver(x, zeros(x.shape), zeros(x.shape), x)
</code></pre>

<p><a href="https://i.stack.imgur.com/2sgmk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2sgmk.png" alt="enter image description here"></a></p>

<p>How do I get the right scaling for the 2D version (arrows of length 1, 2, 3, 4, ...)?</p>

<p>For <strong>3D</strong> all the arrows have exactly the same length and I can only change the length of the entire set by using the <code>length</code> argument:</p>

<pre><code>fig = plt.figure()
ax = fig.gca(projection='3d')
ax.quiver(x, zeros(x.shape), zeros(x.shape), zeros(x.shape), x, zeros(x.shape), pivot='tail')
ax.set_ylim([-1, 2])
ax.view_init(90, -90)
</code></pre>

<p><a href="https://i.stack.imgur.com/T6vnn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/T6vnn.png" alt="enter image description here"></a></p>

<p>How can I have sizes according to the <code>u, v, w</code> arguments that I set?</p>