ipython_matplotlib¶
-
ipython_matplotlib
(backend=None, fmt=None)[source]¶ Set up the matplotlib backend for ipython sessions and apply the following
%config InlineBackend
magic commands.%config InlineBackend.figure_formats = fmt %config InlineBackend.rc = {} # never override my rc settings! %config InlineBackend.close_figures = True # memory issues %config InlineBackend.print_figure_kwargs = {'bbox_inches': None} # we use our own tight layout algorithm
This must be called before drawing any figures! For some ipython sessions (e.g. terminals) the backend can only be changed by adding
matplotlib: backend
to your.proplotrc
file. See Configuring proplot for details.- Parameters
backend (str, optional) – The backend name. Use
'auto'
to apply%matplotlib inline
for notebooks and%matplotlib qt
for all other sessions.fmt (str or list of str, optional) – The inline backend file format(s). Valid formats include
'jpg'
,'png'
,'svg'
,'pdf'
, and'retina'
. This is ignored for non-inline backends.