I am trying add a vertical line using Matplotlib but I want it to be behind my other plot lines. Currently it overlaps my other lines. Is there a simple way to do this?
plt.axvline(x=date, linestyle=':', color='lightgray')
I am trying add a vertical line using Matplotlib but I want it to be behind my other plot lines. Currently it overlaps my other lines. Is there a simple way to do this?
plt.axvline(x=date, linestyle=':', color='lightgray')
you should use the parameter zorder
plt.axvline(x=date, linestyle=':', color='lightgray', zorder=0)
your other lines need an higher zorder values