|
| 1 | +from . import cbook as cbook |
| 2 | +from .axes import Axes |
| 3 | +from .axes._base import _AxesBase |
| 4 | +from .backend_bases import RendererBase, MouseEvent |
| 5 | +from .cm import ScalarMappable |
| 6 | +from .colors import BoundaryNorm |
| 7 | +from .figure import Figure, FigureBase |
| 8 | +from .path import Path |
| 9 | +from .patches import Patch |
| 10 | +from .patheffects import AbstractPathEffect |
| 11 | +from .transforms import Bbox, IdentityTransform, Transform, TransformedBbox, TransformedPatchPath, TransformedPath |
| 12 | + |
| 13 | +import numpy as np |
| 14 | + |
| 15 | +from typing import Any, NamedTuple, Callable, TextIO, Type, TypeVar, overload |
| 16 | +from numpy.typing import ArrayLike |
| 17 | + |
| 18 | +def allow_rasterization(draw): ... |
| 19 | + |
| 20 | +class _XYPair(NamedTuple): |
| 21 | + x: ArrayLike |
| 22 | + y: ArrayLike |
| 23 | + |
| 24 | +class _Unset: ... |
| 25 | + |
| 26 | +class Artist: |
| 27 | + zorder: float |
| 28 | + def __init_subclass__(cls): ... |
| 29 | + stale_callback: Callable[[Artist, bool], None] | None |
| 30 | + figure: FigureBase | None |
| 31 | + clipbox: Bbox | None |
| 32 | + def __init__(self) -> None: ... |
| 33 | + def remove(self) -> None: ... |
| 34 | + def have_units(self) -> bool: ... |
| 35 | + # TODO units |
| 36 | + def convert_xunits(self, x): ... |
| 37 | + def convert_yunits(self, y): ... |
| 38 | + @property |
| 39 | + def axes(self) -> _AxesBase | None: ... |
| 40 | + @axes.setter |
| 41 | + def axes(self, new_axes: _AxesBase | None) -> None: ... |
| 42 | + @property |
| 43 | + def stale(self) -> bool: ... |
| 44 | + @stale.setter |
| 45 | + def stale(self, val: bool) -> None: ... |
| 46 | + def get_window_extent(self, renderer: RendererBase | None = ...) -> Bbox: ... |
| 47 | + def get_tightbbox(self, renderer: RendererBase | None = ...) -> Bbox | None: ... |
| 48 | + def add_callback(self, func: Callable[[Artist], Any]) -> int: ... |
| 49 | + def remove_callback(self, oid: int) -> None: ... |
| 50 | + def pchanged(self) -> None: ... |
| 51 | + def is_transform_set(self) -> bool: ... |
| 52 | + def set_transform(self, t: Transform) -> None: ... |
| 53 | + def get_transform(self) -> Transform: ... |
| 54 | + def get_children(self) -> list[Artist]: ... |
| 55 | + # TODO can these dicts be type narrowed? e.g. str keys |
| 56 | + def contains(self, mouseevent: MouseEvent) -> tuple[bool, dict[Any, Any]]: ... |
| 57 | + def pickable(self) -> bool: ... |
| 58 | + def pick(self, mouseevent: MouseEvent) -> None: ... |
| 59 | + def set_picker(self, picker: None | bool | float | Callable[[Artist, MouseEvent], tuple[bool, dict[Any, Any]]]) -> None: ... |
| 60 | + def get_picker(self) -> None | bool | float | Callable[[Artist, MouseEvent], tuple[bool, dict[Any, Any]]]: ... |
| 61 | + def get_url(self) -> str | None: ... |
| 62 | + def set_url(self, url: str | None) -> None: ... |
| 63 | + def get_gid(self) -> str | None: ... |
| 64 | + def set_gid(self, gid: str | None) -> None: ... |
| 65 | + def get_snap(self) -> bool | None: ... |
| 66 | + def set_snap(self, snap: bool | None) -> None: ... |
| 67 | + def get_sketch_params(self) -> tuple[float, float, float] | None: ... |
| 68 | + def set_sketch_params(self, scale: float | None = ..., length: float | None = ..., randomness: float | None = ...) -> None: ... |
| 69 | + def set_path_effects(self, path_effects: AbstractPathEffect) -> None: ... |
| 70 | + def get_path_effects(self) -> AbstractPathEffect: ... |
| 71 | + def get_figure(self) -> Figure | None: ... |
| 72 | + def set_figure(self, fig: Figure) -> None: ... |
| 73 | + def set_clip_box(self, clipbox: Bbox) -> None: ... |
| 74 | + def set_clip_path(self, path: Patch | Path | TransformedPath | TransformedPatchPath | None, transform: Transform | None = ...) -> None: ... |
| 75 | + def get_alpha(self) -> float | None: ... |
| 76 | + def get_visible(self) -> bool: ... |
| 77 | + def get_animated(self) -> bool: ... |
| 78 | + def get_in_layout(self) -> bool: ... |
| 79 | + def get_clip_on(self) -> bool: ... |
| 80 | + def get_clip_box(self) -> Bbox | None: ... |
| 81 | + def get_clip_path(self) -> Patch | Path | TransformedPath | TransformedPatchPath | None: ... |
| 82 | + def get_transformed_clip_path_and_affine(self) -> tuple[None, None] | tuple[Path, Transform]: ... |
| 83 | + def set_clip_on(self, b: bool) -> None: ... |
| 84 | + def get_rasterized(self) -> bool: ... |
| 85 | + def set_rasterized(self, rasterized: bool) -> None: ... |
| 86 | + def get_agg_filter(self): ... |
| 87 | + def set_agg_filter(self, filter_func: Callable[[ArrayLike, float], tuple[np.ndarray, float, float]]) -> None: ... |
| 88 | + def draw(self, renderer: RendererBase) -> None: ... |
| 89 | + def set_alpha(self, alpha: float | None) -> None: ... |
| 90 | + def set_visible(self, b: bool) -> None: ... |
| 91 | + def set_animated(self, b: bool) -> None: ... |
| 92 | + def set_in_layout(self, in_layout: bool) -> None: ... |
| 93 | + def get_label(self) -> object: ... |
| 94 | + def set_label(self, s: object) -> None: ... |
| 95 | + def get_zorder(self) -> float: ... |
| 96 | + def set_zorder(self, level: float) -> None: ... |
| 97 | + @property |
| 98 | + def sticky_edges(self) -> ArrayLike: ... |
| 99 | + def update_from(self, other: Artist) -> None: ... |
| 100 | + def properties(self) -> dict[str, Any]: ... |
| 101 | + def update(self, props: dict[str, Any]) -> Any: ... |
| 102 | + def _internal_update(self, kwargs): ... |
| 103 | + def set(self, **kwargs: Any): ... |
| 104 | + def findobj(self, match: None | Callable[[Artist], bool] | Type[Artist] = ..., include_self: bool = ...) -> list[Artist]: ... |
| 105 | + def get_cursor_data(self, event: MouseEvent) -> Any: ... |
| 106 | + def format_cursor_data(self, data: Any) -> str: ... |
| 107 | + def get_mouseover(self) -> bool: ... |
| 108 | + def set_mouseover(self, mouseover: bool) -> None: ... |
| 109 | + |
| 110 | +class ArtistInspector: |
| 111 | + oorig: Artist | Type[Artist] |
| 112 | + o: Type[Artist] |
| 113 | + aliasd: dict[str, set[str]] |
| 114 | + def __init__(self, o) -> None: ... |
| 115 | + def get_aliases(self) -> dict[str, set[str]]: ... |
| 116 | + def get_valid_values(self, attr: str) -> str | None: ... |
| 117 | + def get_setters(self) -> list[str]: ... |
| 118 | + @staticmethod |
| 119 | + def number_of_parameters(func: Callable) -> int: ... |
| 120 | + @staticmethod |
| 121 | + def is_alias(method: Callable) -> bool: ... |
| 122 | + def aliased_name(self, s: str) -> str: ... |
| 123 | + def aliased_name_rest(self, s: str, target: str) -> str: ... |
| 124 | + @overload |
| 125 | + def pprint_setters(self, prop: None = ..., leadingspace: int = ...) -> list[str]: ... |
| 126 | + @overload |
| 127 | + def pprint_setters(self, prop: str, leadingspace: int = ...) -> str: ... |
| 128 | + @overload |
| 129 | + def pprint_setters_rest(self, prop: None = ..., leadingspace: int = ...) -> list[str]: ... |
| 130 | + @overload |
| 131 | + def pprint_setters_rest(self, prop: str, leadingspace: int = ...) -> str: ... |
| 132 | + def properties(self) -> dict[str, Any]: ... |
| 133 | + def pprint_getters(self) -> list[str]: ... |
| 134 | + |
| 135 | +def getp(obj: Artist, property: str | None = ...) -> Any: ... |
| 136 | +get = getp |
| 137 | + |
| 138 | +def setp(obj: Artist, *args, file: TextIO | None = ..., **kwargs): ... |
| 139 | +def kwdoc(artist: Artist) -> str: ... |
0 commit comments