inline images have low quality

To change the “%matplotlib inline” figure resolution on the notebook do:

import matplotlib as mpl
mpl.rcParams['figure.dpi']= dpi

I recommend setting the dpi somewhere between 150 and 300 if you are going to download/print the notebook. Ensure that %matplotlib inline runs before the mpl.rcParams['figure.dpi']= dpi otherwise the magic command resets the dpi to its default value (credits to @fabioedoardoluigialberto for noticing this).

The snipppet below only changes the dpi of figures saved through the savefig method, not of inline generated figures.

import matplotlib as mpl
mpl.rc("savefig", dpi=dpi)

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)