Is there a way to add two different requirements for axhspan on the same graph? For example, I would like shading from 0-10% and also from 0-25%. This is to help visualize different bounds.
Sure thing! You can add as many spans as you'd like to the same plot and customize each. Once you make your figure, just put an additional line of code for each axhspan: plt.plot(x, y) plt.axhspan(0, .1, alpha=0.1) plt.axhspan(0, .25, alpha=0.1, color='red', hatch='/') and so on.
Another seven hours of frustration spared. Thank you. Absolutely superb ♥️
So glad to hear that -- and thanks so much for all the support! ♥
Nice job styling queen!
Oh yeah 👑😎
Thank you very much for this video! I learnt something very helpful from this :)
You're very welcome and glad to hear it helped!
thank you - super helpful!
Great tutorial, as always.
Thanks,
Glad you liked it -- cheers!
How to shade some asymmetric non-trivial shaped region which is not defined by a particular function?
Parabéns pelo video.
Is there a way to add two different requirements for axhspan on the same graph? For example, I would like shading from 0-10% and also from 0-25%. This is to help visualize different bounds.
Sure thing! You can add as many spans as you'd like to the same plot and customize each. Once you make your figure, just put an additional line of code for each axhspan:
plt.plot(x, y)
plt.axhspan(0, .1, alpha=0.1)
plt.axhspan(0, .25, alpha=0.1, color='red', hatch='/')
and so on.