Are you using IPython (Jupyter notebooks or Google Colab)? If yes, one solution is setting %matplotlib inline which is a magic function. If you can share a link to the tutorial, I can check that out myself.