11API Overview
22============
33
4- Below we describe several common approaches to plotting with Matplotlib. See
5- also the :doc: `api_changes `.
6-
74.. toctree ::
85 :hidden:
96
107 api_changes
118
129.. contents :: :local:
1310
14- The pyplot API
11+ See also the :doc: `api_changes `.
12+
13+ Usage patterns
1514--------------
1615
16+ Below we describe several common approaches to plotting with Matplotlib.
17+
18+ The pyplot API
19+ ^^^^^^^^^^^^^^
20+
1721`matplotlib.pyplot ` is a collection of command style functions that make
1822Matplotlib work like MATLAB. Each pyplot function makes some change to a
1923figure: e.g., creates a figure, creates a plotting area in a figure, plots
@@ -31,7 +35,7 @@ Further reading:
3135.. _api-index :
3236
3337The object-oriented API
34- -----------------------
38+ ^^^^^^^^^^^^^^^^^^^^^^^
3539
3640At its core, Matplotlib is object-oriented. We recommend directly working
3741with the objects, if you need more control and customization of your plots.
@@ -48,7 +52,23 @@ Further reading:
4852- Most of the :ref: `examples <examples-index >` use the object-oriented approach
4953 (except for the pyplot section)
5054
51- All Matplotlib submodules are documented here:
55+ The pylab API (disapproved)
56+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
57+
58+ .. warning ::
59+ Since heavily importing into the global namespace may result in unexpected
60+ behavior, the use of pylab is strongly discouraged. Use `matplotlib.pyplot `
61+ instead.
62+
63+ `pylab ` is a module that includes `matplotlib.pyplot `, `numpy `
64+ and some additional functions within a single namespace. Its original purpose
65+ was to mimic a MATLAB-like way of working by importing all functions into the
66+ global namespace. This is considered bad style nowadays.
67+
68+ Modules
69+ -------
70+
71+ Matplotlib consists of the following submodules:
5272
5373.. toctree ::
5474 :maxdepth: 1
@@ -109,7 +129,11 @@ All Matplotlib submodules are documented here:
109129 units_api.rst
110130 widgets_api.rst
111131
112- ... and the ``mpl_toolkits `` here:
132+ Toolkits
133+ --------
134+
135+ :ref: `toolkits-index ` are collections of application-specific functions that extend
136+ Matplotlib. The following toolkits are included:
113137
114138.. toctree ::
115139 :maxdepth: 1
@@ -119,17 +143,3 @@ All Matplotlib submodules are documented here:
119143 toolkits/axes_grid1.rst
120144 toolkits/axisartist.rst
121145 toolkits/axes_grid.rst
122-
123-
124- The pylab API (disapproved)
125- ---------------------------
126-
127- .. warning ::
128- Since heavily importing into the global namespace may result in unexpected
129- behavior, the use of pylab is strongly discouraged. Use `matplotlib.pyplot `
130- instead.
131-
132- `matplotlib.pylab ` is a module that includes `matplotlib.pyplot `, `numpy `
133- and some additional functions within a single namespace. Its original purpose
134- was to mimic a MATLAB-like way of working by importing all functions into the
135- global namespace. This is considered bad style nowadays.
0 commit comments