If you're using Jupyter notebook, just mention this line int he first cell.
In : %matplotlib inline
This is a really good command and works best with Jupiter IPython Notebook. Its basically used to show an image automatically within the browser without using show().
You can eliminate the use of this function complete and replace it with the bellow code:
import matplotlib.pyplot as plt