To make matplotlib plots show up inline in an IPython notebook, you can use the following code snippet: