How to add a line parallel to y axis in matplotlib?
You can use matplotlib.pyplot.axvline()
.
import matplotlib.pyplot as plt
plt.figure()
plt.axvline(x=0.2)
plt.axvline(x=0.5)
plt.show()
You can use matplotlib.pyplot.axvline()
.
import matplotlib.pyplot as plt
plt.figure()
plt.axvline(x=0.2)
plt.axvline(x=0.5)
plt.show()