I am trying to draw arrows between three points in matplotlib.
Suppose we have 3 arbitrary points (A1, A2, A3) in 2d and want to draw arrows from A1 to A2 and from A2 to A3.
Some code to make it clear:
import numpy as np import matplotlib.pyplot as plt A1=np.array([10,23]) A2=np.array([20,30]) A3=np.array([45,78]) drawArrow(A1,A2); drawArrow(A2,A3); plt.show();
How can we write a function drawArrow (tailCoord, headCoord), which receives the coordinates of the tail and arrow head and displays it?
source share