import matplotlib.pyplot as plt import numpy as np x = np.array([1,2,2,1,1]) y = np.array([1,1,2,2,1]) plt.plot(x,y) plt.show()