@@ -63,9 +63,7 @@ def on_changed(m):
63
63
return cb
64
64
65
65
def _config_axes (self ):
66
- '''
67
- Make an axes patch and outline.
68
- '''
66
+ """Make an axes patch and outline."""
69
67
ax = self
70
68
ax .set_navigate (False )
71
69
@@ -142,22 +140,29 @@ def __init__(self, fig,
142
140
"""
143
141
Parameters
144
142
----------
145
- fig : Figure
143
+ fig : `. Figure`
146
144
The parent figure.
147
145
rect : (float, float, float, float) or int
148
146
The axes position, as a ``(left, bottom, width, height)`` tuple or
149
147
as a three-digit subplot position code (e.g., "121").
150
- direction : {"row", "column"}, defaults to "row"
151
- axes_pad : float or (float, float), defaults to 0.02
148
+ direction : {"row", "column"}, default: "row"
149
+ axes_pad : float or (float, float), default: 0.02
152
150
Padding or (horizontal padding, vertical padding) between axes, in
153
151
inches.
154
- add_all : bool, defaults to True
155
- share_all : bool, defaults to False
156
- share_x : bool, defaults to True
157
- share_y : bool, defaults to True
158
- label_mode : {"L", "1", "all"}, defaults to "L"
152
+ add_all : bool, default: True
153
+ share_all : bool, default: False
154
+ share_x : bool, default: True
155
+ share_y : bool, default: True
156
+ label_mode : {"L", "1", "all"}, default: "L"
157
+ Determines which axes will get tick labels:
158
+
159
+ - "L": All axes on the left column get vertical tick labels;
160
+ all axes on the bottom row get horizontal tick labels.
161
+ - "1": Only the bottom left axes is labelled.
162
+ - "all": all axes are labelled.
163
+
159
164
axes_class : a type that is a subclass of `matplotlib.axes.Axes`, \
160
- defaults to None
165
+ default: None
161
166
"""
162
167
self ._nrows , self ._ncols = nrows_ncols
163
168
@@ -320,13 +325,19 @@ def __getitem__(self, i):
320
325
321
326
def get_geometry (self ):
322
327
"""
323
- get geometry of the grid. Returns a tuple of two integer,
324
- representing number of rows and number of columns.
328
+ Return the number of rows and columns of the grid as (nrows, ncols).
325
329
"""
326
330
return self ._nrows , self ._ncols
327
331
328
332
def set_axes_pad (self , axes_pad ):
329
- "set axes_pad"
333
+ """
334
+ Set the padding between the axes.
335
+
336
+ Parameters
337
+ ----------
338
+ axes_pad : (float, float)
339
+ The padding (horizontal pad, vertical pad) in inches.
340
+ """
330
341
self ._axes_pad = axes_pad
331
342
332
343
# These two lines actually differ from ones in _init_axes_pad
@@ -335,25 +346,37 @@ def set_axes_pad(self, axes_pad):
335
346
336
347
def get_axes_pad (self ):
337
348
"""
338
- get axes_pad
349
+ Return the axes padding.
339
350
340
351
Returns
341
352
-------
342
- tuple
343
- Padding in inches, (horizontal pad, vertical pad)
353
+ hpad, vpad
354
+ Padding (horizontal pad, vertical pad) in inches.
344
355
"""
345
356
return self ._axes_pad
346
357
347
358
def set_aspect (self , aspect ):
348
- "set aspect"
359
+ """Set the aspect of the SubplotDivider."" "
349
360
self ._divider .set_aspect (aspect )
350
361
351
362
def get_aspect (self ):
352
- "get aspect"
363
+ """Return the aspect of the SubplotDivider."" "
353
364
return self ._divider .get_aspect ()
354
365
355
366
def set_label_mode (self , mode ):
356
- "set label_mode"
367
+ """
368
+ Define which axes have tick labels.
369
+
370
+ Parameters
371
+ ----------
372
+ mode : {"L", "1", "all"}
373
+ The label mode:
374
+
375
+ - "L": All axes on the left column get vertical tick labels;
376
+ all axes on the bottom row get horizontal tick labels.
377
+ - "1": Only the bottom left axes is labelled.
378
+ - "all": all axes are labelled.
379
+ """
357
380
if mode == "all" :
358
381
for ax in self .axes_all :
359
382
_tick_only (ax , False , False )
@@ -433,28 +456,35 @@ def __init__(self, fig,
433
456
"""
434
457
Parameters
435
458
----------
436
- fig : Figure
459
+ fig : `. Figure`
437
460
The parent figure.
438
461
rect : (float, float, float, float) or int
439
462
The axes position, as a ``(left, bottom, width, height)`` tuple or
440
463
as a three-digit subplot position code (e.g., "121").
441
- direction : {"row", "column"}, defaults to "row"
442
- axes_pad : float or (float, float), defaults to 0.02
464
+ direction : {"row", "column"}, default: "row"
465
+ axes_pad : float or (float, float), default: 0.02
443
466
Padding or (horizontal padding, vertical padding) between axes, in
444
467
inches.
445
- add_all : bool, defaults to True
446
- share_all : bool, defaults to False
447
- aspect : bool, defaults to True
448
- label_mode : {"L", "1", "all"}, defaults to "L"
449
- cbar_mode : {"each", "single", "edge", None }, defaults to None
450
- cbar_location : {"left", "right", "bottom", "top"}, defaults to "right"
451
- cbar_pad : float, defaults to None
452
- cbar_size : size specification (see `.Size.from_any`), defaults to "5%"
453
- cbar_set_cax : bool, defaults to True
468
+ add_all : bool, default: True
469
+ share_all : bool, default: False
470
+ aspect : bool, default: True
471
+ label_mode : {"L", "1", "all"}, default: "L"
472
+ Determines which axes will get tick labels:
473
+
474
+ - "L": All axes on the left column get vertical tick labels;
475
+ all axes on the bottom row get horizontal tick labels.
476
+ - "1": Only the bottom left axes is labelled.
477
+ - "all": all axes are labelled.
478
+
479
+ cbar_mode : {"each", "single", "edge", None }, default: None
480
+ cbar_location : {"left", "right", "bottom", "top"}, default: "right"
481
+ cbar_pad : float, default: None
482
+ cbar_size : size specification (see `.Size.from_any`), default: "5%"
483
+ cbar_set_cax : bool, default: True
454
484
If True, each axes in the grid has a *cax* attribute that is bound
455
485
to associated *cbar_axes*.
456
486
axes_class : a type that is a subclass of `matplotlib.axes.Axes`, \
457
- defaults to None
487
+ default: None
458
488
"""
459
489
self ._nrows , self ._ncols = nrows_ncols
460
490
0 commit comments