Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><code>--pylab[=option]</code> is almost technically equivalent to <code>%pylab option</code> as the difference that you cannot un-pylab a <code>--pylab</code> kernel, but you can restart a <code>%pylab</code> kernel.</p> <p><code>%pylab</code> is a little more that just <code>from pylab import *</code> (see <code>%pylab?</code>for a longer explanation), but in short yes it imports a lot of things, but it also hooks event loops (qt, wx, osx...) and set-up some display hooks for matplotlib (the things that magically allow you to get inline graph). Setting the display-hook is closer to something like <code>sympy.init_printing()</code> if you wonder.</p> <p>Note that starting at IPython 1.0 we recommend not to use <code>--pylab</code> or <code>%pylab</code> (unless you know exactly the implication). We provide <code>%matplotlib</code> that only init the display hook. <code>%pylab</code> will warn you if it replaced a few object in current namespace, and which ones. This is useful especially for functions like <code>sum</code> which do not have the same behavior the behavior with and without pylab and leads to subtle bugs.</p> <p>We consider now that <code>--pylab</code> was a mistake, but that it was still really usefull at the beginning of IPython. We all know that <code>Explicit is better than implicit</code> so if you can advise people not to use <code>%pylab</code> we would appreciate it, to one day get rid of it. </p> <p>Extract from %pylab help that give only the import part of pylab:</p> <pre><code>%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 * </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload