@@ -65,7 +65,7 @@ then automatically set that title to the current axes object::
65
65
66
66
.. sourcecode:: ipython
67
67
68
- In [20 ]: %matplotlib
68
+ In [14 ]: %matplotlib
69
69
Using matplotlib backend: Qt4Agg
70
70
71
71
In [15]: import matplotlib.pyplot as plt
@@ -81,24 +81,18 @@ because the commands have side-effects (altering the global state)
81
81
using many :mod: `matplotlib.pyplot ` commands in scripts or functions
82
82
can lead to unexpected and difficult to track down bugs.
83
83
84
- Pylab is a convenience module that imports pyplot (for
85
- plotting) and numpy functionality (for mathematics and for
86
- working with arrays) in a single namespace. You can than bulk import
87
- from pylab::
84
+ Pylab is a convenience module that imports pyplot (for plotting) and
85
+ numpy functionality (for mathematics and for working with arrays) in a
86
+ single namespace. You can than bulk import from pylab to get an even
87
+ more MATLAB-like environment. This seems convenient for interactive
88
+ calculations and plotting, as it (barely) minimizes typing, however it
89
+ is not recommended as it clobbers your namespace. As with :mod: `pyplot `,
90
+ it is not recommended to use :mod: `pylab ` in scripts and bulk importing
91
+ :mod: `pylab ` in scripts is discouraged as with all bulk importing.
88
92
89
- .. sourcecode:: ipython
90
-
91
- In [1]: from pylab import *
92
-
93
- to get an even more MATLAB-like environment. For example, one can
94
- call the `sin ` and `cos ` functions just like you could in MATLAB, as
95
- well as having all the features of pyplot. The pylab interface is
96
- convenient for interactive calculations and plotting, as it minimizes
97
- typing. This is not recommended to use pylab in scripts for the same reasons
98
- bulk importing is discouraged in general.
99
-
100
- For non-interactive use it is suggested to use pyplot to create the
101
- figures and then the OO interface for plotting.
93
+ For non-interactive plotting it is suggested
94
+ to use pyplot to create the figures and then the OO interface for
95
+ plotting.
102
96
103
97
.. _coding_styles :
104
98
@@ -146,7 +140,7 @@ clarity becomes increasingly valuable, and the richer and more
146
140
complete object-oriented interface will likely make the program easier
147
141
to write and maintain.
148
142
149
- Typically one finds them selves making the same plots over and over
143
+ Typically one finds oneself making the same plots over and over
150
144
again, but with different data sets, which leads to needing to write
151
145
specialized functions to do the plotting. The recommended function
152
146
signature is something like: ::
0 commit comments