Skip to content

Commit 8e86d06

Browse files
committed
remove recommendations of pylab
in favor of `%matplotlib`, which does the same thing, excluding imports. - `%pylab` is gently discouraged, especially in teaching situations, because hiding namespaces confuses new folks. - `ipython notebook --pylab` is strongly discouraged (and deprecated in IPython 2.0) because its effects are invisible in the notebook, causing great confusion and inconsistent behavior in notebooks depending on how the server was started, with no visible indication about why that may be.
1 parent 4dc8aa9 commit 8e86d06

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

core/charts.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,12 @@ So far we haven't done anything to really explore IPython Notebook's features, b
1111

1212
If you're using Windows to run IPython Notebook or IPython QtConsole, you'll need to run the following special IPython command (in Notebook, type it into an IPython Notebook cell and then run it):
1313

14-
%pylab inline
14+
%matplotlib inline
1515

16-
... this tells IPython two things:
17-
18-
* `pylab` means that IPython will pre-import some useful modules that are used for mathematics and charting operations. Otherwise you have to import lots of these modules individually.
16+
... this tells IPython:
1917

2018
* `inline` means that you want charts to be shown "inline style" inside your notebook, not in a separate window.
2119

22-
If you're not using Windows and you started IPython Notebook or IPython QtConsole with the arguments `--pylab inline`, then this is already done.
23-
2420
## Simple Example
2521

2622
Here's an example of a simple chart:

core/notebook.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: Introducing IPython Notebook
55

66
---
77

8-
# IPython Notebok
8+
# IPython Notebook
99

1010
Until now we've worked with Python either directly via the interactive Python console, or by writing Python programs using a text
1111
editor.
@@ -19,7 +19,7 @@ However, there are other ways to work with Python. [IPython](http://ipython.org/
1919
<img src="../images/ipython_example.png" alt="A sample from the IPython Notebook introduction examples">
2020
</img>
2121

22-
(This is just an example of what IPython Notebook can do, don't feel like you need to understand it just yet! If you want to type it into IPython Notebook later on, type the special command `%pylab inline` before you start - there's an explanation coming up in the Charts chapter.)
22+
(This is just an example of what IPython Notebook can do, don't feel like you need to understand it just yet! If you want to type it into IPython Notebook later on, type the special command `%matplotlib inline` before you start - there's an explanation coming up in the Charts chapter.)
2323

2424
# Installing IPython Notebook
2525

@@ -47,9 +47,9 @@ Anaconda (described above) is the easiest option for this workshop. There are so
4747

4848
pip install ipython[notebook]
4949

50-
(If you're on OS X you will need XCode installed for this to work.)
50+
(If you're on OS X you may need Xcode to compile dependencies.)
5151

52-
* If you can't get IPython Notebook to work on your computer at all, there's a hosted service called [Wakari](https://www.wakari.io/) that you can use for free. In this case your programs won't be running on your own computer, they'll be running "in the cloud" (ie on Wakari's servers somewhere else) and you'll just see the results in your web browser.
52+
* If you can't get IPython Notebook to work on your computer at all, there's a hosted service called [Wakari](https://www.wakari.io/) that you can use for free. In this case your programs won't be running on your own computer, they'll be running "in the cloud" (i.e. on Wakari's servers somewhere else) and you'll just see the results in your web browser.
5353

5454
## Note about Python 3
5555

@@ -68,7 +68,7 @@ On Windows, you can find a launcher for IPython Notebook under Anaconda in the S
6868

6969
On Linux or OS X, you can start IPython Notebook from the command line. First open a terminal window, use 'cd' to navigate to the directory where you want to store your Python files and notebook document files. Then run this command:
7070

71-
ipython notebook --pylab inline
71+
ipython notebook
7272

7373
You should see some output like this:
7474

0 commit comments

Comments
 (0)