Note
Go to the endto download the full example code.
quiver(X, Y, U, V)#
Plot a 2D field of arrows.
Seequiver.

importmatplotlib.pyplotaspltimportnumpyasnpplt.style.use('_mpl-gallery-nogrid')# make datax=np.linspace(-4,4,6)y=np.linspace(-4,4,6)X,Y=np.meshgrid(x,y)U=X+YV=Y-X# plotfig,ax=plt.subplots()ax.quiver(X,Y,U,V,color="C0",angles='xy',scale_units='xy',scale=5,width=.015)ax.set(xlim=(-5,5),ylim=(-5,5))plt.show()