amueller / introduction_to_ml_with_python

Notebooks and code for the book "Introduction to Machine Learning with Python"
7.44k stars 4.57k forks source link

Fixed plot_linear_regression_wave() not displaying plots on some devices #102

Closed Dmium closed 5 years ago

Dmium commented 5 years ago

Reposted here after realising you probably don't update the other repo.

This probably extends to other functions but tbh this was the only one I needed at the time. Can add support on other methods later.

Tested for devices that worked already and broken device.

amueller commented 5 years ago

The code is meant to be run in a Jupyter notebook with %matplotlib inline enabled, as explained in the book. In that case you don't need plt.show(). If you run these as a script, you do have to call plt.show(), also as explained in the book.