jakevdp / PythonDataScienceHandbook

Python Data Science Handbook: full text in Jupyter Notebooks
http://jakevdp.github.io/PythonDataScienceHandbook
MIT License
42.76k stars 17.83k forks source link

Fancy Indexing Bins example graph error #311

Open JTN-Kendal opened 3 years ago

JTN-Kendal commented 3 years ago

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");

joshuamegnauth54 commented 2 years ago

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. 😸