{ } Raw JSON

bundles / IPython 9.13.0 / IPython / core / interactiveshell / InteractiveShell / enable_pylab

function

IPython.core.interactiveshell:InteractiveShell.enable_pylab

source: /IPython/core/interactiveshell.py :3862

Signature

def   enable_pylab ( self gui = None import_all = True )

Summary

Activate pylab support at runtime.

Extended Summary

This turns on support for matplotlib, preloads into the interactive namespace all of numpy and pylab, and configures IPython to correctly interact with the GUI event loop. The GUI backend to be used can be optionally selected with the optional gui argument.

This method only adds preloading the namespace to InteractiveShell.enable_matplotlib.

Parameters

gui : optional, string

If given, dictates the choice of matplotlib GUI backend to use (should be one of IPython's supported backends, 'qt', 'osx', 'tk', 'gtk', 'wx' or 'inline'), otherwise we use the default chosen by matplotlib (as dictated by the matplotlib build-time options plus the user's matplotlibrc configuration file). Note that not all backends make sense in all contexts, for example a terminal ipython can't display figures inline.

import_all : optional, bool, default: True

Whether to do from numpy import * and from pylab import * in addition to module imports.

Aliases

  • IPython.InteractiveShell.enable_pylab