class_docstr: Magics related to matplotlib's pylab support
class_docstr_tok: ["Magics","related","to","matplotlib","'s","pylab","support"]
docstr: Set up matplotlib to work interactively.
  
  This function lets you activate matplotlib interactive support
  at any point during an IPython session. It does not import anything
  into the interactive namespace.
  
  If you are using the inline matplotlib backend in the IPython Notebook
  you can set which figure formats are enabled using the following::
  
      In [1]: from IPython.display import set_matplotlib_formats
      
      In [2]: set_matplotlib_formats('pdf', 'svg')
  
  The default for inline figures sets `bbox_inches` to 'tight'. This can
  cause discrepancies between the displayed image and the identical
  image created using `savefig`. This behavior can be disabled using the
  `%config` magic::
      
      In [3]: %config InlineBackend.print_figure_kwargs = {'bbox_inches':None}
  
  In addition, see the docstring of
  `IPython.display.set_matplotlib_formats` and
  `IPython.display.set_matplotlib_close` for more information on
  changing additional behaviors of the inline backend.
  
  Examples
  --------
  To enable the inline backend for usage with the IPython Notebook::
  
      In [1]: %matplotlib inline
  
  In this case, where the matplotlib default is TkAgg::
  
      In [2]: %matplotlib
      Using matplotlib backend: TkAgg
  
  But you can explicitly request a different GUI backend::
  
      In [3]: %matplotlib qt
  
  You can list the available backends using the -l/--list option::
  
     In [4]: %matplotlib --list
     Available matplotlib backends: ['osx', 'qt4', 'qt5', 'gtk3', 'notebook', 'wx', 'qt', 'nbagg',
     'gtk', 'tk', 'inline']
docstr_tok: ["Set","up","matplotlib","to","work","interactively",".","This","function","lets","you","activate","matplotlib","interactive","support","at","any","point","during","an","IPython","session",".","It","does","not","import","anything","into","the","interactive","namespace",".","If","you","are","using","the","inline","matplotlib","backend","in","the","IPython","Notebook","you","can","set","which","figure","formats","are","enabled","using","the","following",":",":","In","[","1","]",":","from","IPython.display","import","set_matplotlib_formats","In","[","2","]",":","set_matplotlib_formats","(","'pdf","'",",","'svg","'",")","The","default","for","inline","figures","sets","`","bbox_inches","`","to","'tight","'",".","This","can","cause","discrepancies","between","the","displayed","image","and","the","identical","image","created","using","`","savefig","`",".","This","behavior","can","be","disabled","using","the","`","%","config","`","magic",":",":","In","[","3","]",":","%","config","InlineBackend.print_figure_kwargs","=","{","'bbox_inches","'",":","None","}","In","addition",",","see","the","docstring","of","`","IPython.display.set_matplotlib_formats","`","and","`","IPython.display.set_matplotlib_close","`","for","more","information","on","changing","additional","behaviors","of","the","inline","backend",".","Examples","--","--","--","--","To","enable","the","inline","backend","for","usage","with","the","IPython","Notebook",":",":","In","[","1","]",":","%","matplotlib","inline","In","this","case",",","where","the","matplotlib","default","is","TkAgg",":",":","In","[","2","]",":","%","matplotlib","Using","matplotlib","backend",":","TkAgg","But","you","can","explicitly","request","a","different","GUI","backend",":",":","In","[","3","]",":","%","matplotlib","qt","You","can","list","the","available","backends","using","the","-l\/","--","list","option",":",":","In","[","4","]",":","%","matplotlib","--","list","Available","matplotlib","backends",":","[","'osx","'",",","'qt4","'",",","'qt5","'",",","'gtk3","'",",","'notebook","'",",","'wx","'",",","'qt","'",",","'nbagg","'",",","'gtk","'",",","'tk","'",",","'inline","'","]"]
code: def matplotlib(self, line=""):
      """Set up matplotlib to work interactively.
  
      This function lets you activate matplotlib interactive support
      at any point during an IPython session. It does not import anything
      into the interactive namespace.
  
      If you are using the inline matplotlib backend in the IPython Notebook
      you can set which figure formats are enabled using the following::
  
          In [1]: from IPython.display import set_matplotlib_formats
  
          In [2]: set_matplotlib_formats('pdf', 'svg')
  
      The default for inline figures sets `bbox_inches` to 'tight'. This can
      cause discrepancies between the displayed image and the identical
      image created using `savefig`. This behavior can be disabled using the
      `%config` magic::
  
          In [3]: %config InlineBackend.print_figure_kwargs = {'bbox_inches':None}
  
      In addition, see the docstring of
      `IPython.display.set_matplotlib_formats` and
      `IPython.display.set_matplotlib_close` for more information on
      changing additional behaviors of the inline backend.
  
      Examples
      --------
      To enable the inline backend for usage with the IPython Notebook::
  
          In [1]: %matplotlib inline
  
      In this case, where the matplotlib default is TkAgg::
  
          In [2]: %matplotlib
          Using matplotlib backend: TkAgg
  
      But you can explicitly request a different GUI backend::
  
          In [3]: %matplotlib qt
  
      You can list the available backends using the -l/--list option::
  
         In [4]: %matplotlib --list
         Available matplotlib backends: ['osx', 'qt4', 'qt5', 'gtk3', 'notebook', 'wx', 'qt', 'nbagg',
         'gtk', 'tk', 'inline']
      """
      args = magic_arguments.parse_argstring(self.matplotlib, line)
      if args.list:
          backends_list = list(backends.keys())
          print("Available matplotlib backends: %s" % backends_list)
      else:
          gui, backend = self.shell.enable_matplotlib(args.gui)
          self._show_matplotlib_backend(args.gui, backend)
  
file_path: catboost/contrib/python/ipython/py2/IPython/core/magics/pylab.py
imports: from __future__ import print_function
  from traitlets.config.application import Application
  from IPython.core import magic_arguments
  from IPython.core.magic import Magics, magics_class, line_magic
  from IPython.testing.skipdoctest import skip_doctest
  from warnings import warn
  from IPython.core.pylabtools import backends
label_desc: Use image node_id 1 for calling the PylabMagics obj's underlying member method code with example usage: obj.matplotlib(line) without return types