jakevdp/PythonDataScienceHandbook

Fancy Indexing Bins example graph error

JTN-Kendal opened this issue · 1 comments

pg 84

In[24:

'plot the results
plt.plot(bins, counts, linestyle='steps');'

This produces an error as lifestyle is incorrect. it should (or at least this works) be 'drawstyle="steps"':

plt.plot(bins, counts, drawstyle="steps");

Do:

plt.step(bins, counts)

Instead of plt.plot().

Also see #329. Some of the code examples need updates since this book was last updated in 2018. 😸