Skip to content

Commit f4693e3

Browse files
committed
Create subplot overloads on pyplot.py
1 parent b863ba2 commit f4693e3

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

lib/matplotlib/pyplot.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1401,6 +1401,22 @@ def cla() -> None:
14011401

14021402
## More ways of creating Axes ##
14031403

1404+
@overload
1405+
def subplot(nrows: int, ncols: int, index: int, /, **kwargs): ...
1406+
1407+
1408+
@overload
1409+
def subplot(pos: int | SubplotSpec, /, **kwargs): ...
1410+
1411+
1412+
@overload
1413+
def subplot(ax: Axes, /): ...
1414+
1415+
1416+
@overload
1417+
def subplot(**kwargs): ...
1418+
1419+
14041420
@_docstring.interpd
14051421
def subplot(*args, **kwargs) -> Axes:
14061422
"""

0 commit comments

Comments
 (0)