July 2019
Beginner to intermediate
740 pages
16h 52m
English
In some cases, the reference line itself isn't so interesting, but the area between two of them is; for this purpose, we have axvspan() and axhspan(). Let's revisit the resistance and support of the Facebook stock. We can use axhspan() to shade the area that falls between the two:
>>> ax = fb.close.plot(title='FB Closing Price')>>> ax.axhspan(support, resistance, alpha=0.2)>>> plt.ylabel('Price ($)')
This results in the following plot:

When we are interested in shading the area between two curves, we can use plt.fill_between() and plt.fill_betweenx(). Let's ...
Read now
Unlock full access