@@ -30,6 +30,62 @@ methods on them to plot data, add axis labels and a figure title.
3030 fig.set_facecolor('lightsteelblue')
3131
3232
33+
34+ .. _usage_patterns :
35+
36+ Usage patterns
37+ --------------
38+
39+ Below we describe several common approaches to plotting with Matplotlib. See
40+ :ref: `api_interfaces ` for an explanation of the trade-offs between the supported user
41+ APIs.
42+
43+
44+ The explicit API
45+ ^^^^^^^^^^^^^^^^
46+
47+ At its core, Matplotlib is an object-oriented library. We recommend directly
48+ working with the objects if you need more control and customization of your
49+ plots.
50+
51+ In many cases you will create a `.Figure ` and one or more
52+ `~matplotlib.axes.Axes ` using `.pyplot.subplots ` and from then on only work
53+ on these objects. However, it's also possible to create `.Figure `\ s
54+ explicitly (e.g. when including them in GUI applications).
55+
56+ Further reading:
57+
58+ - `matplotlib.axes.Axes ` and `matplotlib.figure.Figure ` for an overview of
59+ plotting functions.
60+ - Most of the :ref: `examples <examples-index >` use the object-oriented approach
61+ (except for the pyplot section)
62+
63+
64+ The implicit API
65+ ^^^^^^^^^^^^^^^^
66+
67+ `matplotlib.pyplot ` is a collection of functions that make
68+ Matplotlib work like MATLAB. Each pyplot function makes some change to a
69+ figure: e.g., creates a figure, creates a plotting area in a figure, plots
70+ some lines in a plotting area, decorates the plot with labels, etc.
71+
72+ `.pyplot ` is mainly intended for interactive plots and simple cases of
73+ programmatic plot generation.
74+
75+ Further reading:
76+
77+ - The `matplotlib.pyplot ` function reference
78+ - :doc: `/tutorials/introductory/pyplot `
79+ - :ref: `Pyplot examples <pyplots_examples >`
80+
81+ .. _api-index :
82+
83+ The pylab API (discouraged)
84+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
85+
86+ .. automodule :: pylab
87+ :no-members:
88+
3389Modules
3490-------
3591
@@ -107,59 +163,3 @@ Alphabetical list of modules:
107163 toolkits/axes_grid1.rst
108164 toolkits/axisartist.rst
109165 toolkits/axes_grid.rst
110-
111-
112- .. _usage_patterns :
113-
114- Usage patterns
115- --------------
116-
117- Below we describe several common approaches to plotting with Matplotlib. See
118- :ref: `api_interfaces ` for an explanation of the trade-offs between the supported user
119- APIs.
120-
121-
122- The explicit API
123- ^^^^^^^^^^^^^^^^
124-
125- At its core, Matplotlib is an object-oriented library. We recommend directly
126- working with the objects if you need more control and customization of your
127- plots.
128-
129- In many cases you will create a `.Figure ` and one or more
130- `~matplotlib.axes.Axes ` using `.pyplot.subplots ` and from then on only work
131- on these objects. However, it's also possible to create `.Figure `\ s
132- explicitly (e.g. when including them in GUI applications).
133-
134- Further reading:
135-
136- - `matplotlib.axes.Axes ` and `matplotlib.figure.Figure ` for an overview of
137- plotting functions.
138- - Most of the :ref: `examples <examples-index >` use the object-oriented approach
139- (except for the pyplot section)
140-
141-
142- The implicit API
143- ^^^^^^^^^^^^^^^^
144-
145- `matplotlib.pyplot ` is a collection of functions that make
146- Matplotlib work like MATLAB. Each pyplot function makes some change to a
147- figure: e.g., creates a figure, creates a plotting area in a figure, plots
148- some lines in a plotting area, decorates the plot with labels, etc.
149-
150- `.pyplot ` is mainly intended for interactive plots and simple cases of
151- programmatic plot generation.
152-
153- Further reading:
154-
155- - The `matplotlib.pyplot ` function reference
156- - :doc: `/tutorials/introductory/pyplot `
157- - :ref: `Pyplot examples <pyplots_examples >`
158-
159- .. _api-index :
160-
161- The pylab API (discouraged)
162- ^^^^^^^^^^^^^^^^^^^^^^^^^^^
163-
164- .. automodule :: pylab
165- :no-members:
0 commit comments