Skip to content

Commit 64cac36

Browse files
committed
Simplify the code
1 parent 23adb36 commit 64cac36

File tree

1 file changed

+0
-51
lines changed

1 file changed

+0
-51
lines changed

lib/matplotlib/pyplot.py

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1562,40 +1562,6 @@ def subplot(*args, **kwargs) -> Axes:
15621562
return ax
15631563

15641564

1565-
@overload
1566-
def subplots(
1567-
nrows: Literal[1] = ...,
1568-
ncols: Literal[1] = ...,
1569-
*,
1570-
sharex: bool | Literal["none", "all", "row", "col"] = ...,
1571-
sharey: bool | Literal["none", "all", "row", "col"] = ...,
1572-
squeeze: Literal[True] = ...,
1573-
width_ratios: Sequence[float] | None = ...,
1574-
height_ratios: Sequence[float] | None = ...,
1575-
subplot_kw: dict[str, Any] | None = ...,
1576-
gridspec_kw: dict[str, Any] | None = ...,
1577-
**fig_kw
1578-
) -> tuple[Figure, Axes]:
1579-
...
1580-
1581-
1582-
@overload
1583-
def subplots(
1584-
nrows: int = ...,
1585-
ncols: int = ...,
1586-
*,
1587-
sharex: bool | Literal["none", "all", "row", "col"] = ...,
1588-
sharey: bool | Literal["none", "all", "row", "col"] = ...,
1589-
squeeze: Literal[True] = ...,
1590-
width_ratios: Sequence[float] | None = ...,
1591-
height_ratios: Sequence[float] | None = ...,
1592-
subplot_kw: dict[str, Any] | None = ...,
1593-
gridspec_kw: dict[str, Any] | None = ...,
1594-
**fig_kw
1595-
) -> tuple[Figure, np.ndarray]: # TODO numpy/numpy#24738
1596-
...
1597-
1598-
15991565
@overload
16001566
def subplots(
16011567
nrows: int = ...,
@@ -1613,23 +1579,6 @@ def subplots(
16131579
...
16141580

16151581

1616-
@overload
1617-
def subplots(
1618-
nrows: int = ...,
1619-
ncols: int = ...,
1620-
*,
1621-
sharex: bool | Literal["none", "all", "row", "col"] = ...,
1622-
sharey: bool | Literal["none", "all", "row", "col"] = ...,
1623-
squeeze: bool = ...,
1624-
width_ratios: Sequence[float] | None = ...,
1625-
height_ratios: Sequence[float] | None = ...,
1626-
subplot_kw: dict[str, Any] | None = ...,
1627-
gridspec_kw: dict[str, Any] | None = ...,
1628-
**fig_kw
1629-
) -> tuple[Figure, Axes | np.ndarray]:
1630-
...
1631-
1632-
16331582
def subplots(
16341583
nrows: int = 1, ncols: int = 1, *,
16351584
sharex: bool | Literal["none", "all", "row", "col"] = False,

0 commit comments

Comments
 (0)