@@ -266,61 +266,7 @@ def subplots(self, *, sharex=False, sharey=False, squeeze=True,
266
266
"""
267
267
Add all subplots specified by this `GridSpec` to its parent figure.
268
268
269
- This utility wrapper makes it convenient to create common layouts of
270
- subplots in a single call.
271
-
272
- Parameters
273
- ----------
274
- sharex, sharey : bool or {'none', 'all', 'row', 'col'}, default: False
275
- Controls sharing of properties among x (*sharex*) or y (*sharey*)
276
- axes:
277
-
278
- - True or 'all': x- or y-axis will be shared among all subplots.
279
- - False or 'none': each subplot x- or y-axis will be independent.
280
- - 'row': each subplot row will share an x- or y-axis.
281
- - 'col': each subplot column will share an x- or y-axis.
282
-
283
- When subplots have a shared x-axis along a column, only the x tick
284
- labels of the bottom subplot are created. Similarly, when subplots
285
- have a shared y-axis along a row, only the y tick labels of the
286
- first column subplot are created. To later turn other subplots'
287
- ticklabels on, use `~matplotlib.axes.Axes.tick_params`.
288
-
289
- When subplots have a shared axis that has units, calling
290
- `~matplotlib.axis.Axis.set_units` will update each axis with the
291
- new units.
292
-
293
- squeeze : bool, optional, default: True
294
- - If True, extra dimensions are squeezed out from the returned
295
- array of Axes:
296
-
297
- - if only one subplot is constructed (nrows=ncols=1), the
298
- resulting single Axes object is returned as a scalar.
299
- - for Nx1 or 1xM subplots, the returned object is a 1D numpy
300
- object array of Axes objects.
301
- - for NxM, subplots with N>1 and M>1 are returned as a 2D array.
302
-
303
- - If False, no squeezing at all is done: the returned Axes object
304
- is always a 2D array containing Axes instances, even if it ends
305
- up being 1x1.
306
-
307
- subplot_kw : dict, optional
308
- Dict with keywords passed to the `~.Figure.add_subplot` call used
309
- to create each subplot.
310
-
311
- Returns
312
- -------
313
- ax : `~.axes.Axes` object or array of Axes objects.
314
- *ax* can be either a single `~matplotlib.axes.Axes` object or
315
- an array of Axes objects if more than one subplot was created. The
316
- dimensions of the resulting array can be controlled with the
317
- squeeze keyword, see above.
318
-
319
- See Also
320
- --------
321
- .pyplot.subplots
322
- .Figure.add_subplot
323
- .pyplot.subplot
269
+ See `.Figure.subplots` for detailed documentation.
324
270
"""
325
271
326
272
figure = self .figure
@@ -337,7 +283,8 @@ def subplots(self, *, sharex=False, sharey=False, squeeze=True,
337
283
# `subplots(1, 2, 1)` when `subplot(1, 2, 1)` was intended.
338
284
# In most cases, no error will ever occur, but mysterious behavior
339
285
# will result because what was intended to be the subplot index is
340
- # instead treated as a bool for sharex.
286
+ # instead treated as a bool for sharex. This check should go away
287
+ # once sharex becomes kwonly.
341
288
if isinstance (sharex , Integral ):
342
289
cbook ._warn_external (
343
290
"sharex argument to subplots() was an integer. Did you "
0 commit comments