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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With