File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change 4
4
A procedural interface is provided by the companion pyplot module,
5
5
which may be imported directly, e.g.::
6
6
7
- from matplotlib.pyplot import *
8
-
9
- To include numpy functions too, use::
10
-
11
- from pylab import *
7
+ import matplotlib.pyplot as plt
12
8
13
9
or using ipython::
14
10
15
11
ipython
16
12
17
13
at your terminal, followed by::
18
14
19
- In [1]: %pylab
15
+ In [1]: %matplotlib
16
+ In [2]: import matplotlib.pyplot as plt
20
17
21
18
at the ipython shell prompt.
22
19
25
22
interactively. The
26
23
exceptions are the pyplot commands :func:`~matplotlib.pyplot.figure`,
27
24
:func:`~matplotlib.pyplot.subplot`,
28
- :func:`~matplotlib.pyplot.subplots`,
29
- :func:`~matplotlib.backends.backend_qt4agg.show`, and
25
+ :func:`~matplotlib.pyplot.subplots`, and
30
26
:func:`~pyplot.savefig`, which can greatly simplify scripting.
31
27
32
28
Modules include:
You can’t perform that action at this time.
0 commit comments