@@ -1186,18 +1186,42 @@ def subplots(nrows=1, ncols=1, sharex=False, sharey=False, squeeze=True,
1186
1186
1187
1187
def subplot2grid (shape , loc , rowspan = 1 , colspan = 1 , fig = None , ** kwargs ):
1188
1188
"""
1189
- Create a subplot in a grid. The grid is specified by *shape*, at
1190
- location of *loc*, spanning *rowspan*, *colspan* cells in each
1191
- direction. The index for loc is 0-based. The current figure will
1192
- be used unless *fig* is specified. ::
1189
+ Create an axis at specific location inside a regular grid.
1193
1190
1194
- subplot2grid(shape, loc, rowspan=1, colspan=1)
1191
+ Parameters
1192
+ ----------
1193
+ shape : sequence of 2 ints
1194
+ Shape of grid in which to place axis.
1195
+ First entry is number of rows, second entry is number of columns.
1196
+
1197
+ loc : sequence of 2 ints
1198
+ Location to place axis within grid.
1199
+ First entry is row number, second entry is column number.
1200
+
1201
+ rowspan : int
1202
+ Number of rows for the axis to span to the right.
1203
+
1204
+ colspan : int
1205
+ Number of columns for the axis to span downwards.
1206
+
1207
+ fig : `Figure`, optional
1208
+ Figure to place axis in. Defaults to current figure.
1209
+
1210
+ **kwargs
1211
+ Additional keyword arguments are handed to `add_subplot`.
1212
+
1213
+
1214
+ Notes
1215
+ -----
1216
+ The following call ::
1217
+
1218
+ subplot2grid(shape, loc, rowspan=1, colspan=1)
1195
1219
1196
1220
is identical to ::
1197
1221
1198
- gridspec=GridSpec(shape[0], shape[1])
1199
- subplotspec=gridspec.new_subplotspec(loc, rowspan, colspan)
1200
- subplot(subplotspec)
1222
+ gridspec=GridSpec(shape[0], shape[1])
1223
+ subplotspec=gridspec.new_subplotspec(loc, rowspan, colspan)
1224
+ subplot(subplotspec)
1201
1225
"""
1202
1226
1203
1227
if fig is None :
0 commit comments