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]:
In [ ]: