AttributeError: Unknown property axisbg
Replace the below line of code
ax = plt.axes(axisbg='#E6E6E6')
with
ax = plt.axes(facecolor='#E6E6E6')
axisbg is deprecated in matplotlib 2.0+ Use facecolor instead.
https://matplotlib.org/api/api_changes.html