123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294 |
- from collections.abc import Callable, Sequence
- from matplotlib.artist import Artist
- from matplotlib.legend import Legend
- from matplotlib.offsetbox import OffsetBox
- from matplotlib.transforms import Transform
- from typing import TypeVar
- from numpy.typing import ArrayLike
- def update_from_first_child(tgt: Artist, src: Artist) -> None: ...
- class HandlerBase:
- def __init__(
- self,
- xpad: float = ...,
- ypad: float = ...,
- update_func: Callable[[Artist, Artist], None] | None = ...,
- ) -> None: ...
- def update_prop(
- self, legend_handle: Artist, orig_handle: Artist, legend: Legend
- ) -> None: ...
- def adjust_drawing_area(
- self,
- legend: Legend,
- orig_handle: Artist,
- xdescent: float,
- ydescent: float,
- width: float,
- height: float,
- fontsize: float,
- ) -> tuple[float, float, float, float]: ...
- def legend_artist(
- self, legend: Legend, orig_handle: Artist, fontsize: float, handlebox: OffsetBox
- ) -> Artist: ...
- def create_artists(
- self,
- legend: Legend,
- orig_handle: Artist,
- xdescent: float,
- ydescent: float,
- width: float,
- height: float,
- fontsize: float,
- trans: Transform,
- ) -> Sequence[Artist]: ...
- class HandlerNpoints(HandlerBase):
- def __init__(
- self, marker_pad: float = ..., numpoints: int | None = ..., **kwargs
- ) -> None: ...
- def get_numpoints(self, legend: Legend) -> int | None: ...
- def get_xdata(
- self,
- legend: Legend,
- xdescent: float,
- ydescent: float,
- width: float,
- height: float,
- fontsize: float,
- ) -> tuple[ArrayLike, ArrayLike]: ...
- class HandlerNpointsYoffsets(HandlerNpoints):
- def __init__(
- self,
- numpoints: int | None = ...,
- yoffsets: Sequence[float] | None = ...,
- **kwargs
- ) -> None: ...
- def get_ydata(
- self,
- legend: Legend,
- xdescent: float,
- ydescent: float,
- width: float,
- height: float,
- fontsize: float,
- ) -> ArrayLike: ...
- class HandlerLine2DCompound(HandlerNpoints):
- def create_artists(
- self,
- legend: Legend,
- orig_handle: Artist,
- xdescent: float,
- ydescent: float,
- width: float,
- height: float,
- fontsize: float,
- trans: Transform,
- ) -> Sequence[Artist]: ...
- class HandlerLine2D(HandlerNpoints):
- def create_artists(
- self,
- legend: Legend,
- orig_handle: Artist,
- xdescent: float,
- ydescent: float,
- width: float,
- height: float,
- fontsize: float,
- trans: Transform,
- ) -> Sequence[Artist]: ...
- class HandlerPatch(HandlerBase):
- def __init__(self, patch_func: Callable | None = ..., **kwargs) -> None: ...
- def create_artists(
- self,
- legend: Legend,
- orig_handle: Artist,
- xdescent: float,
- ydescent: float,
- width: float,
- height: float,
- fontsize: float,
- trans: Transform,
- ) -> Sequence[Artist]: ...
- class HandlerStepPatch(HandlerBase):
- def create_artists(
- self,
- legend: Legend,
- orig_handle: Artist,
- xdescent: float,
- ydescent: float,
- width: float,
- height: float,
- fontsize: float,
- trans: Transform,
- ) -> Sequence[Artist]: ...
- class HandlerLineCollection(HandlerLine2D):
- def get_numpoints(self, legend: Legend) -> int: ...
- def create_artists(
- self,
- legend: Legend,
- orig_handle: Artist,
- xdescent: float,
- ydescent: float,
- width: float,
- height: float,
- fontsize: float,
- trans: Transform,
- ) -> Sequence[Artist]: ...
- _T = TypeVar("_T", bound=Artist)
- class HandlerRegularPolyCollection(HandlerNpointsYoffsets):
- def __init__(
- self,
- yoffsets: Sequence[float] | None = ...,
- sizes: Sequence[float] | None = ...,
- **kwargs
- ) -> None: ...
- def get_numpoints(self, legend: Legend) -> int: ...
- def get_sizes(
- self,
- legend: Legend,
- orig_handle: Artist,
- xdescent: float,
- ydescent: float,
- width: float,
- height: float,
- fontsize: float,
- ) -> Sequence[float]: ...
- def update_prop(
- self, legend_handle, orig_handle: Artist, legend: Legend
- ) -> None: ...
- def create_collection(
- self,
- orig_handle: _T,
- sizes: Sequence[float] | None,
- offsets: Sequence[float] | None,
- offset_transform: Transform,
- ) -> _T: ...
- def create_artists(
- self,
- legend: Legend,
- orig_handle: Artist,
- xdescent: float,
- ydescent: float,
- width: float,
- height: float,
- fontsize: float,
- trans: Transform,
- ) -> Sequence[Artist]: ...
- class HandlerPathCollection(HandlerRegularPolyCollection):
- def create_collection(
- self,
- orig_handle: _T,
- sizes: Sequence[float] | None,
- offsets: Sequence[float] | None,
- offset_transform: Transform,
- ) -> _T: ...
- class HandlerCircleCollection(HandlerRegularPolyCollection):
- def create_collection(
- self,
- orig_handle: _T,
- sizes: Sequence[float] | None,
- offsets: Sequence[float] | None,
- offset_transform: Transform,
- ) -> _T: ...
- class HandlerErrorbar(HandlerLine2D):
- def __init__(
- self,
- xerr_size: float = ...,
- yerr_size: float | None = ...,
- marker_pad: float = ...,
- numpoints: int | None = ...,
- **kwargs
- ) -> None: ...
- def get_err_size(
- self,
- legend: Legend,
- xdescent: float,
- ydescent: float,
- width: float,
- height: float,
- fontsize: float,
- ) -> tuple[float, float]: ...
- def create_artists(
- self,
- legend: Legend,
- orig_handle: Artist,
- xdescent: float,
- ydescent: float,
- width: float,
- height: float,
- fontsize: float,
- trans: Transform,
- ) -> Sequence[Artist]: ...
- class HandlerStem(HandlerNpointsYoffsets):
- def __init__(
- self,
- marker_pad: float = ...,
- numpoints: int | None = ...,
- bottom: float | None = ...,
- yoffsets: Sequence[float] | None = ...,
- **kwargs
- ) -> None: ...
- def get_ydata(
- self,
- legend: Legend,
- xdescent: float,
- ydescent: float,
- width: float,
- height: float,
- fontsize: float,
- ) -> ArrayLike: ...
- def create_artists(
- self,
- legend: Legend,
- orig_handle: Artist,
- xdescent: float,
- ydescent: float,
- width: float,
- height: float,
- fontsize: float,
- trans: Transform,
- ) -> Sequence[Artist]: ...
- class HandlerTuple(HandlerBase):
- def __init__(
- self, ndivide: int | None = ..., pad: float | None = ..., **kwargs
- ) -> None: ...
- def create_artists(
- self,
- legend: Legend,
- orig_handle: Artist,
- xdescent: float,
- ydescent: float,
- width: float,
- height: float,
- fontsize: float,
- trans: Transform,
- ) -> Sequence[Artist]: ...
- class HandlerPolyCollection(HandlerBase):
- def create_artists(
- self,
- legend: Legend,
- orig_handle: Artist,
- xdescent: float,
- ydescent: float,
- width: float,
- height: float,
- fontsize: float,
- trans: Transform,
- ) -> Sequence[Artist]: ...
|