In [1]:
from IPython.display import set_matplotlib_formats
# generate pdf and png images
set_matplotlib_formats('pdf', 'png')

import matplotlib.pyplot as plt
%matplotlib inline


plt.plot(range(5))


Out[1]:
[<matplotlib.lines.Line2D at 0x7f21298cc828>]

In [ ]: