Skip to content

Commit edbe2b1

Browse files
committed
Cleanup axes_divider docstrings.
HBoxDivider.new_locator doesn't have ny, ny1 parameters. The HBoxDivider.locate and VBoxDivider.locate docstrings are just copy-pasted from the parent one.
1 parent 766db51 commit edbe2b1

File tree

1 file changed

+2
-33
lines changed

1 file changed

+2
-33
lines changed

lib/mpl_toolkits/axes_grid1/axes_divider.py

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -625,8 +625,6 @@ def new_locator(self, nx, nx1=None):
625625
cell. When *nx1* is None, a single *nx*-th column is
626626
specified. Otherwise location of columns spanning between *nx*
627627
to *nx1* (but excluding *nx1*-th column) is specified.
628-
ny, ny1 : int
629-
Same as *nx* and *nx1*, but for row positions.
630628
"""
631629
return AxesLocator(self, nx, 0, nx1, None)
632630

@@ -655,21 +653,7 @@ def _locate(self, x, y, w, h,
655653
return x0, y0, ox, hh
656654

657655
def locate(self, nx, ny, nx1=None, ny1=None, axes=None, renderer=None):
658-
"""
659-
Parameters
660-
----------
661-
axes_divider : AxesDivider
662-
nx, nx1 : int
663-
Integers specifying the column-position of the
664-
cell. When *nx1* is None, a single *nx*-th column is
665-
specified. Otherwise location of columns spanning between *nx*
666-
to *nx1* (but excluding *nx1*-th column) is specified.
667-
ny, ny1 : int
668-
Same as *nx* and *nx1*, but for row positions.
669-
axes
670-
renderer
671-
"""
672-
656+
# docstring inherited
673657
figW, figH = self._fig.get_size_inches()
674658
x, y, w, h = self.get_position_runtime(axes, renderer)
675659

@@ -707,27 +691,12 @@ def new_locator(self, ny, ny1=None):
707691
return AxesLocator(self, 0, ny, None, ny1)
708692

709693
def locate(self, nx, ny, nx1=None, ny1=None, axes=None, renderer=None):
710-
"""
711-
Parameters
712-
----------
713-
axes_divider : AxesDivider
714-
nx, nx1 : int
715-
Integers specifying the column-position of the
716-
cell. When *nx1* is None, a single *nx*-th column is
717-
specified. Otherwise location of columns spanning between *nx*
718-
to *nx1* (but excluding *nx1*-th column) is specified.
719-
ny, ny1 : int
720-
Same as *nx* and *nx1*, but for row positions.
721-
axes
722-
renderer
723-
"""
724-
694+
# docstring inherited
725695
figW, figH = self._fig.get_size_inches()
726696
x, y, w, h = self.get_position_runtime(axes, renderer)
727697

728698
x_equivalent_sizes = self.get_horizontal_sizes(renderer)
729699
y_appended_sizes = self.get_vertical_sizes(renderer)
730-
731700
y0, x0, oy, ww = self._locate(y, x, h, w,
732701
x_equivalent_sizes, y_appended_sizes,
733702
figH, figW)

0 commit comments

Comments
 (0)