bundles / IPython 9.10.0 / IPython / core / magics / pylab / PylabMagics / pylab
function
IPython.core.magics.pylab:PylabMagics.pylab
Signature
def pylab ( self , line = '' ) Summary
::
Extended Summary
%pylab [--no-import-all] [gui]
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.
positional arguments:
gui Name of the matplotlib backend to use such as 'qt' or 'widget'. If given, the corresponding matplotlib backend is used, otherwise it will be matplotlib's default (which you can set in your matplotlib config file).
options:
--no-import-all Prevent IPython from performing
import *into the interactive namespace. You can govern the default behavior of this flag with the InteractiveShellApp.pylab_import_all configurable.
Aliases
-
IPython.core.magics.PylabMagics.pylab