Matplotlib set dpi

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