import matplotlib_inline.backend_inline if isinstance(ipython_format, str): ipython_format = [ipython_format] matplotlib_inline.backend_inline.set_matplotlib_formats(*ipython_format) It may take some investigation to figure out how to do this in a backwards compatible way. I would also note the ...