Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit be87978

Browse files
committed
Removed 'ipython -pylab' references
1 parent db02533 commit be87978

File tree

6 files changed

+35
-13
lines changed

6 files changed

+35
-13
lines changed

CHANGELOG

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
2014-04-23 Updated references to "ipython -pylab"
2+
As of ipython 3.0, pylab mode can no longer be invoked at shell
3+
startup with a command line flag. Instead, "%pylab" must be
4+
called from the ipython notebook directly. Documentation and
5+
examples referencing this flag have been changed accordingly.
6+
-Chris G.
7+
8+
19
2013-05-18 Added support for arbitrary rasterization resolutions to the
210
SVG backend. Previously the resolution was hard coded to 72
311
dpi. Now the backend class takes a image_dpi argument for

doc/_templates/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ <h1>Introduction</h1>
6363
For a sampling, see the <a href="{{ pathto('users/screenshots') }}">screenshots</a>, <a href="{{ pathto('gallery') }}">thumbnail</a> gallery, and
6464
<a href="examples/index.html">examples</a> directory</p>
6565

66-
<p>For example, using <tt>"ipython --pylab"</tt> to provide an interactive
67-
environment, to generate 10,000 gaussian random numbers and plot a
68-
histogram with 100 bins, you simply need to
66+
<p>For example, using <tt>"%pylab"</tt> in the IPython notebook for
67+
an interactive environment, to generate 10,000 gaussian random numbers
68+
and plot a histogram with 100 bins, you simply need to
6969
type</p>
7070

7171
<pre>

doc/users/image_tutorial.rst

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,13 @@ At the very least, you'll need to have access to the
1414
:func:`~matplotlib.pyplot.imshow` function. There are a couple of
1515
ways to do it. The easy way for an interactive environment::
1616

17-
$ipython -pylab
17+
$ipython
18+
19+
to enter the ipython shell, followed by::
20+
21+
In [1]: %pylab
22+
23+
to enter the pylab environment.
1824

1925
The imshow function is now directly accessible (it's in your
2026
`namespace <http://bytebaker.com/2008/07/30/python-namespaces/>`_).
@@ -32,7 +38,7 @@ where you use explicit namespaces and control object creation, etc...
3238
In [3]: import numpy as np
3339

3440
Examples below will use the latter method, for clarity. In these
35-
examples, if you use the -pylab method, you can skip the "mpimg." and
41+
examples, if you use the %pylab method, you can skip the "mpimg." and
3642
"plt." prefixes.
3743

3844
.. _importing_data:

doc/users/shell.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,18 @@ matplotlib aware, so when you start ipython in the *pylab* mode.
2929

3030
.. sourcecode:: ipython
3131

32-
johnh@flag:~> ipython -pylab
32+
johnh@flag:~> ipython
3333
Python 2.4.5 (#4, Apr 12 2008, 09:09:16)
3434
IPython 0.9.0 -- An enhanced Interactive Python.
3535

36+
In [1]: %pylab
37+
3638
Welcome to pylab, a matplotlib-based Python environment.
3739
For more information, type 'help(pylab)'.
3840

39-
In [1]: x = randn(10000)
41+
In [2]: x = randn(10000)
4042

41-
In [2]: hist(x, 100)
43+
In [3]: hist(x, 100)
4244

4345
it sets everything up for you so interactive plotting works as you
4446
would expect it to. Call :func:`~matplotlib.pyplot.figure` and a

lib/matplotlib/__init__.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,13 @@
1212
1313
or using ipython::
1414
15-
ipython -pylab
15+
ipython
16+
17+
at your terminal, followed by::
18+
19+
In [1]: %pylab
20+
21+
at the ipython shell prompt.
1622
1723
For the most part, direct use of the object-oriented library is
1824
encouraged when programming; pyplot is primarily for working

lib/matplotlib/backend_bases.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def __call__(self, block=None):
7676
it is a boolean that overrides all other factors
7777
determining whether show blocks by calling mainloop().
7878
The other factors are:
79-
it does not block if run inside "ipython --pylab";
79+
it does not block if run inside ipython's "%pylab" mode
8080
it does not block in interactive mode.
8181
"""
8282
managers = Gcf.get_all_fig_managers()
@@ -100,11 +100,11 @@ def __call__(self, block=None):
100100
ipython_pylab = not pyplot.show._needmain
101101
# IPython versions >= 0.10 tack the _needmain
102102
# attribute onto pyplot.show, and always set
103-
# it to False, when in --pylab mode.
103+
# it to False, when in %pylab mode.
104104
ipython_pylab = ipython_pylab and get_backend() != 'WebAgg'
105105
# TODO: The above is a hack to get the WebAgg backend
106-
# working with `ipython --pylab` until proper integration
107-
# is implemented.
106+
# working with ipython's `%pylab` mode until proper
107+
# integration is implemented.
108108
except AttributeError:
109109
ipython_pylab = False
110110

0 commit comments

Comments
 (0)