fig, ax = plt.subplots()
ax.plot([0, 1], [0, 1], lw=3, color='salmon', clip_on=False, transform=fig.
    transFigure)
plt.show()
Is there a way to plot a Line2D in points coordinates in Matplotlib in Python?