The matplotlib.axes.Axes.quiver docs state that:
Arrow outline
linewidths and edgecolors can be used to customize the arrow outlines
However, a simple test code shows that edgecolor apparently does nothing. Am I missing something?
import matplotlib.pyplot as plt
import numpy as np
X = np.arange(-3, 3, 1)
Y = np.arange(-3, 3, 1)
U, V = np.meshgrid(X, Y)
plt.quiver(X, Y, U, V, edgecolor='r')
plt.show()

It seems linewidth parameter is set to 0 as default for plt.quiver. Adding some sort of value in the function call starts displaying the edges of arrows. I.e.:
import matplotlib.pyplot as plt
import numpy as np
X = np.arange(-3, 3, 1)
Y = np.arange(-3, 3, 1)
U, V = np.meshgrid(X, Y)
plt.quiver(X, Y, U, V, edgecolor='r', linewidth = 1)
plt.show()
Output:

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With