class_docstr: Magics related to matplotlib's pylab support
class_docstr_tok: ["Magics","related","to","matplotlib","'s","pylab","support"]
docstr: Load numpy and matplotlib to work interactively.
  
  This function lets you activate pylab (matplotlib, numpy and
  interactive support) at any point during an IPython session.
  
  %pylab makes the following imports::
  
      import numpy
      import matplotlib
      from matplotlib import pylab, mlab, pyplot
      np = numpy
      plt = pyplot
      
      from IPython.display import display
      from IPython.core.pylabtools import figsize, getfigs
      
      from pylab import *
      from numpy import *
  
  If you pass `--no-import-all`, the last two `*` imports will be excluded.
  
  See the %matplotlib magic for more details about activating matplotlib
  without affecting the interactive namespace.
docstr_tok: ["Load","numpy","and","matplotlib","to","work","interactively",".","This","function","lets","you","activate","pylab","(","matplotlib",",","numpy","and","interactive","support",")","at","any","point","during","an","IPython","session",".","%","pylab","makes","the","following","imports",":",":","import","numpy","import","matplotlib","from","matplotlib","import","pylab",",","mlab",",","pyplot","np","=","numpy","plt","=","pyplot","from","IPython.display","import","display","from","IPython.core.pylabtools","import","figsize",",","getfigs","from","pylab","import","*","from","numpy","import","*","If","you","pass","`","--","no-import-all","`",",","the","last","two","`","*","`","imports","will","be","excluded",".","See","the","%","matplotlib","magic","for","more","details","about","activating","matplotlib","without","affecting","the","interactive","namespace","."]
code: def pylab(self, line=""):
      """Load numpy and matplotlib to work interactively.
  
      This function lets you activate pylab (matplotlib, numpy and
      interactive support) at any point during an IPython session.
  
      %pylab makes the following imports::
  
          import numpy
          import matplotlib
          from matplotlib import pylab, mlab, pyplot
          np = numpy
          plt = pyplot
  
          from IPython.display import display
          from IPython.core.pylabtools import figsize, getfigs
  
          from pylab import *
          from numpy import *
  
      If you pass `--no-import-all`, the last two `*` imports will be excluded.
  
      See the %matplotlib magic for more details about activating matplotlib
      without affecting the interactive namespace.
      """
      args = magic_arguments.parse_argstring(self.pylab, line)
      if args.no_import_all is None:
          # get default from Application
          if Application.initialized():
              app = Application.instance()
              try:
                  import_all = app.pylab_import_all
              except AttributeError:
                  import_all = True
          else:
              # nothing specified, no app - default True
              import_all = True
      else:
          # invert no-import flag
          import_all = not args.no_import_all
  
      gui, backend, clobbered = self.shell.enable_pylab(
          args.gui, import_all=import_all
      )
      self._show_matplotlib_backend(args.gui, backend)
      print(
          "Populating the interactive namespace from numpy and matplotlib"
      )
      if clobbered:
          warn(
              "pylab import has clobbered these variables: %s"
              % clobbered
              + "\n`%matplotlib` prevents importing * from pylab and numpy"
          )
  
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 2 for calling the PylabMagics obj's underlying member method code with example usage: obj.pylab(line) without return types