Sunday, April 24, 2016

jupyter notebook

To have vectorial images
from IPython.display import set_matplotlib_formats
set_matplotlib_formats('png', 'pdf')

source: http://blog.rtwilson.com/how-to-get-nice-vector-graphics-in-your-exported-pdf-ipython-notebooks/

to have inline images

%matplotlib inline
import matplotlib
matplotlib.rcParams["figure.facecolor"]=(1,1,1,1)
matplotlib.rcParams["axes.facecolor"]=(1,1,1,1)

No comments:

Post a Comment