Skip to content

Commit

Permalink
add some overloads based on literal values (#293)
Browse files Browse the repository at this point in the history
  • Loading branch information
StellaHuang95 authored Jul 18, 2023
1 parent c9e2745 commit 1add739
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions stubs/matplotlib/figure.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ from .transforms import BboxBase
from .axes import Axes
from .artist import Artist, _finalize_rasterization, allow_rasterization
from mpl_toolkits.mplot3d import Axes3D
from .projections.geo import AitoffAxes, HammerAxes, LambertAxes, MollweideAxes
from .projections.polar import PolarAxes

class _AxesStack:
def __init__(self) -> None: ...
Expand Down Expand Up @@ -73,6 +75,16 @@ class FigureBase(Artist):
@overload
def add_subplot(self, *args, projection: Literal['3d'], **kwargs) -> Axes3D: ...
@overload
def add_subplot(self, *args, projection: Literal['aitoff'], **kwargs) -> AitoffAxes: ...
@overload
def add_subplot(self, *args, projection: Literal['hammer'], **kwargs) -> HammerAxes: ...
@overload
def add_subplot(self, *args, projection: Literal['lambert'], **kwargs) -> LambertAxes: ...
@overload
def add_subplot(self, *args, projection: Literal['mollweide'], **kwargs) -> MollweideAxes: ...
@overload
def add_subplot(self, *args, projection: Literal['polar'], **kwargs) -> PolarAxes: ...
@overload
def add_subplot(self, *args, **kwargs) -> Axes: ...
@overload
def subplots(
Expand Down

0 comments on commit 1add739

Please sign in to comment.