95
95
)
96
96
97
97
from matplotlib .axis import Tick
98
+ from matplotlib import axes
98
99
from matplotlib .axes import SubplotBase
99
100
from matplotlib .axes ._base import _AxesBase
100
101
from matplotlib .backend_bases import RendererBase , Event
@@ -1089,7 +1090,7 @@ def figlegend(*args, **kwargs) -> Legend:
1089
1090
def axes (
1090
1091
arg : None | tuple [float , float , float , float ] = None ,
1091
1092
** kwargs
1092
- ) -> Axes :
1093
+ ) -> axes . Axes :
1093
1094
"""
1094
1095
Add an Axes to the current figure and make it the current Axes.
1095
1096
@@ -1175,7 +1176,7 @@ def axes(
1175
1176
return fig .add_axes (arg , ** kwargs )
1176
1177
1177
1178
1178
- def delaxes (ax : Axes | None = None ) -> None :
1179
+ def delaxes (ax : axes . Axes | None = None ) -> None :
1179
1180
"""
1180
1181
Remove an `~.axes.Axes` (defaulting to the current axes) from its figure.
1181
1182
"""
@@ -1413,7 +1414,7 @@ def subplots(
1413
1414
subplot_kw : dict [str , Any ] | None = None ,
1414
1415
gridspec_kw : dict [str , Any ] | None = None ,
1415
1416
** fig_kw
1416
- ) -> tuple [Figure , Axes | np .ndarray | SubplotBase ]:
1417
+ ) -> tuple [Figure , axes . Axes | np .ndarray | SubplotBase ]:
1417
1418
"""
1418
1419
Create a figure and a set of subplots.
1419
1420
@@ -1577,7 +1578,7 @@ def subplot_mosaic(
1577
1578
gridspec_kw : dict [str , Any ] | None = None ,
1578
1579
per_subplot_kw : dict [Any , dict [str , Any ]] | None = None ,
1579
1580
** fig_kw
1580
- ) -> tuple [Figure , dict [Any , Axes ]]:
1581
+ ) -> tuple [Figure , dict [Any , axes . Axes ]]:
1581
1582
"""
1582
1583
Build a layout of Axes based on ASCII art or nested lists.
1583
1584
@@ -1694,7 +1695,7 @@ def subplot2grid(
1694
1695
rowspan : int = 1 , colspan : int = 1 ,
1695
1696
fig : Figure | None = None ,
1696
1697
** kwargs
1697
- ) -> Axes :
1698
+ ) -> axes . Axes :
1698
1699
"""
1699
1700
Create a subplot at a specific location inside a regular grid.
1700
1701
@@ -1756,7 +1757,7 @@ def subplot2grid(
1756
1757
return ax
1757
1758
1758
1759
1759
- def twinx (ax : Axes | None = None ) -> _AxesBase :
1760
+ def twinx (ax : axes . Axes | None = None ) -> _AxesBase :
1760
1761
"""
1761
1762
Make and return a second axes that shares the *x*-axis. The new axes will
1762
1763
overlay *ax* (or the current axes if *ax* is *None*), and its ticks will be
@@ -1772,7 +1773,7 @@ def twinx(ax: Axes | None = None) -> _AxesBase:
1772
1773
return ax1
1773
1774
1774
1775
1775
- def twiny (ax : Axes | None = None ) -> _AxesBase :
1776
+ def twiny (ax : axes . Axes | None = None ) -> _AxesBase :
1776
1777
"""
1777
1778
Make and return a second axes that shares the *y*-axis. The new axes will
1778
1779
overlay *ax* (or the current axes if *ax* is *None*), and its ticks will be
@@ -2227,8 +2228,8 @@ def _get_pyplot_commands() -> list[str]:
2227
2228
@_copy_docstring_and_deprecators (Figure .colorbar )
2228
2229
def colorbar (
2229
2230
mappable : ScalarMappable | None = None ,
2230
- cax : Axes | None = None ,
2231
- ax : Axes | Iterable [Axes ] | None = None ,
2231
+ cax : axes . Axes | None = None ,
2232
+ ax : axes . Axes | Iterable [axes . Axes ] | None = None ,
2232
2233
** kwargs
2233
2234
) -> Colorbar :
2234
2235
if mappable is None :
0 commit comments