@@ -30,6 +30,62 @@ methods on them to plot data, add axis labels and a figure title.
30
30
fig.set_facecolor('lightsteelblue')
31
31
32
32
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
+
33
89
Modules
34
90
-------
35
91
@@ -107,54 +163,3 @@ Alphabetical list of modules:
107
163
toolkits/axes_grid1.rst
108
164
toolkits/axisartist.rst
109
165
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.
118
-
119
- The pyplot API
120
- ^^^^^^^^^^^^^^
121
-
122
- `matplotlib.pyplot ` is a collection of functions that make
123
- Matplotlib work like MATLAB. Each pyplot function makes some change to a
124
- figure: e.g., creates a figure, creates a plotting area in a figure, plots
125
- some lines in a plotting area, decorates the plot with labels, etc.
126
-
127
- `.pyplot ` is mainly intended for interactive plots and simple cases of
128
- programmatic plot generation.
129
-
130
- Further reading:
131
-
132
- - The `matplotlib.pyplot ` function reference
133
- - :doc: `/tutorials/introductory/pyplot `
134
- - :ref: `Pyplot examples <pyplots_examples >`
135
-
136
- .. _api-index :
137
-
138
- The object-oriented API
139
- ^^^^^^^^^^^^^^^^^^^^^^^
140
-
141
- At its core, Matplotlib is object-oriented. We recommend directly working
142
- with the objects, if you need more control and customization of your plots.
143
-
144
- In many cases you will create a `.Figure ` and one or more
145
- `~matplotlib.axes.Axes ` using `.pyplot.subplots ` and from then on only work
146
- on these objects. However, it's also possible to create `.Figure `\ s
147
- explicitly (e.g. when including them in GUI applications).
148
-
149
- Further reading:
150
-
151
- - `matplotlib.axes.Axes ` and `matplotlib.figure.Figure ` for an overview of
152
- plotting functions.
153
- - Most of the :ref: `examples <examples-index >` use the object-oriented approach
154
- (except for the pyplot section)
155
-
156
- The pylab API (discouraged)
157
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^
158
-
159
- .. automodule :: pylab
160
- :no-members:
0 commit comments