File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44A procedural interface is provided by the companion pyplot module,
55which may be imported directly, e.g.::
66
7- from matplotlib.pyplot import *
8-
9- To include numpy functions too, use::
10-
11- from pylab import *
7+ import matplotlib.pyplot as plt
128
139or using ipython::
1410
1511 ipython
1612
1713at your terminal, followed by::
1814
19- In [1]: %pylab
15+ In [1]: %matplotlib
16+ In [2]: import matplotlib.pyplot as plt
2017
2118at the ipython shell prompt.
2219
2522interactively. The
2623exceptions are the pyplot commands :func:`~matplotlib.pyplot.figure`,
2724:func:`~matplotlib.pyplot.subplot`,
28- :func:`~matplotlib.pyplot.subplots`,
29- :func:`~matplotlib.backends.backend_qt4agg.show`, and
25+ :func:`~matplotlib.pyplot.subplots`, and
3026:func:`~pyplot.savefig`, which can greatly simplify scripting.
3127
3228Modules include:
You can’t perform that action at this time.
0 commit comments