diff --git a/stubs/matplotlib/__init__.pyi b/stubs/matplotlib/__init__.pyi deleted file mode 100644 index f62904be..00000000 --- a/stubs/matplotlib/__init__.pyi +++ /dev/null @@ -1,51 +0,0 @@ -import contextlib -from typing import Generator, Literal - -import numpy as np -from packaging.version import parse as parse_version - -from . import _docstring, _version, cbook, colors as colors, rcsetup -from ._typing import * - -class __getattr__: - URL_REGEX = ... - -def set_loglevel(level: Literal["notset", "debug", "info", "warning", "error", "critical"]) -> None: ... - -class ExecutableNotFoundError(FileNotFoundError): ... - -def checkdep_usetex(s) -> bool: ... -def get_configdir() -> str: ... -def get_cachedir() -> str: ... -def get_data_path() -> str: ... -def matplotlib_fname() -> str: ... - -class RcParams(dict): - validate = ... - def __init__(self, *args, **kwargs) -> None: ... - def find_all(self, pattern) -> RcParams: ... - def copy(self) -> RcParams: ... - -def rc_params(fail_on_error: bool = ...) -> RcParams: ... -def is_url(filename: str) -> bool: ... -def rc_params_from_file(fname: str | PathLike, fail_on_error: bool = ..., use_default_template: bool = ...) -> RcParams: ... - -rcParamsDefault: RcParams = ... -rcParams: RcParams = ... -rcParamsOrig: RcParams = ... - -def rc(group, **kwargs) -> None: ... -def rcdefaults() -> None: ... -def rc_file_defaults() -> None: ... -def rc_file(fname: str | PathLike, *, use_default_template: bool = ...) -> None: ... -@contextlib.contextmanager -def rc_context(rc: dict = ..., fname: str | PathLike = ...) -> Generator: ... -def use(backend: str, *, force: bool = True) -> None: ... -def get_backend() -> str: ... -def interactive(b) -> bool: ... -def is_interactive() -> bool: ... - -default_test_modules: list[str] = ... - -def test(verbosity=..., coverage=..., **kwargs): - int: ... diff --git a/stubs/matplotlib/_afm.pyi b/stubs/matplotlib/_afm.pyi deleted file mode 100644 index 68c75d48..00000000 --- a/stubs/matplotlib/_afm.pyi +++ /dev/null @@ -1,33 +0,0 @@ -import numpy as np - -from ._typing import * - -CharMetrics = ... -CompositePart = ... - -class AFM: - def __init__(self, fh) -> None: ... - def get_bbox_char(self, c: str, isord: bool = False): ... - def string_width_height(self, s: str) -> tuple[float, float]: ... - def get_str_bbox_and_descent(self, s: str) -> tuple[float, ...]: ... - def get_str_bbox(self, s: str) -> tuple[float, ...]: ... - def get_name_char(self, c: str, isord: bool = False) -> str: ... - def get_width_char(self, c: str, isord: bool = False) -> float: ... - def get_width_from_char_name(self, name: str) -> float: ... - def get_height_char(self, c: str, isord: bool = False) -> float: ... - def get_kern_dist(self, c1: str, c2: str) -> float: ... - def get_kern_dist_from_name(self, name1: str, name2: str) -> float: ... - def get_fontname(self) -> str: ... - @property - def postscript_name(self) -> str: ... - def get_fullname(self) -> str: ... - def get_familyname(self) -> str: ... - @property - def family_name(self) -> str: ... - def get_weight(self) -> str: ... - def get_angle(self) -> float: ... - def get_capheight(self) -> float: ... - def get_xheight(self) -> float: ... - def get_underline_thickness(self) -> float: ... - def get_horizontal_stem_width(self) -> float | None: ... - def get_vertical_stem_width(self) -> float | None: ... diff --git a/stubs/matplotlib/_api.pyi b/stubs/matplotlib/_api.pyi deleted file mode 100644 index e69de29b..00000000 diff --git a/stubs/matplotlib/_api/__init__.pyi b/stubs/matplotlib/_api/__init__.pyi deleted file mode 100644 index 9d20e293..00000000 --- a/stubs/matplotlib/_api/__init__.pyi +++ /dev/null @@ -1,23 +0,0 @@ -import functools -from typing import Any, Callable, Generator, Iterable, Type - -from .deprecation import MatplotlibDeprecationWarning - -class classproperty: - def __init__(self, fget: Callable, fset: None = ..., fdel: None = ..., doc: None = ...) -> None: ... - def __get__(self, instance, owner): ... - @property - def fget(self): ... - -def check_isinstance(**kwargs) -> None: ... -def check_in_list(_values: Iterable, *, _print_supported_values: bool = True, **kwargs) -> None: ... -def check_shape(**kwargs) -> None: ... -def check_getitem(_mapping: dict, **kwargs): ... -def caching_module_getattr(cls) -> functools._lru_cache_wrapper: ... -def define_aliases(alias_d: dict[str, list[str]], cls: None = ...) -> functools.partial: ... -def select_matching_signature(funcs: list[Callable], *args, **kwargs): ... -def recursive_subclasses(cls) -> Generator: ... -def warn_external( - message: MatplotlibDeprecationWarning | PendingDeprecationWarning | str, - category: None | Type[MatplotlibDeprecationWarning] = ..., -) -> None: ... diff --git a/stubs/matplotlib/_api/deprecation.pyi b/stubs/matplotlib/_api/deprecation.pyi deleted file mode 100644 index 90d2c3fc..00000000 --- a/stubs/matplotlib/_api/deprecation.pyi +++ /dev/null @@ -1,45 +0,0 @@ -import contextlib -from functools import partial -from typing import Callable, Iterator - -class MatplotlibDeprecationWarning(DeprecationWarning): ... - -def warn_deprecated( - since: str, - *, - message: str = ..., - name: str = ..., - alternative: str = ..., - pending: bool = ..., - obj_type: str = ..., - addendum: str = ..., - removal: str = ..., -) -> None: ... -def deprecated( - since: str, - *, - message: str = ..., - name: str = ..., - alternative: str = ..., - pending: bool = ..., - obj_type: str = ..., - addendum: str = ..., - removal: str = ..., -) -> Callable: ... - -class deprecate_privatize_attribute: - def __init__(self, *args, **kwargs) -> None: ... - def __set_name__(self, owner, name) -> None: ... - -DECORATORS: dict = ... - -def rename_parameter(since: str, old: str, new: str, func: None | Callable = ...) -> partial | Callable: ... - -class _deprecated_parameter_class: - def __repr__(self): ... - -def delete_parameter(since: str, name: str, func: None | Callable = ..., **kwargs) -> partial | Callable: ... -def make_keyword_only(since: str, name: str, func: None | Callable = ...) -> partial | Callable: ... -def deprecate_method_override(method, obj, *, allow_empty: bool = ..., **kwargs): ... -@contextlib.contextmanager -def suppress_matplotlib_deprecation_warning() -> Iterator[None]: ... diff --git a/stubs/matplotlib/_c_internal_utils.pyi b/stubs/matplotlib/_c_internal_utils.pyi deleted file mode 100644 index e69de29b..00000000 diff --git a/stubs/matplotlib/_cm.pyi b/stubs/matplotlib/_cm.pyi deleted file mode 100644 index 59bc1d44..00000000 --- a/stubs/matplotlib/_cm.pyi +++ /dev/null @@ -1,8 +0,0 @@ -from functools import partial -from typing import Any - -def cubehelix(gamma: float = 1, s: float = 0.5, r: float = -1.5, h: float = 1) -> dict[str, partial]: ... - -gfunc: dict[int, Any] = ... - -datad: dict[str, tuple[float, ...]] = ... diff --git a/stubs/matplotlib/_color_data.pyi b/stubs/matplotlib/_color_data.pyi deleted file mode 100644 index 8a3eb33a..00000000 --- a/stubs/matplotlib/_color_data.pyi +++ /dev/null @@ -1,4 +0,0 @@ -BASE_COLORS: dict[str, tuple[float, float, float]] = ... -TABLEAU_COLORS: dict[str, str] = ... -XKCD_COLORS: dict[str, str] = ... -CSS4_COLORS: dict[str, str] = ... diff --git a/stubs/matplotlib/_constrained_layout.pyi b/stubs/matplotlib/_constrained_layout.pyi deleted file mode 100644 index ab116325..00000000 --- a/stubs/matplotlib/_constrained_layout.pyi +++ /dev/null @@ -1,43 +0,0 @@ -from matplotlib.backend_bases import RendererBase - -from .axes import Axes -from .figure import Figure -from .transforms import Bbox - -def do_constrained_layout( - fig: Figure, h_pad: float, w_pad: float, hspace: float | None = None, wspace: float | None = None, rect: tuple = ... -) -> dict: ... -def make_layoutgrids(fig, layoutgrids: dict, rect=...) -> dict: ... -def make_layoutgrids_gs(layoutgrids: dict, gs) -> dict: ... -def check_no_collapsed_axes(layoutgrids, fig: Figure) -> bool: ... -def compress_fixed_aspect(layoutgrids, fig: Figure): ... -def get_margin_from_padding(obj, *, w_pad: float = 0, h_pad: float = 0, hspace: float = 0, wspace: float = 0) -> dict: ... -def make_layout_margins( - layoutgrids: dict, - fig: Figure, - renderer: RendererBase, - *, - w_pad: float = 0, - h_pad: float = 0, - hspace: float = 0, - wspace: float = 0, -) -> dict: ... -def make_margin_suptitles( - layoutgrids: dict, fig: Figure, renderer: RendererBase, *, w_pad: float = 0, h_pad: float = 0 -) -> None: ... -def match_submerged_margins(layoutgrids: dict, fig: Figure) -> None: ... -def get_cb_parent_spans(cbax) -> tuple[range, range]: ... -def get_pos_and_bbox(ax: Axes, renderer: RendererBase) -> tuple[Bbox, Bbox]: ... -def reposition_axes( - layoutgrids: dict, - fig: Figure, - renderer: RendererBase, - *, - w_pad: float = 0, - h_pad: float = 0, - hspace: float = 0, - wspace: float = 0, -) -> None: ... -def reposition_colorbar(layoutgrids: dict, cbax: Axes, renderer: RendererBase, *, offset: float | None = None) -> dict: ... -def reset_margins(layoutgrids: dict, fig: Figure) -> None: ... -def colorbar_get_pad(layoutgrids: dict, cax: Axes) -> float: ... diff --git a/stubs/matplotlib/_docstring.pyi b/stubs/matplotlib/_docstring.pyi deleted file mode 100644 index a34a4520..00000000 --- a/stubs/matplotlib/_docstring.pyi +++ /dev/null @@ -1,18 +0,0 @@ -from typing import Callable - -class Substitution: - def __init__(self, *args, **kwargs) -> None: ... - def __call__(self, func: Callable) -> Callable: ... - def update(self, *args, **kwargs) -> None: ... - -class _ArtistKwdocLoader(dict): - def __missing__(self, key: str) -> str: ... - -class _ArtistPropertiesSubstitution(Substitution): - def __init__(self) -> None: ... - def __call__(self, obj: Callable) -> Callable: ... - -def copy(source: Callable) -> Callable: ... - -dedent_interpd: _ArtistPropertiesSubstitution = ... -interpd: _ArtistPropertiesSubstitution = ... diff --git a/stubs/matplotlib/_enums.pyi b/stubs/matplotlib/_enums.pyi deleted file mode 100644 index cc0396f4..00000000 --- a/stubs/matplotlib/_enums.pyi +++ /dev/null @@ -1,18 +0,0 @@ -from enum import Enum - -class _AutoStringNameEnum(Enum): - def __hash__(self) -> int: ... - -class JoinStyle(str, _AutoStringNameEnum): - miter: JoinStyle - round: JoinStyle - bevel: JoinStyle - @staticmethod - def demo() -> None: ... - -class CapStyle(str, _AutoStringNameEnum): - butt: CapStyle - projecting: CapStyle - round: CapStyle - @staticmethod - def demo() -> None: ... diff --git a/stubs/matplotlib/_fontconfig_pattern.pyi b/stubs/matplotlib/_fontconfig_pattern.pyi deleted file mode 100644 index 55ef296e..00000000 --- a/stubs/matplotlib/_fontconfig_pattern.pyi +++ /dev/null @@ -1,16 +0,0 @@ -from .font_manager import FontProperties - -family_punc = ... -family_unescape = ... -family_escape = ... -value_punc = ... -value_unescape = ... -value_escape = ... - -class FontconfigPatternParser: - def __init__(self) -> None: ... - def parse(self, pattern: str) -> dict[str, list[str]]: ... - -parse_fontconfig_pattern = ... - -def generate_fontconfig_pattern(d: FontProperties) -> str: ... diff --git a/stubs/matplotlib/_layoutgrid.pyi b/stubs/matplotlib/_layoutgrid.pyi deleted file mode 100644 index c8b9374a..00000000 --- a/stubs/matplotlib/_layoutgrid.pyi +++ /dev/null @@ -1,55 +0,0 @@ -from typing import Literal - -from .figure import Figure -from .gridspec import SubplotSpec -from .transforms import Bbox - -class LayoutGrid: - def __init__( - self, - parent: LayoutGrid | tuple[int, int, int, int] | None = None, - parent_pos: tuple[range, range] | tuple[int, int] = (0, 0), - parent_inner: bool = False, - name: str = "", - ncols: int = 1, - nrows: int = 1, - h_pad: float | None = None, - w_pad: float | None = None, - width_ratios: None | list[float] = None, - height_ratios: None | list[float] = None, - ) -> None: ... - def __repr__(self) -> str: ... - def reset_margins(self) -> None: ... - def add_constraints(self) -> None: ... - def hard_constraints(self) -> None: ... - def add_child( - self, - child: LayoutGrid, - i: int | range = 0, - j: int | range = 0, - ) -> None: ... - def parent_constraints(self) -> None: ... - def grid_constraints(self) -> None: ... - def edit_margin(self, todo: Literal["left", "right", "bottom", "top"], size: float, cell: int) -> None: ... - def edit_margin_min( - self, - todo: Literal["left", "right", "bottom", "top"], - size: float, - cell: int = 0, - ) -> None: ... - def edit_margins(self, todo: Literal["left", "right", "bottom", "top"], size: float) -> None: ... - def edit_all_margins_min(self, todo: Literal["left", "right", "bottom", "top"], size: float): ... - def edit_outer_margin_mins(self, margin: dict, ss: SubplotSpec) -> None: ... - def get_margins(self, todo, col) -> Bbox: ... - def get_outer_bbox(self, rows=0, cols=0) -> Bbox: ... - def get_inner_bbox(self, rows=0, cols=0) -> Bbox: ... - def get_bbox_for_cb(self, rows=0, cols=0) -> Bbox: ... - def get_left_margin_bbox(self, rows=0, cols=0) -> Bbox: ... - def get_bottom_margin_bbox(self, rows=0, cols=0) -> Bbox: ... - def get_right_margin_bbox(self, rows=0, cols=0) -> Bbox: ... - def get_top_margin_bbox(self, rows=0, cols=0) -> Bbox: ... - def update_variables(self) -> None: ... - -def seq_id() -> str: ... -def print_children(lb) -> None: ... -def plot_children(fig: Figure, lg=None, level: int = 0, printit: bool = False) -> None: ... diff --git a/stubs/matplotlib/_mathtext.pyi b/stubs/matplotlib/_mathtext.pyi deleted file mode 100644 index 70a20aaf..00000000 --- a/stubs/matplotlib/_mathtext.pyi +++ /dev/null @@ -1,255 +0,0 @@ -import enum -import functools -from sre_parse import State -from tkinter.tix import HList -from typing import Literal - -from matplotlib.mathtext import MathtextBackend - -from .font_manager import FontProperties - -def get_unicode_index(symbol: str, math: bool = True) -> int: ... - -class Fonts: - def __init__(self, default_font_prop: FontProperties, mathtext_backend: MathtextBackend) -> None: ... - def get_kern( - self, - font1, - fontclass1, - sym1: str, - fontsize1: float, - font2, - fontclass2: float, - sym2: str, - fontsize2: float, - dpi: float, - ) -> float: ... - def get_metrics(self, font: str, font_class: str, sym: str, fontsize: float, dpi: float) -> object: ... - def render_glyph(self, ox: float, oy: float, font, font_class, sym, fontsize: float, dpi: float) -> None: ... - def render_rect_filled(self, x1: float, y1: float, x2: float, y2: float) -> None: ... - def get_xheight(self, font, fontsize: float, dpi: float) -> float: ... - def get_underline_thickness(self, font, fontsize: float, dpi: float) -> float: ... - def get_used_characters(self): ... - def get_sized_alternatives_for_symbol(self, fontname, sym) -> list[tuple]: ... - -class TruetypeFonts(Fonts): - def __init__(self, default_font_prop, mathtext_backend) -> None: ... - def get_xheight(self, fontname, fontsize: float, dpi: float) -> float: ... - def get_underline_thickness(self, font, fontsize: float, dpi: float) -> float: ... - def get_kern( - self, - font1, - fontclass1, - sym1: str, - fontsize1: float, - font2, - fontclass2: float, - sym2: str, - fontsize2: float, - dpi: float, - ): ... - -class BakomaFonts(TruetypeFonts): - def __init__(self, *args, **kwargs) -> None: ... - def get_sized_alternatives_for_symbol(self, fontname, sym) -> list[tuple]: ... - -class UnicodeFonts(TruetypeFonts): - def __init__(self, *args, **kwargs) -> None: ... - def get_sized_alternatives_for_symbol(self, fontname, sym) -> list[tuple]: ... - -class DejaVuFonts(UnicodeFonts): - def __init__(self, *args, **kwargs) -> None: ... - -class DejaVuSerifFonts(DejaVuFonts): ... -class DejaVuSansFonts(DejaVuFonts): ... - -class StixFonts(UnicodeFonts): - def __init__(self, *args, **kwargs) -> None: ... - @functools.lru_cache() - def get_sized_alternatives_for_symbol(self, fontname, sym) -> list[tuple]: ... - -class StixSansFonts(StixFonts): ... - -SHRINK_FACTOR: float = ... -NUM_SIZE_LEVELS: int = ... - -class FontConstantsBase: - script_space: float = ... - subdrop: float = ... - sup1: float = ... - sub1: float = ... - sub2: float = ... - delta: float = ... - delta_slanted: float = ... - delta_integral: float = ... - -class ComputerModernFontConstants(FontConstantsBase): - script_space: float = ... - subdrop: float = ... - sup1: float = ... - sub1: float = ... - sub2: float = ... - delta: float = ... - delta_slanted: float = ... - delta_integral: float = ... - -class STIXFontConstants(FontConstantsBase): - script_space: float = ... - sup1: float = ... - sub2: float = ... - delta: float = ... - delta_slanted: float = ... - delta_integral: float = ... - -class STIXSansFontConstants(FontConstantsBase): - script_space: float = ... - sup1: float = ... - delta_slanted: float = ... - delta_integral: float = ... - -class DejaVuSerifFontConstants(FontConstantsBase): ... -class DejaVuSansFontConstants(FontConstantsBase): ... - -class Node: - def __init__(self) -> None: ... - def __repr__(self) -> str: ... - def get_kerning(self, next) -> float: ... - def shrink(self) -> None: ... - def render(self, x: float, y: float) -> None: ... - -class Box(Node): - def __init__(self, width: float, height: float, depth: float) -> None: ... - def shrink(self) -> None: ... - def render(self, x1: float, y1: float, x2: float, y2: float) -> None: ... - -class Vbox(Box): - def __init__(self, height: float, depth: float) -> None: ... - -class Hbox(Box): - def __init__(self, width: float) -> None: ... - -class Char(Node): - def __init__(self, c, state) -> None: ... - def __repr__(self) -> str: ... - def is_slanted(self) -> bool: ... - def get_kerning(self, next) -> float: ... - def render(self, x: float, y: float) -> None: ... - def shrink(self) -> None: ... - -class Accent(Char): - def shrink(self) -> None: ... - def render(self, x: float, y: float) -> None: ... - -class List(Box): - def __init__(self, elements) -> None: ... - def __repr__(self) -> str: ... - def shrink(self) -> None: ... - -class Hlist(List): - def __init__( - self, elements, w: float = 0, m: Literal["exactly", "additional"] = "additional", do_kern: bool = True - ) -> None: ... - def kern(self) -> None: ... - def hpack(self, w: float = 0, m: Literal["exactly", "additional"] = "additional") -> None: ... - -class Vlist(List): - def __init__(self, elements, h=0, m=...) -> None: ... - def vpack(self, h: float = ..., m: Literal["exactly", "additional"] = "additional", l: float = ...) -> None: ... - -class Rule(Box): - def __init__(self, width: float, height: float, depth: float, state) -> None: ... - def render(self, x: float, y: float, w: float, h: float) -> None: ... - -class Hrule(Rule): - def __init__(self, state, thickness=...) -> None: ... - -class Vrule(Rule): - def __init__(self, state) -> None: ... - -class Glue(Node): - def __init__(self, glue_type) -> None: ... - def shrink(self): ... - -class HCentered(Hlist): - def __init__(self, elements) -> None: ... - -class VCentered(Vlist): - def __init__(self, elements) -> None: ... - -class Kern(Node): - height: float = ... - depth: float = ... - def __init__(self, width: float) -> None: ... - def __repr__(self) -> str: ... - def shrink(self) -> None: ... - -class AutoHeightChar(Hlist): - def __init__(self, c, height: float, depth: float, state, always=False, factor=None) -> None: ... - -class AutoWidthChar(Hlist): - def __init__(self, c, width: float, state, always=False, char_class=Char) -> None: ... - -def ship(ox, oy, box) -> None: ... -def Error(msg): ... - -class ParserState: - def __init__(self, font_output, font, font_class, fontsize: float, dpi: float) -> None: ... - def copy(self) -> ParserState: ... - @property - def font(self): ... - @font.setter - def font(self, name: str) -> None: ... - def get_current_underline_thickness(self) -> float: ... - -def cmd(expr, args): ... - -class Parser: - class _MathStyle(enum.Enum): - DISPLAYSTYLE = ... - TEXTSTYLE = ... - SCRIPTSTYLE = ... - SCRIPTSCRIPTSTYLE = ... - - def __init__(self) -> None: ... - def parse(self, s, fonts_object, fontsize: float, dpi: float): ... - def get_state(self) -> ParserState: ... - def pop_state(self) -> ParserState: ... - def push_state(self): ... - def main(self, s, loc, toks) -> list[HList]: ... - def math_string(self, s, loc, toks): ... - def math(self, s, loc, toks) -> list[HList]: ... - def non_math(self, s, loc, toks) -> list[HList]: ... - - float_literal = ... - - def space(self, s, loc, toks) -> list[Kern]: ... - def customspace(self, s, loc, toks) -> list[Kern]: ... - def symbol(self, s, loc, toks) -> list: ... - - accentprefixed = ... - def unknown_symbol(self, s, loc, toks): ... - def accent(self, s, loc, toks) -> Vlist: ... - def function(self, s, loc, toks) -> Hlist: ... - def operatorname(self, s, loc, toks) -> HList: ... - def start_group(self, s, loc, toks) -> list: ... - def group(self, s, loc, toks) -> list[Hlist]: ... - def required_group(self, s, loc, toks) -> Hlist: ... - - optional_group = ... - def end_group(self, s, loc, toks) -> list: ... - def font(self, s, loc, toks) -> list: ... - def is_overunder(self, nucleus) -> bool: ... - def is_dropsub(self, nucleus) -> bool: ... - def is_slanted(self, nucleus) -> bool: ... - def is_between_brackets(self, s, loc): ... - def subsuper(self, s, loc, toks): ... - def style_literal(self, s, loc, toks): ... - def genfrac(self, s, loc, toks): ... - def frac(self, s, loc, toks): ... - def dfrac(self, s, loc, toks): ... - def binom(self, s, loc, toks): ... - - overset = ... - def sqrt(self, s, loc, toks) -> list[Hlist]: ... - def overline(self, s, loc, toks) -> list[Hlist]: ... - def auto_delim(self, s, loc, toks) -> Hlist: ... diff --git a/stubs/matplotlib/_mathtext_data.pyi b/stubs/matplotlib/_mathtext_data.pyi deleted file mode 100644 index ad5dfef6..00000000 --- a/stubs/matplotlib/_mathtext_data.pyi +++ /dev/null @@ -1,6 +0,0 @@ -latex_to_bakoma: dict[str, tuple] = ... -type12uni: dict[str, int] = ... -uni2type1: dict[str, int] = ... -tex2uni: dict[str, int] = ... -stix_virtual_fonts: dict[str, dict[str, list[tuple]]] = ... -stix_glyph_fixes: dict[int, int] = ... diff --git a/stubs/matplotlib/_preprocess_data.pyi b/stubs/matplotlib/_preprocess_data.pyi deleted file mode 100644 index e69de29b..00000000 diff --git a/stubs/matplotlib/_pylab_helpers.pyi b/stubs/matplotlib/_pylab_helpers.pyi deleted file mode 100644 index 73d0b974..00000000 --- a/stubs/matplotlib/_pylab_helpers.pyi +++ /dev/null @@ -1,27 +0,0 @@ -from typing import Any, List, OrderedDict - -from .backend_bases import FigureManagerBase -from .figure import Figure - -class Gcf: - figs: OrderedDict = ... - @classmethod - def get_fig_manager(cls, num: int) -> None | FigureManagerBase: ... - @classmethod - def destroy(cls, num: int) -> None: ... - @classmethod - def destroy_fig(cls, fig: Figure) -> None: ... - @classmethod - def destroy_all(cls) -> None: ... - @classmethod - def has_fignum(cls, num: int) -> bool: ... - @classmethod - def get_all_fig_managers(cls) -> list[FigureManagerBase]: ... - @classmethod - def get_num_fig_managers(cls) -> int: ... - @classmethod - def get_active(cls) -> None | FigureManagerBase: ... - @classmethod - def set_active(cls, manager: FigureManagerBase): ... - @classmethod - def draw_all(cls, force: bool = False) -> None: ... diff --git a/stubs/matplotlib/_text_helpers.pyi b/stubs/matplotlib/_text_helpers.pyi deleted file mode 100644 index ea7d46d7..00000000 --- a/stubs/matplotlib/_text_helpers.pyi +++ /dev/null @@ -1,6 +0,0 @@ -from typing import Generator - -LayoutItem = ... - -def warn_on_missing_glyph(codepoint: int) -> None: ... -def layout(string: str, font, *, kern_mode: int = ...) -> Generator: ... diff --git a/stubs/matplotlib/_tight_bbox.pyi b/stubs/matplotlib/_tight_bbox.pyi deleted file mode 100644 index ddf34795..00000000 --- a/stubs/matplotlib/_tight_bbox.pyi +++ /dev/null @@ -1,8 +0,0 @@ -from typing import Callable - -from .figure import Figure - -def adjust_bbox(fig: Figure, bbox_inches, fixed_dpi: float | None = None) -> Callable[[], None]: ... -def process_figure_for_rasterizing( - fig: Figure, bbox_inches_restore, fixed_dpi: float | None = None -) -> tuple[float, Callable[[], None]]: ... diff --git a/stubs/matplotlib/_tight_layout.pyi b/stubs/matplotlib/_tight_layout.pyi deleted file mode 100644 index 663dc10d..00000000 --- a/stubs/matplotlib/_tight_layout.pyi +++ /dev/null @@ -1,31 +0,0 @@ -from typing import Sequence - -from .axes import Axes, SubplotBase -from .backend_bases import RendererBase -from .figure import Figure -from .gridspec import SubplotSpec - -def auto_adjust_subplotpars( - fig, - renderer, - nrows_ncols: tuple[int, int], - num1num2_list: Sequence[tuple[int, int]], - subplot_list: Sequence[SubplotBase], - ax_bbox_list=None, - pad: float = 1.08, - h_pad: float | None = None, - w_pad: float | None = None, - rect: tuple[float, float, float, float] | None = None, -) -> dict | None: ... -def get_renderer(fig: Figure) -> RendererBase: ... -def get_subplotspec_list(axes_list, grid_spec=None) -> list[SubplotSpec]: ... -def get_tight_layout_figure( - fig: Figure, - axes_list: list[Axes], - subplotspec_list: list, - renderer: RendererBase, - pad: float = 1.08, - h_pad: float | None = None, - w_pad: float | None = None, - rect: tuple[float, float, float, float] | None = None, -) -> SubplotSpec | None: ... diff --git a/stubs/matplotlib/_typing.pyi b/stubs/matplotlib/_typing.pyi deleted file mode 100644 index efac7656..00000000 --- a/stubs/matplotlib/_typing.pyi +++ /dev/null @@ -1,26 +0,0 @@ -import decimal -import io - -import numpy.typing -import pandas as pd - -Decimal = decimal.Decimal -PythonScalar = str | int | float | bool - -ArrayLike = numpy.typing.ArrayLike -FileLike = io.IOBase -PathLike = str - -PandasScalar = pd.Period | pd.Timestamp | pd.Timedelta | pd.Interval -Scalar = PythonScalar | PandasScalar - -Color = tuple[float, float, float] | str - -__all__ = [ - "ArrayLike", - "Color", - "Decimal", - "FileLike", - "PathLike", - "Scalar", -] diff --git a/stubs/matplotlib/_version.pyi b/stubs/matplotlib/_version.pyi deleted file mode 100644 index e69de29b..00000000 diff --git a/stubs/matplotlib/afm.pyi b/stubs/matplotlib/afm.pyi deleted file mode 100644 index 072bbfcc..00000000 --- a/stubs/matplotlib/afm.pyi +++ /dev/null @@ -1,60 +0,0 @@ -# COMPLETE - -from typing import BinaryIO, List, Literal, NamedTuple, Optional, Tuple, Union, overload - -class CharMetrics(NamedTuple): - width: float - name: str - bbox: List[int] - -class CompositePart(NamedTuple): - name: str - dx: float - dy: float - -class AFM: - def __init__(self, fh: BinaryIO) -> None: ... - @property - def postscript_name(self) -> str: ... - @property - def family_name(self) -> str: ... - def get_angle(self) -> float: ... - @overload - def get_bbox_char(self, c: str, isord: Literal[False] = ...) -> List[int]: ... - @overload - def get_bbox_char(self, c: int, isord: Literal[True] = ...) -> List[int]: ... - @overload - def get_bbox_char(self, c: Union[str, int], isord: bool = ...) -> List[int]: ... - def get_capheight(self) -> float: ... - def get_familyname(self) -> str: ... - def get_fontname(self) -> str: ... - def get_fullname(self) -> str: ... - @overload - def get_height_char(self, c: str, isord: Literal[False] = ...) -> int: ... - @overload - def get_height_char(self, c: int, isord: Literal[True] = ...) -> int: ... - @overload - def get_height_char(self, c: Union[str, int], isord: bool = ...) -> int: ... - def get_horizontal_stem_width(self) -> float: ... - def get_kern_dist(self, c1: Union[str, int], c2: Union[str, int]) -> float: ... - def get_kern_dist_from_name(self, name1: str, name2: str) -> float: ... - @overload - def get_name_char(self, c: str, isord: Literal[False] = ...) -> str: ... - @overload - def get_name_char(self, c: int, isord: Literal[True] = ...) -> str: ... - @overload - def get_name_char(self, c: Union[str, int], isord: bool = ...) -> str: ... - def get_str_bbox(self, s: Union[str, bytes]) -> Tuple[float, float, float, float, float]: ... - def get_str_bbox_and_descent(self, s: Union[str, bytes]) -> Tuple[float, float, float, float, float]: ... - def get_underline_thickness(self) -> float: ... - def get_vertical_stem_width(self) -> Optional[float]: ... - def get_weight(self) -> str: ... - @overload - def get_width_char(self, c: str, isord: Literal[False] = ...) -> float: ... - @overload - def get_width_char(self, c: int, isord: Literal[True] = ...) -> float: ... - @overload - def get_width_char(self, c: Union[str, int], isord: bool = ...) -> float: ... - def get_width_from_char_name(self, name: str) -> float: ... - def get_xheight(self) -> float: ... - def string_width_height(self, s: str) -> Tuple[float, float]: ... diff --git a/stubs/matplotlib/animation.pyi b/stubs/matplotlib/animation.pyi deleted file mode 100644 index 18869545..00000000 --- a/stubs/matplotlib/animation.pyi +++ /dev/null @@ -1,170 +0,0 @@ -import abc -import contextlib -from itertools import count -from typing import Callable, Generator, Iterable, Iterator, List - -from matplotlib.backend_bases import NonGuiException - -from .figure import Figure - -subprocess_creation_flags = ... - -def adjusted_figsize(w: float, h: float, dpi: float, n: int) -> tuple[float, float]: ... - -class MovieWriterRegistry: - def __init__(self) -> None: ... - def register(self, name: str) -> Callable: ... - def is_available(self, name: str) -> bool: ... - def __iter__(self) -> Generator: ... - def list(self) -> list[MovieWriter]: ... - def __getitem__(self, name) -> MovieWriter: ... - -writers: MovieWriterRegistry = ... - -class AbstractMovieWriter(abc.ABC): - def __init__( - self, - fps: float = 5, - metadata: dict[str, str] | None = None, - codec=None, - bitrate=None, - ) -> None: ... - @abc.abstractmethod - def setup(self, fig: Figure, outfile: str, dpi: float | None = None) -> None: ... - @property - def frame_size(self) -> tuple[int, int]: ... - @abc.abstractmethod - def grab_frame(self, **savefig_kwargs) -> None: ... - @abc.abstractmethod - def finish(self) -> None: ... - @contextlib.contextmanager - def saving(self, fig: Figure, outfile, dpi: float, *args, **kwargs) -> Generator[AbstractMovieWriter, None, None]: ... - -class MovieWriter(AbstractMovieWriter): - frame_format: str - fig: Figure - - supported_formats = ... - def __init__( - self, - fps: int = 5, - codec: str | None = None, - bitrate: int | None = None, - extra_args: list[str] | None = None, - metadata: dict[str, str] | None = None, - ) -> None: ... - def setup(self, fig: Figure, outfile: str, dpi: float | None = None) -> None: ... - def finish(self) -> None: ... - def grab_frame(self, **savefig_kwargs) -> None: ... - @classmethod - def bin_path(cls) -> str: ... - @classmethod - def isAvailable(cls) -> bool: ... - -class FileMovieWriter(MovieWriter): - def __init__(self, *args, **kwargs) -> None: ... - def setup(self, fig: Figure, outfile: str, dpi: float | None = None, frame_prefix: str | None = None): ... - def __del__(self) -> None: ... - @property - def frame_format(self) -> str: ... - @frame_format.setter - def frame_format(self, frame_format: str) -> None: ... - def grab_frame(self, **savefig_kwargs) -> None: ... - def finish(self) -> None: ... - -class PillowWriter(AbstractMovieWriter): - @classmethod - def isAvailable(cls) -> bool: ... - def setup(self, fig: Figure, outfile: str, dpi: float | None = None) -> None: ... - def grab_frame(self, **savefig_kwargs) -> None: ... - def finish(self) -> None: ... - -class FFMpegBase: - @property - def output_args(self) -> list[str]: ... - -class FFMpegWriter(FFMpegBase, MovieWriter): ... - -class FFMpegFileWriter(FFMpegBase, FileMovieWriter): - supported_formats: list[str] = ... - -class ImageMagickBase: - @classmethod - def bin_path(cls) -> str: ... - @classmethod - def isAvailable(cls) -> bool: ... - -class ImageMagickWriter(ImageMagickBase, MovieWriter): - input_names: str = ... - -class ImageMagickFileWriter(ImageMagickBase, FileMovieWriter): - supported_formats: list[str] = ... - input_names: str = ... - -class HTMLWriter(FileMovieWriter): - supported_formats: list[str] = ... - @classmethod - def isAvailable(cls): ... - def __init__( - self, - fps: float = 30, - codec=None, - bitrate: float | None = None, - extra_args=None, - metadata=None, - embed_frames: bool = False, - default_mode: str = "loop", - embed_limit=None, - ) -> None: ... - def setup(self, fig: Figure, outfile: str, dpi: float, frame_dir=None) -> None: ... - def grab_frame(self, **savefig_kwargs) -> None: ... - def finish(self) -> None: ... - -class Animation: - def __init__(self, fig: Figure, event_source: object = None, blit: bool = False) -> None: ... - def __del__(self) -> None: ... - def save( - self, - filename: str, - writer: MovieWriter | str | None = None, - fps: int | None = None, - dpi: float | None = None, - codec: str | None = None, - bitrate: int | None = None, - extra_args: list[str] | None = None, - metadata: dict[str, str] | None = None, - extra_anim: list | None = None, - savefig_kwargs: dict | None = None, - *, - progress_callback: Callable | None = None, - ) -> None: ... - def new_frame_seq(self) -> Iterator: ... - def new_saved_frame_seq(self) -> Iterable: ... - def to_html5_video(self, embed_limit: float | None = None) -> str: ... - def to_jshtml(self, fps: int | None = None, embed_frames: bool = True, default_mode: str | None = None): ... - def pause(self) -> None: ... - def resume(self) -> None: ... - -class TimedAnimation(Animation): - def __init__( - self, fig: Figure, interval: int = 200, repeat_delay: int = 0, repeat: bool = True, event_source=None, *args, **kwargs - ) -> None: ... - -class ArtistAnimation(TimedAnimation): - def __init__(self, fig: Figure, artists: list, *args, **kwargs) -> None: ... - -class FuncAnimation(TimedAnimation): - def __init__( - self, - fig: Figure, - func: Callable, - frames: Callable | Iterable | int | None = None, - init_func: Callable | None = None, - fargs: tuple | None = None, - save_count: int | None = None, - *, - cache_frame_data: bool = True, - **kwargs, - ) -> None: ... - def new_frame_seq(self) -> count: ... - def new_saved_frame_seq(self) -> Iterator: ... diff --git a/stubs/matplotlib/artist.pyi b/stubs/matplotlib/artist.pyi deleted file mode 100644 index a2e16729..00000000 --- a/stubs/matplotlib/artist.pyi +++ /dev/null @@ -1,122 +0,0 @@ -from typing import Any, Callable, NamedTuple - -from ._typing import * -from .axes import Axes -from .backend_bases import MouseEvent, RendererBase -from .figure import Figure -from .patches import Circle, Patch, Rectangle, RegularPolygon -from .path import Path -from .patheffects import AbstractPathEffect -from .transforms import Bbox, Transform - -def allow_rasterization( - draw, -) -> Callable: ... - -class _Unset: - def __repr__(self) -> str: ... - -class Artist: - zorder: int = ... - def __init_subclass__(cls) -> None: ... - def __init__(self) -> None: ... - def __getstate__(self) -> dict: ... - def remove(self) -> None: ... - def have_units(self) -> bool: ... - def convert_xunits(self, x: int) -> int: ... - def convert_yunits(self, y: int) -> int: ... - @property - def axes(self) -> Axes: ... - @axes.setter - def axes(self, new_axes: Axes): ... - @property - def stale(self) -> bool: ... - @stale.setter - def stale(self, val: bool): ... - def get_window_extent(self, renderer: RendererBase = ...) -> Bbox: ... - def get_tightbbox(self, renderer: RendererBase = ...) -> Bbox: ... - def add_callback(self, func: Callable) -> int: ... - def remove_callback(self, oid: int) -> None: ... - def pchanged(self) -> None: ... - def is_transform_set(self) -> bool: ... - def set_transform(self, t: Transform) -> None: ... - def get_transform(self) -> Transform: ... - def get_children(self) -> list[Artist]: ... - def contains(self, mouseevent: MouseEvent): ... - def pickable(self) -> bool: ... - def pick(self, mouseevent: MouseEvent) -> None: ... - def set_picker(self, picker: bool) -> None: ... - def get_picker(self) -> bool: ... - def get_url(self) -> str: ... - def set_url(self, url: str) -> None: ... - def get_gid(self) -> str | None: ... - def set_gid(self, gid: str) -> None: ... - def get_snap(self) -> bool | None: ... - def set_snap(self, snap: bool | None) -> None: ... - def get_sketch_params(self) -> None | tuple[float, float, float]: ... - def set_sketch_params(self, scale: float = ..., length: float = 128, randomness: float = 16) -> None: ... - def set_path_effects(self, path_effects: AbstractPathEffect) -> None: ... - def get_path_effects(self) -> list[AbstractPathEffect]: ... - def get_figure(self) -> Figure: ... - def set_figure(self, fig: Figure) -> None: ... - def set_clip_box(self, clipbox: Bbox) -> None: ... - def set_clip_path( - self, - path: Circle | RegularPolygon | Rectangle, - transform: Transform | None = ..., - ) -> None: ... - def get_alpha(self) -> float: ... - def get_visible(self) -> bool: ... - def get_animated(self) -> bool: ... - def get_in_layout(self) -> bool: ... - def get_clip_on(self) -> bool: ... - def get_clip_box(self) -> Bbox: ... - def get_clip_path(self) -> Path: ... - def get_transformed_clip_path_and_affine(self): ... - def set_clip_on(self, b: bool) -> None: ... - def get_rasterized(self) -> bool: ... - def set_rasterized(self, rasterized: bool) -> None: ... - def get_agg_filter(self) -> None | Callable: ... - def set_agg_filter(self, filter_func: Callable) -> None: ... - def draw(self, renderer: RendererBase) -> None: ... - def set_alpha(self, alpha: float | None) -> None: ... - def set_visible(self, b: bool) -> None: ... - def set_animated(self, b: bool) -> None: ... - def set_in_layout(self, in_layout: bool) -> None: ... - def get_label(self) -> str: ... - def set_label(self, s: str) -> None: ... - def get_zorder(self) -> int: ... - def set_zorder(self, level: float) -> None: ... - @property - def sticky_edges(self) -> NamedTuple: ... - def update_from(self, other: Patch) -> None: ... - def properties(self) -> dict: ... - def update(self, props: dict) -> list: ... - def set(self, **kwargs) -> list | None: ... - def findobj(self, match: Callable = ..., include_self: bool = ...) -> list: ... - def get_cursor_data(self, event: MouseEvent) -> None: ... - def format_cursor_data(self, data) -> str: ... - def get_mouseover(self) -> bool: ... - def set_mouseover(self, mouseover: bool) -> None: ... - mouseover: property = ... - -class ArtistInspector: - def __init__(self, o: Rectangle) -> None: ... - def get_aliases(self) -> dict: ... - def get_valid_values(self, attr: str) -> str: ... - def get_setters(self) -> list[str]: ... - def is_alias(self, o) -> bool: ... - def aliased_name(self, s: str) -> str: ... - def aliased_name_rest(self, s: str, target) -> str: ... - def pprint_setters(self, prop: str | None = ..., leadingspace=...) -> str | list[str]: ... - def pprint_setters_rest(self, prop: str | None = ..., leadingspace=...) -> str | list[str]: ... - def properties(self) -> dict[str, Any]: ... - def pprint_getters(self) -> list[str]: ... - -def getp(obj: Artist, property: str | None = ...): ... - -get = getp - -def setp(obj: Artist | list, *args, file: FileLike = ..., **kwargs) -> list | None: ... -def kwdoc(artist: Artist) -> str: ... -def _finalize_rasterization(draw): ... diff --git a/stubs/matplotlib/axes/__init__.pyi b/stubs/matplotlib/axes/__init__.pyi deleted file mode 100644 index 19897907..00000000 --- a/stubs/matplotlib/axes/__init__.pyi +++ /dev/null @@ -1,2 +0,0 @@ -from ._axes import * -from ._subplots import * diff --git a/stubs/matplotlib/axes/_axes.pyi b/stubs/matplotlib/axes/_axes.pyi deleted file mode 100644 index 3ffbd001..00000000 --- a/stubs/matplotlib/axes/_axes.pyi +++ /dev/null @@ -1,616 +0,0 @@ -import datetime -from re import L -from typing import Callable, Literal, Sequence, overload - -import numpy as np -from matplotlib._typing import * -from matplotlib.artist import Artist -from matplotlib.axes._secondary_axes import SecondaryAxis -from matplotlib.axis import XAxis, YAxis -from matplotlib.backend_tools import Cursors -from matplotlib.collections import ( - BrokenBarHCollection, - Collection, - EventCollection, - LineCollection, - PathCollection, - PolyCollection, - QuadMesh, -) -from matplotlib.colors import Colormap, Normalize -from matplotlib.container import BarContainer, ErrorbarContainer, StemContainer -from matplotlib.contour import QuadContourSet -from matplotlib.figure import Figure -from matplotlib.image import AxesImage, PcolorImage -from matplotlib.legend import Legend -from matplotlib.lines import Line2D -from matplotlib.markers import MarkerStyle -from matplotlib.patches import FancyArrow, Polygon, Rectangle, StepPatch, Wedge -from matplotlib.quiver import Barbs, Quiver -from matplotlib.spines import Spines -from matplotlib.table import table as table_table -from matplotlib.text import Annotation, Text -from matplotlib.ticker import Formatter -from matplotlib.transforms import Bbox, BboxTransformTo, Transform -from matplotlib.tri import ( - tricontour as tri_tricontour, - tricontour as tri_tricontourf, - tripcolor as tri_tripcolor, - triplot as tri_triplot, -) - -from ._base import _AxesBase - -class Axes(_AxesBase): - dataLim: Bbox - viewLim: Bbox - figure: Figure - transAxes: BboxTransformTo - transData: Transform - xaxis: XAxis - yaxis: YAxis - spines: Spines - fmt_xdata: None | Formatter = ... - fmt_ydata: None | Formatter = ... - cursor_to_use: Cursors = ... - - def get_title(self, loc: Literal["center", "left", "right"] = ...) -> str: ... - def set_title( - self, - label: str, - fontdict: dict = ..., - loc: Literal["center", "left", "right"] = ..., - pad: float = ..., - *, - y: float = ..., - **kwargs, - ) -> Text: ... - def get_legend_handles_labels(self, legend_handler_map=...) -> tuple[list, list]: ... - def legend(self, *args, **kwargs) -> Legend: ... - def inset_axes(self, bounds: Sequence[float], *, transform: Transform = ..., zorder: float = ..., **kwargs) -> Axes: ... - def indicate_inset( - self, - bounds: Sequence[float], - inset_ax: Axes = ..., - *, - transform: Transform = ..., - facecolor: Color = ..., - edgecolor: Color = ..., - alpha: float = ..., - zorder: float = ..., - **kwargs, - ) -> Rectangle: ... - def indicate_inset_zoom(self, inset_ax: Axes, **kwargs) -> Rectangle: ... - def secondary_xaxis( - self, location: Literal["top", "bottom", "left", "right"] | float, *, functions=..., **kwargs - ) -> SecondaryAxis: ... - def secondary_yaxis( - self, location: Literal["top", "bottom", "left", "right"] | float, *, functions=..., **kwargs - ) -> SecondaryAxis: ... - def text(self, x: float, y: float, s: str, fontdict: dict = ..., **kwargs) -> Text: ... - def annotate( - self, - text: str, - xy: Sequence[float], - xytext: Sequence[float] = ..., - xycoords: str | Artist | Transform | Callable = ..., - textcoords: str | Artist | Transform | Callable = ..., - arrowprops: dict = ..., - annotation_clip: bool | None = ..., - **kwargs, - ) -> Annotation: ... - def axhline(self, y: float = 0, xmin: float = 0, xmax: float = 1, **kwargs) -> Line2D: ... - def axvline(self, x: float = ..., ymin: float = ..., ymax: float = ..., **kwargs) -> Line2D: ... - def axline(self, xy1: tuple[float, float], xy2: tuple[float, float] = ..., *, slope: float = ..., **kwargs) -> Line2D: ... - def axhspan(self, ymin: float, ymax: float, xmin: float = ..., xmax: float = ..., **kwargs) -> Polygon: ... - def axvspan(self, xmin: float, xmax: float, ymin: float = 0, ymax: float = 1, **kwargs) -> Polygon: ... - def hlines( - self, - y: float | ArrayLike, - xmin: float | ArrayLike, - xmax: float | ArrayLike, - colors: list[Color] = ..., - linestyles: Literal["solid", "dashed", "dashdot", "dotted"] = ..., - label: str = ..., - **kwargs, - ) -> LineCollection: ... - def vlines( - self, - x: float | ArrayLike, - ymin: float | ArrayLike, - ymax: float | ArrayLike, - colors: list[Color] = ..., - linestyles: Literal["solid", "dashed", "dashdot", "dotted"] = ..., - label: str = ..., - **kwargs, - ) -> LineCollection: ... - def eventplot( - self, - positions: ArrayLike | list[ArrayLike], - orientation: Literal["horizontal", "vertical"] = "horizontal", - lineoffsets: float | ArrayLike = 1, - linelengths: float | ArrayLike = 1, - linewidths: float | ArrayLike = ..., - colors: Color | list[Color] = ..., - linestyles: str | tuple | list = ..., - **kwargs, - ) -> list[EventCollection]: ... - def plot(self, *args, scalex=..., scaley=..., data=..., **kwargs) -> list[Line2D]: ... - def plot_date( - self, - x: ArrayLike, - y: ArrayLike, - fmt: str = ..., - tz: datetime.tzinfo = ..., - xdate: bool = ..., - ydate: bool = ..., - **kwargs, - ) -> list[Line2D]: ... - def loglog(self, *args, **kwargs) -> list[Line2D]: ... - def semilogx(self, *args, **kwargs) -> list[Line2D]: ... - def semilogy(self, *args, **kwargs) -> list[Line2D]: ... - def acorr(self, x: ArrayLike, **kwargs): ... - def xcorr( - self, x, y, normed: bool = True, detrend: Callable = ..., usevlines: bool = True, maxlags: int = 10, **kwargs - ) -> tuple[np.ndarray, np.ndarray, bool, int]: ... - def step( - self, x: ArrayLike, y: ArrayLike, *args, where: Literal["pre", "post", "mid"] = ..., data=..., **kwargs - ) -> list[Line2D]: ... - def bar( - self, - x: float | ArrayLike, - height: float | ArrayLike, - width: float | ArrayLike = ..., - bottom: float | ArrayLike = ..., - *, - align: Literal["center", "edge"] = "center", - **kwargs, - ) -> BarContainer: ... - def barh( - self, - y: float | ArrayLike, - width: float | ArrayLike, - height: float | ArrayLike = ..., - left: float | ArrayLike = ..., - *, - align: Literal["center", "edge"] = "center", - **kwargs, - ) -> BarContainer: ... - def bar_label( - self, - container: BarContainer, - labels: ArrayLike = ..., - *, - fmt: str = "%g", - label_type: Literal["edge", "center"] = "edge", - padding: float = 0, - **kwargs, - ) -> list[Text]: ... - def broken_barh( - self, xranges: Sequence[tuple[float, float]], yrange: tuple[float, float], **kwargs - ) -> BrokenBarHCollection: ... - def stem( - self, - *args, - linefmt: str = ..., - markerfmt: str = ..., - basefmt: str = "C3-", - bottom: float = 0, - label: str | None = None, - use_line_collection: bool = True, - orientation: str = "verical", - ) -> StemContainer: ... - def pie( - self, - x, - explode: ArrayLike | None = None, - labels: list | None = None, - colors: ArrayLike | None = None, - autopct: None | str | Callable = None, - pctdistance: float = 0.6, - shadow: bool = False, - labeldistance: float | None = 1.1, - startangle: float = 0, - radius: float = 1, - counterclock: bool = True, - wedgeprops: dict | None = None, - textprops: dict | None = None, - center: tuple[float, float] = (0, 0), - frame: bool = False, - rotatelabels: bool = False, - *, - normalize: bool = True, - ) -> tuple[list[Wedge], list[Text], list[Text]]: ... - def errorbar( - self, - x: float | ArrayLike, - y: float | ArrayLike, - yerr: float | ArrayLike = ..., - xerr: float | ArrayLike = ..., - fmt: str = "", - ecolor: Color | None = None, - elinewidth: float | None = None, - capsize: float = ..., - barsabove: bool = False, - lolims: bool = False, - uplims: bool = False, - xlolims: bool = False, - xuplims: bool = False, - errorevery: int = 1, - capthick: float | None = None, - **kwargs, - ) -> ErrorbarContainer: ... - def boxplot( - self, - x: ArrayLike, - notch: bool = False, - sym: str = ..., - vert: bool = True, - whis: float = 1.5, - positions: ArrayLike = ..., - widths: float | ArrayLike = ..., - patch_artist: bool = False, - bootstrap: int = ..., - usermedians=..., - conf_intervals: ArrayLike = ..., - meanline: bool = False, - showmeans=..., - showcaps=..., - showbox=..., - showfliers=..., - boxprops=..., - labels: Sequence = ..., - flierprops=..., - medianprops=..., - meanprops=..., - capprops=..., - whiskerprops=..., - manage_ticks: bool = True, - autorange: bool = False, - zorder: float = 2, - capwidths=..., - ) -> dict[str, list[Line2D]]: ... - def bxp( - self, - bxpstats: list[dict], - positions: ArrayLike = ..., - widths: float | ArrayLike | None = None, - vert: bool = True, - patch_artist: bool = False, - shownotches: bool = False, - showmeans: bool = False, - showcaps: bool = True, - showbox: bool = True, - showfliers: bool = True, - boxprops: dict = ..., - whiskerprops: dict = ..., - flierprops: dict = ..., - medianprops: dict = ..., - capprops: dict = ..., - meanprops: dict = ..., - meanline: bool = False, - manage_ticks: bool = True, - zorder: float = 2, - capwidths: float | ArrayLike | None = None, - ) -> dict[str, list[Line2D]]: ... - def scatter( - self, - x: float | ArrayLike, - y: float | ArrayLike, - s: float | ArrayLike = ..., - c: ArrayLike | list[Color] | Color = ..., - marker: MarkerStyle = ..., - cmap: str | Colormap = ..., - norm: Normalize | None = None, - vmin: float | None = None, - vmax: float | None = None, - alpha: float | None = None, - linewidths: float | ArrayLike = ..., - *, - edgecolors: Color = ..., - plotnonfinite: bool = False, - **kwargs, - ) -> PathCollection: ... - def hexbin( - self, - x: ArrayLike, - y: ArrayLike, - C: ArrayLike = ..., - gridsize: int = 100, - bins: Literal["log"] | int | Sequence | None = None, - xscale: Literal["linear", "log"] = "linear", - yscale: Literal["linear", "log"] = "linear", - extent: Sequence[float] | None = None, - cmap=..., - norm=..., - vmin=..., - vmax=..., - alpha=..., - linewidths=..., - edgecolors=..., - reduce_C_function=..., - mincnt: int | None = None, - marginals: bool = False, - **kwargs, - ) -> PolyCollection: ... - def arrow(self, x: float, y: float, dx: float, dy: float, **kwargs) -> FancyArrow: ... - def quiverkey(self, Q: Quiver, X: float, Y: float, U: float, label: str, **kwargs): ... - def quiver(self, *args, **kwargs) -> Quiver: ... - def barbs(self, *args, **kwargs) -> Barbs: ... - def fill(self, *args, data=..., **kwargs) -> list[Polygon]: ... - def fill_between( - self, - x, - y1: Scalar, - y2: Scalar = ..., - where: ArrayLike = ..., - interpolate: bool = ..., - step: Literal["pre", "post", "mid"] = ..., - **kwargs, - ) -> PolyCollection: ... - def fill_betweenx( - self, - y, - x1: Scalar, - x2: Scalar = ..., - where: ArrayLike = ..., - step: Literal["pre", "post", "mid"] = ..., - interpolate: bool = ..., - **kwargs, - ) -> PolyCollection: ... - def imshow( - self, - X: ArrayLike, - cmap: str | Colormap = ..., - norm: Normalize = ..., - aspect: Literal["equal", "auto"] | float = ..., - interpolation: str = ..., - alpha: float | ArrayLike = ..., - vmin: float = ..., - vmax: float = ..., - origin: Literal["upper", "lower"] = ..., - extent: Sequence[float] = ..., - *, - interpolation_stage: Literal["data", "rgba"] = ..., - filternorm: bool = True, - filterrad: float = 4, - resample: bool = ..., - url: str = ..., - **kwargs, - ) -> AxesImage: ... - def pcolor( - self, - *args, - shading: Literal["flat", "nearest", "auto"] = ..., - alpha: float | None = None, - norm: Normalize = ..., - cmap: str | Colormap = ..., - vmin: float | None = None, - vmax: float | None = None, - **kwargs, - ) -> Collection: ... - def pcolormesh( - self, - *args, - alpha: float | None = None, - norm: Normalize = ..., - cmap: str | Colormap = ..., - vmin: float | None = None, - vmax: float | None = None, - shading: Literal["flat", "nearest", "gouraud", "auto"] = ..., - antialiased=..., - **kwargs, - ) -> QuadMesh: ... - def pcolorfast( - self, - *args, - alpha: float | None = None, - norm: Normalize = ..., - cmap: str | Colormap = ..., - vmin: float | None = None, - vmax: float | None = None, - **kwargs, - ) -> tuple[AxesImage, PcolorImage, QuadMesh]: ... - def contour(self, *args, **kwargs) -> QuadContourSet: ... - def contourf(self, *args, **kwargs) -> QuadContourSet: ... - def clabel(self, CS, levels: ArrayLike = ..., **kwargs): ... - @overload - def hist( - self, - x: Sequence[ArrayLike], - bins: int | ArrayLike | str = ..., - range: tuple | None = ..., - density: bool = ..., - weights: None = ..., - cumulative: bool | Literal[-1] = ..., - bottom=..., - histtype: Literal["bar", "barstacked", "step", "stepfilled"] = ..., - align: Literal["left", "mid", "right"] = ..., - orientation: Literal["vertical", "horizontal"] = ..., - rwidth: float | None = ..., - log: bool = ..., - color: Color | None = ..., - label: str | None = ..., - stacked: bool = ..., - **kwargs, - ) -> tuple[list[list[float]], list[float], BarContainer | list]: ... - @overload - def hist( - self, - x: ArrayLike, - bins: int | ArrayLike | str = ..., - range: tuple[float, float] | None = None, - density: bool = False, - weights: ArrayLike | None = None, - cumulative: bool | Literal[-1] = False, - bottom: ArrayLike | Scalar | None = None, - histtype: Literal["bar", "barstacked", "step", "stepfilled"] = "bar", - align: Literal["left", "mid", "right"] = "mid", - orientation: Literal["vertical", "horizontal"] = "vertical", - rwidth: float | None = None, - log: bool = False, - color: Color | None = None, - label: str | None = None, - stacked: bool = False, - **kwargs, - ) -> tuple[list[float], list[float], BarContainer | list]: ... - def stairs( - self, - values: ArrayLike, - edges: ArrayLike = ..., - *, - orientation: Literal["vertical", "horizontal"] = "vertical", - baseline: float | ArrayLike | None = 0, - fill: bool = False, - **kwargs, - ) -> StepPatch: ... - def hist2d( - self, - x, - y, - bins: None | int | ArrayLike = ..., - range=..., - density: bool = False, - weights=..., - cmin: float | None = None, - cmax: float | None = None, - **kwargs, - ) -> tuple[np.ndarray, np.ndarray, np.ndarray, tuple[float, float] | None]: ... - def psd( - self, - x: Sequence, - NFFT: int = ..., - Fs: float = ..., - Fc: int = 0, - detrend: Literal["none", "mean", "linear"] | Callable = ..., - window: Callable | np.ndarray = ..., - noverlap: int = 0, - pad_to: int = ..., - sides: Literal["default", "onesided", "twosided"] = ..., - scale_by_freq: bool = ..., - return_line: bool = False, - **kwargs, - ) -> tuple[np.ndarray, np.ndarray, Line2D]: ... - def csd( - self, - x: ArrayLike, - y: ArrayLike, - NFFT: int = ..., - Fs: float = ..., - Fc: int = 0, - detrend: Literal["none", "mean", "linear"] | Callable = ..., - window: Callable | np.ndarray = ..., - noverlap: int = 0, - pad_to: int = ..., - sides: Literal["default", "onesided", "twosided"] = ..., - scale_by_freq: bool = ..., - return_line: bool = False, - **kwargs, - ) -> tuple[np.ndarray, np.ndarray, Line2D]: ... - def magnitude_spectrum( - self, - x: Sequence, - Fs: float = ..., - Fc: int = ..., - window: Callable | np.ndarray = ..., - pad_to: int = ..., - sides: Literal["default", "onesided", "twosided"] = ..., - scale: Literal["default", "linear", "dB"] = "linear", - **kwargs, - ) -> tuple[np.ndarray, np.ndarray, Line2D]: ... - def angle_spectrum( - self, - x: Sequence, - Fs: float = ..., - Fc: int = 0, - window: Callable | np.ndarray = ..., - pad_to: int = ..., - sides: Literal["default", "onesided", "twosided"] = ..., - **kwargs, - ) -> tuple[np.ndarray, np.ndarray, Line2D]: ... - def phase_spectrum( - self, - x: Sequence, - Fs: float = ..., - Fc: int = 0, - window: Callable | np.ndarray = ..., - pad_to: int = ..., - sides: Literal["default", "onesided", "twosided"] = ..., - **kwargs, - ) -> tuple[np.ndarray, np.ndarray, Line2D]: ... - def cohere( - self, - x, - y, - NFFT: int = ..., - Fs: float = ..., - Fc: int = 0, - detrend: Literal["none", "mean", "linear"] | Callable = ..., - window: Callable | np.ndarray = ..., - noverlap: int = 0, - pad_to: int = ..., - sides: Literal["default", "onesided", "twosided"] = ..., - scale_by_freq: bool = ..., - **kwargs, - ) -> tuple[np.ndarray, np.ndarray]: ... - def specgram( - self, - x: Sequence, - NFFT: int = ..., - Fs: float = ..., - Fc: int = 0, - detrend: Literal["none", "mean", "linear"] | Callable = ..., - window: Callable | np.ndarray = ..., - noverlap: int = 128, - cmap: Colormap = ..., - xextent=..., - pad_to: int = ..., - sides: Literal["default", "onesided", "twosided"] = ..., - scale_by_freq: bool = ..., - mode: Literal["default", "psd", "magnitude", "angle", "phase"] = "psd", - scale: Literal["default", "linear", "dB"] = "dB", - vmin=..., - vmax=..., - **kwargs, - ) -> tuple[np.ndarray, np.ndarray, np.ndarray, AxesImage]: ... - def spy( - self, - Z, - precision: float | Literal["present"] = 0, - marker=..., - markersize=..., - aspect: Literal["equal", "auto", None] | float = "equal", - origin: Literal["upper", "lower"] = ..., - **kwargs, - ) -> AxesImage | Line2D: ... - def matshow(self, Z: ArrayLike, **kwargs) -> AxesImage: ... - def violinplot( - self, - dataset: ArrayLike, - positions: ArrayLike = ..., - vert: bool = True, - widths: ArrayLike | float = 0.5, - showmeans: bool = False, - showextrema: bool = True, - showmedians: bool = False, - quantiles: ArrayLike | None = None, - points: int = 100, - bw_method: str | Scalar | Callable | None = None, - ) -> dict[str, Collection]: ... - def violin( - self, - vpstats: list[dict], - positions: ArrayLike = ..., - vert: bool = True, - widths: ArrayLike | float = 0.5, - showmeans: bool = False, - showextrema: bool = True, - showmedians: bool = False, - ) -> dict[str, Collection]: ... - table = table_table - stackplot = ... - streamplot = ... - tricontour = tri_tricontour.tricontour - tricontourf = tri_tricontourf.tricontourf - tripcolor = tri_tripcolor.tripcolor - triplot = tri_triplot.triplot diff --git a/stubs/matplotlib/axes/_base.pyi b/stubs/matplotlib/axes/_base.pyi deleted file mode 100644 index 1ce94841..00000000 --- a/stubs/matplotlib/axes/_base.pyi +++ /dev/null @@ -1,277 +0,0 @@ -from typing import Any, Callable, Collection, Literal, MutableSequence, Sequence, overload - -import numpy as np -from matplotlib._typing import * -from matplotlib.artist import Artist, allow_rasterization -from matplotlib.axis import XAxis, YAxis -from matplotlib.backend_bases import MouseButton, MouseEvent, RendererBase -from matplotlib.cbook import Grouper -from matplotlib.container import Container -from matplotlib.figure import Figure -from matplotlib.image import AxesImage -from matplotlib.legend import Legend -from matplotlib.lines import Line2D -from matplotlib.patches import Patch -from matplotlib.scale import ScaleBase -from matplotlib.table import Table -from matplotlib.transforms import Bbox, BboxBase, Transform, TransformedBbox - -from ._axes import Axes - -class _axis_method_wrapper: - def __init__(self, attr_name, method_name, *, doc_sub=...) -> None: ... - def __set_name__(self, owner, name) -> None: ... - -class _AxesBase(Artist): - name: str = ... - - def __str__(self) -> str: ... - def __init__( - self, - fig: Figure, - rect: Sequence[float], - *, - facecolor: Color | None = None, - frameon: bool = True, - sharex: Axes | None = None, - sharey: Axes | None = None, - label: str = "", - xscale: float | None = None, - yscale: float | None = None, - box_aspect: float | None = None, - **kwargs, - ) -> None: ... - def __getstate__(self) -> dict[str, Any]: ... - def __setstate__(self, state) -> None: ... - def __repr__(self) -> str: ... - def get_window_extent(self, renderer=..., *args, **kwargs) -> TransformedBbox: ... - def set_figure(self, fig: Figure) -> None: ... - @property - def viewLim(self) -> Bbox: ... - def get_xaxis_transform(self, which=...) -> Transform: ... - def get_xaxis_text1_transform(self, pad_points) -> tuple[Transform, str, str]: ... - def get_xaxis_text2_transform(self, pad_points) -> tuple[Transform, str, str]: ... - def get_yaxis_transform(self, which=...) -> Transform: ... - def get_yaxis_text1_transform(self, pad_points) -> tuple[Transform, str, str]: ... - def get_yaxis_text2_transform(self, pad_points) -> tuple[Transform, str, str]: ... - def get_position(self, original: bool = ...) -> Bbox: ... - def set_position( - self, - pos: Sequence[float] | Bbox, - which: Literal["both", "active", "original"] = ..., - ) -> None: ... - def reset_position(self) -> None: ... - def set_axes_locator(self, locator: Callable[[Axes, RendererBase], Bbox]) -> None: ... - def get_axes_locator(self) -> Callable[[Axes, RendererBase], Bbox]: ... - def sharex(self, other: Axes) -> None: ... - def sharey(self, other: Axes) -> None: ... - def clear(self) -> None: ... - @property - def artists(self) -> MutableSequence: ... - @property - def collections(self): ... - @property - def images(self) -> MutableSequence: ... - @property - def lines(self) -> MutableSequence: ... - @property - def patches(self) -> MutableSequence: ... - @property - def tables(self) -> MutableSequence: ... - @property - def texts(self) -> MutableSequence: ... - def cla(self) -> None: ... - def get_facecolor(self) -> Color: ... - def set_facecolor(self, color: Color) -> None: ... - def set_prop_cycle(self, *args, **kwargs) -> None: ... - def get_aspect(self) -> Literal["auto"] | float: ... - def set_aspect( - self, - aspect: Literal["auto", "equal"] | float, - adjustable: None | Literal["box", "datalim"] = ..., - anchor: None | str | Sequence[float] = ..., - share: bool = False, - ) -> None: ... - def get_adjustable(self) -> str: ... - def set_adjustable(self, adjustable: Literal["box", "datalim"], share: bool = False) -> None: ... - def get_box_aspect(self) -> float | None: ... - def set_box_aspect(self, aspect: float | None = ...) -> None: ... - def get_anchor(self) -> str: ... - def set_anchor( - self, - anchor: Literal["C", "SW", "S", "SE", "E", "NE", "N", "NW", "W"], - share: bool = False, - ) -> None: ... - def get_data_ratio(self) -> float: ... - def apply_aspect(self, position=...) -> None: ... - def axis(self, *args, emit: bool = ..., **kwargs) -> tuple[float, float, float, float]: ... - def get_legend(self) -> Legend | None: ... - def get_images(self) -> list[AxesImage]: ... - def get_lines(self) -> list[Line2D]: ... - def get_xaxis(self) -> XAxis: ... - def get_yaxis(self) -> YAxis: ... - get_xgridlines = ... - get_xticklines = ... - get_ygridlines = ... - get_yticklines = ... - def has_data(self) -> bool: ... - def add_artist(self, a: Artist) -> Artist: ... - def add_child_axes(self, ax: _AxesBase) -> Axes: ... - def add_collection(self, collection: Collection, autolim=...) -> Collection: ... - def add_image(self, image: AxesImage) -> AxesImage: ... - def add_line(self, line: Line2D) -> Line2D: ... - def add_patch(self, p: Patch) -> Patch: ... - def add_table(self, tab: Table) -> Table: ... - def add_container(self, container: Container) -> Container: ... - def relim(self, visible_only: bool = ...) -> None: ... - def update_datalim(self, xys, updatex: bool = ..., updatey: bool = ...) -> None: ... - def in_axes(self, mouseevent) -> bool: ... - get_autoscalex_on = ... - get_autoscaley_on = ... - set_autoscalex_on = ... - set_autoscaley_on = ... - def get_autoscale_on(self) -> bool: ... - def set_autoscale_on(self, b: bool) -> None: ... - @property - def use_sticky_edges(self) -> bool: ... - @use_sticky_edges.setter - def use_sticky_edges(self, b: bool) -> None: ... - def set_xmargin(self, m: float) -> None: ... - def set_ymargin(self, m: float) -> None: ... - def margins(self, *margins, x: float = ..., y: float = ..., tight: bool | None = True) -> tuple[float, float]: ... - def set_rasterization_zorder(self, z: float | None) -> None: ... - def get_rasterization_zorder(self) -> float: ... - def autoscale( - self, - enable: bool | None = ..., - axis: Literal["both", "x", "y"] = ..., - tight: bool | None = ..., - ) -> None: ... - def autoscale_view(self, tight: bool | None = ..., scalex: bool = True, scaley: bool = True) -> None: ... - @allow_rasterization - def draw(self, renderer) -> None: ... - def draw_artist(self, a: Artist) -> None: ... - def redraw_in_frame(self) -> None: ... - def get_renderer_cache(self): ... - def get_frame_on(self) -> bool: ... - def set_frame_on(self, b: bool) -> None: ... - def get_axisbelow(self) -> tuple[bool, Literal["line"]]: ... - def set_axisbelow(self, b: bool | Literal["line"]) -> None: ... - def grid( - self, - visible: bool | None = ..., - which: Literal["major", "minor", "both"] = ..., - axis: Literal["both", "x", "y"] = ..., - **kwargs, - ) -> None: ... - def ticklabel_format( - self, - *, - axis: Literal["x", "y", "both"] = ..., - style: Literal["sci", "scientific", "plain"] = ..., - scilimits=..., - useOffset: bool | float = ..., - useLocale: bool = ..., - useMathText: bool = ..., - ) -> None: ... - def locator_params(self, axis: Literal["both", "x", "y"] = ..., tight: bool | None = ..., **kwargs) -> None: ... - def tick_params(self, axis: Literal["x", "y", "both"] = ..., **kwargs) -> None: ... - def set_axis_off(self) -> None: ... - def set_axis_on(self) -> None: ... - def get_xlabel(self) -> str: ... - def set_xlabel( - self, xlabel: str, fontdict=..., labelpad: float = ..., *, loc: Literal["left", "center", "right"] = ..., **kwargs - ) -> None: ... - def invert_xaxis(self) -> None: ... - xaxis_inverted = ... - def get_xbound(self) -> tuple[float, float]: ... - def set_xbound(self, lower: float | None = ..., upper: float | None = ...) -> None: ... - def get_xlim(self) -> tuple[float, float]: ... - @overload - def set_xlim( - self, - left: tuple[float | np.datetime64, float | np.datetime64], - *, - emit: bool = ..., - auto: bool | None = ..., - xmin: float = ..., - xmax: float = ..., - ) -> tuple[float, float]: ... - @overload - def set_xlim( - self, - left: float | np.datetime64 = ..., - right: float | np.datetime64 = ..., - emit: bool = ..., - auto: bool | None = ..., - *, - xmin: float = ..., - xmax: float = ..., - ) -> tuple[float, float]: ... - def get_xscale(self) -> str: ... - def set_xscale(self, value: Literal["linear", "log", "symlog", "logit"] | ScaleBase, **kwargs) -> None: ... - get_xticks = ... - set_xticks = ... - get_xmajorticklabels = ... - get_xminorticklabels = ... - get_xticklabels = ... - set_xticklabels = ... - def get_ylabel(self) -> str: ... - def set_ylabel( - self, ylabel: str, fontdict=..., labelpad: float = ..., *, loc: Literal["bottom", "center", "top"] = ..., **kwargs - ) -> None: ... - def invert_yaxis(self) -> None: ... - yaxis_inverted = ... - def get_ybound(self) -> tuple[float, float]: ... - def set_ybound(self, lower: float | None = ..., upper: float | None = ...) -> None: ... - def get_ylim(self) -> tuple[float, float]: ... - def set_ylim( - self, - bottom: float = ..., - top: float = ..., - emit: bool = ..., - auto: bool | None = ..., - *, - ymin: float = ..., - ymax: float = ..., - ) -> None: ... - get_yscale = ... - def set_yscale(self, value: Literal["linear", "log", "symlog", "logit"] | ScaleBase, **kwargs) -> None: ... - get_yticks = ... - set_yticks = ... - get_ymajorticklabels = ... - get_yminorticklabels = ... - get_yticklabels = ... - set_yticklabels = ... - xaxis_date = ... - yaxis_date = ... - def format_xdata(self, x) -> str: ... - def format_ydata(self, y) -> str: ... - def format_coord(self, x, y) -> str: ... - def minorticks_on(self) -> None: ... - def minorticks_off(self) -> None: ... - def can_zoom(self) -> bool: ... - def can_pan(self) -> bool: ... - def get_navigate(self) -> bool: ... - def set_navigate(self, b: bool) -> None: ... - def get_navigate_mode(self) -> str | None: ... - def set_navigate_mode(self, b: str | None) -> None: ... - def start_pan(self, x: float, y: float, button: MouseButton) -> None: ... - def end_pan(self) -> None: ... - def drag_pan(self, button: MouseButton, key: str | None, x: float, y: float) -> None: ... - def get_children(self) -> list: ... - def contains(self, mouseevent: MouseEvent) -> bool: ... - def contains_point(self, point) -> bool: ... - def get_default_bbox_extra_artists(self) -> list[Artist]: ... - def get_tightbbox( - self, - renderer: RendererBase = ..., - call_axes_locator: bool = ..., - bbox_extra_artists: list | None = ..., - *, - for_layout_only=..., - ) -> BboxBase: ... - def twinx(self) -> Axes: ... - def twiny(self) -> Axes: ... - def get_shared_x_axes(self) -> Grouper: ... - def get_shared_y_axes(self) -> Grouper: ... diff --git a/stubs/matplotlib/axes/_secondary_axes.pyi b/stubs/matplotlib/axes/_secondary_axes.pyi deleted file mode 100644 index a53a232c..00000000 --- a/stubs/matplotlib/axes/_secondary_axes.pyi +++ /dev/null @@ -1,17 +0,0 @@ -from typing import Callable, Literal - -import numpy as np -from matplotlib._typing import * -from matplotlib.axes._base import _AxesBase -from matplotlib.transforms import Transform - -class SecondaryAxis(_AxesBase): - def __init__(self, parent, orientation, location, functions, **kwargs) -> None: ... - def set_alignment(self, align: Literal["top", "bottom", "left", "right"]) -> None: ... - def set_location(self, location: Literal["top", "bottom", "left", "right"] | float) -> None: ... - def apply_aspect(self, position=None) -> None: ... - def set_ticks(self, ticks: list[float], labels: list[str] | None = None, *, minor: bool = False, **kwargs) -> list: ... - def set_functions(self, functions: tuple[Callable, Callable] | Transform) -> None: ... - def draw(self, *args, **kwargs) -> None: ... - def set_aspect(self, *args, **kwargs) -> None: ... - def set_color(self, color: Color) -> None: ... diff --git a/stubs/matplotlib/axes/_subplots.pyi b/stubs/matplotlib/axes/_subplots.pyi deleted file mode 100644 index 93ce600f..00000000 --- a/stubs/matplotlib/axes/_subplots.pyi +++ /dev/null @@ -1,12 +0,0 @@ -from matplotlib.figure import Figure -from matplotlib.gridspec import GridSpec, SubplotSpec - -class SubplotBase: - def __init__(self, fig: Figure, *args, **kwargs) -> None: ... - def get_subplotspec(self) -> SubplotSpec: ... - def set_subplotspec(self, subplotspec: SubplotSpec) -> None: ... - def get_gridspec(self) -> GridSpec: ... - def label_outer(self) -> None: ... - -subplot_class_factory = ... -Subplot = ... diff --git a/stubs/matplotlib/axis.pyi b/stubs/matplotlib/axis.pyi deleted file mode 100644 index abf54235..00000000 --- a/stubs/matplotlib/axis.pyi +++ /dev/null @@ -1,235 +0,0 @@ -import datetime -from datetime import timezone -from typing import Any, Callable, Literal, Type - -import numpy as np -from units.basic_units import BasicUnit - -from .artist import Artist, allow_rasterization -from .axes import Axes -from .backend_bases import MouseEvent, RendererBase -from .backends.backend_mixed import MixedModeRenderer -from .cbook import CallbackRegistry -from .lines import Line2D -from .patches import Patch -from .text import Text -from .ticker import Formatter, Locator -from .transforms import Bbox, Transform - -GRIDLINE_INTERPOLATION_STEPS: int = ... - -class Tick(Artist): - tick1line: Line2D - tick2line: Line2D - gridline: Line2D - label1: Text - label2: Text - - def __init__( - self, - axes, - loc, - *, - size=None, - width=None, - color=None, - tickdir=None, - pad=None, - labelsize=None, - labelcolor=None, - zorder=None, - gridOn=None, - tick1On=True, - tick2On=True, - label1On=True, - label2On=False, - major=True, - labelrotation=0, - grid_color=None, - grid_linestyle=None, - grid_linewidth=None, - grid_alpha=None, - **kwargs, - ) -> None: ... - @property - def label(self) -> Text: ... - def apply_tickdir(self, tickdir) -> None: ... - def get_tickdir(self): ... - def get_tick_padding(self) -> float: ... - def get_children(self) -> list[Line2D | Text]: ... - def set_clip_path(self, clippath: Patch, transform: Transform | None = None) -> None: ... - def get_pad_pixels(self) -> float: ... - def contains(self, mouseevent) -> bool: ... - def set_pad(self, val: float) -> None: ... - def get_pad(self) -> float: ... - def get_loc(self) -> int: ... - @allow_rasterization - def draw(self, renderer) -> None: ... - def set_label1(self, s: str) -> None: ... - set_label = set_label1 - def set_label2(self, s: str) -> None: ... - def set_url(self, url: str) -> None: ... - def get_view_interval(self) -> tuple: ... - def update_position(self, loc) -> None: ... - -class XTick(Tick): - def __init__(self, *args, **kwargs) -> None: ... - def update_position(self, loc: int) -> None: ... - def get_view_interval(self) -> tuple: ... - -class YTick(Tick): - def __init__(self, *args, **kwargs) -> None: ... - def update_position(self, loc: int) -> None: ... - def get_view_interval(self) -> tuple: ... - -class Ticker: - def __init__(self) -> None: ... - @property - def locator(self) -> Locator: ... - @locator.setter - def locator(self, locator: Locator): ... - @property - def formatter(self) -> Formatter: ... - @formatter.setter - def formatter(self, formatter: Formatter): ... - -class _LazyTickList: - def __init__(self, major: bool) -> None: ... - def __get__(self, instance: XAxis | YAxis, cls: Type[XAxis] | Type[YAxis]) -> list[XTick | YTick]: ... - -class Axis(Artist): - isDefault_label: bool - axes: Axes - major: Ticker - minor: Ticker - callbacks: CallbackRegistry - label: Text - labelpad: float = 4 - offsetText: Text - pickradius: float - - OFFSETTEXTPAD: int = ... - - def __str__(self) -> str: ... - def __init__(self, axes: Axes, pickradius: float = ...) -> None: ... - @property - def isDefault_majloc(self) -> bool: ... - @isDefault_majloc.setter - def isDefault_majloc(self, value): ... - @property - def isDefault_majfmt(self) -> bool: ... - @isDefault_majfmt.setter - def isDefault_majfmt(self, value): ... - @property - def isDefault_minloc(self) -> bool: ... - @isDefault_minloc.setter - def isDefault_minloc(self, value): ... - @property - def isDefault_minfmt(self) -> bool: ... - @isDefault_minfmt.setter - def isDefault_minfmt(self, value): ... - - majorTicks: _LazyTickList = ... - minorTicks: _LazyTickList = ... - def get_remove_overlapping_locs(self) -> bool: ... - def set_remove_overlapping_locs(self, val) -> None: ... - - remove_overlapping_locs: property = ... - def set_label_coords(self, x: float, y: float, transform: None = ...) -> None: ... - def get_transform(self) -> Transform: ... - def get_scale(self) -> str: ... - def limit_range_for_scale(self, vmin: float, vmax: float) -> tuple[float, float]: ... - def get_children(self) -> list[Text]: ... - def clear(self) -> None: ... - def reset_ticks(self) -> None: ... - def set_tick_params(self, which: str = "major", reset: bool = False, **kwargs) -> None: ... - def set_clip_path(self, clippath: Patch, transform: Transform | None = ...) -> None: ... - def get_view_interval(self) -> tuple: ... - def set_view_interval(self, vmin, vmax, ignore: bool = ...) -> None: ... - def get_data_interval(self) -> tuple: ... - def set_data_interval(self, vmin, vmax, ignore: bool = ...) -> None: ... - def get_inverted(self) -> bool: ... - def set_inverted(self, inverted: bool) -> None: ... - def set_default_intervals(self) -> None: ... - def get_ticklabel_extents(self, renderer: RendererBase) -> tuple[Bbox, Bbox]: ... - def get_tightbbox(self, renderer: MixedModeRenderer = ..., *, for_layout_only=...) -> Bbox: ... - def get_tick_padding(self) -> int: ... - @allow_rasterization - def draw(self, renderer, *args, **kwargs) -> None: ... - def get_gridlines(self) -> list[Line2D]: ... - def get_label(self) -> Text: ... - def get_offset_text(self) -> Text: ... - def get_pickradius(self) -> int: ... - def get_majorticklabels(self) -> list[Text]: ... - def get_minorticklabels(self) -> list[Text]: ... - def get_ticklabels(self, minor: bool = ..., which: None | Literal["minor", "major", "both"] = ...) -> list[Text]: ... - def get_majorticklines(self) -> list[Line2D]: ... - def get_minorticklines(self) -> list[Line2D]: ... - def get_ticklines(self, minor=...) -> list[Line2D]: ... - def get_majorticklocs(self) -> list: ... - def get_minorticklocs(self) -> list: ... - def get_ticklocs(self, *, minor=...) -> list: ... - def get_ticks_direction(self, minor: bool = False) -> np.ndarray: ... - def get_label_text(self) -> str: ... - def get_major_locator(self) -> Locator: ... - def get_minor_locator( - self, - ) -> Locator: ... - def get_major_formatter( - self, - ) -> Formatter: ... - def get_minor_formatter(self) -> Formatter: ... - def get_major_ticks(self, numticks: None | int = ...) -> list[XTick | YTick]: ... - def get_minor_ticks(self, numticks: None | int = ...) -> list[XTick | YTick]: ... - def grid(self, visible: bool | None = None, which: str = "major", **kwargs) -> None: ... - def update_units(self, data: Any) -> bool: ... - def have_units(self) -> bool: ... - def convert_units(self, x): ... - def set_units(self, u: None | timezone | float | BasicUnit) -> None: ... - def get_units(self) -> None | timezone | float | BasicUnit: ... - def set_label_text(self, label: str, fontdict: dict = ..., **kwargs): ... - def set_major_formatter(self, formatter: Formatter | str | Callable) -> None: ... - def set_minor_formatter(self, formatter: Formatter | str | Callable) -> None: ... - def set_major_locator(self, locator: Locator) -> None: ... - def set_minor_locator(self, locator: Locator) -> None: ... - def set_pickradius(self, pickradius: float) -> None: ... - def set_ticklabels(self, ticklabels: list[str | Text], *, minor: bool = ..., **kwargs) -> list[Text]: ... - def set_ticks( - self, ticks: list[float], labels: None | list[str] = ..., *, minor: bool = ..., **kwargs - ) -> list[XTick | YTick]: ... - def axis_date(self, tz: str | datetime.tzinfo = ...) -> None: ... - def get_tick_space(self) -> int: ... - def get_label_position(self) -> str: ... - def set_label_position(self, position: Literal["top", "bottom"]) -> None: ... - def get_minpos(self): ... - -class XAxis(Axis): - axis_name: str = ... - _tick_class = XTick - def __init__(self, *args, **kwargs) -> None: ... - def contains(self, mouseevent) -> bool: ... - def set_label_position(self, position: Literal["top", "bottom"]) -> None: ... - def get_text_heights(self, renderer) -> tuple[float, float]: ... - def set_ticks_position(self, position: Literal["top", "bottom", "both", "default", "none"]) -> None: ... - def tick_top(self) -> None: ... - def tick_bottom(self) -> None: ... - def get_ticks_position(self) -> str: ... - def get_minpos(self) -> float: ... - def set_default_intervals(self) -> None: ... - def get_tick_space(self) -> int: ... - -class YAxis(Axis): - axis_name = ... - _tick_class = YTick - def __init__(self, *args, **kwargs) -> None: ... - def contains(self, mouseevent: MouseEvent) -> bool: ... - def set_label_position(self, position: Literal["left", "right"]) -> None: ... - def set_offset_position(self, position: Literal["left", "right"]) -> None: ... - def get_text_widths(self, renderer): ... - def set_ticks_position(self, position: Literal["left", "right", "both", "default", "none"]) -> None: ... - def tick_right(self) -> None: ... - def tick_left(self) -> None: ... - def get_ticks_position(self) -> str: ... - def get_minpos(self) -> float: ... - def set_default_intervals(self) -> None: ... - def get_tick_space(self) -> int: ... diff --git a/stubs/matplotlib/backend_bases.pyi b/stubs/matplotlib/backend_bases.pyi deleted file mode 100644 index c7877b5a..00000000 --- a/stubs/matplotlib/backend_bases.pyi +++ /dev/null @@ -1,409 +0,0 @@ -from enum import Enum, IntEnum -from typing import Any, Callable, Literal - -from matplotlib._api import classproperty - -from . import backend_tools as tools -from ._enums import CapStyle, JoinStyle -from ._typing import * -from .artist import Artist -from .axes import Axes -from .backend_managers import ToolManager -from .backend_tools import Cursors -from .figure import Figure -from .font_manager import FontProperties -from .path import Path -from .texmanager import TexManager -from .text import Text -from .transforms import Affine2DBase, Bbox, Transform, TransformedPath -from .widgets import Cursor, LockDraw - -def register_backend(format: str, backend, description: str = ...): ... -def get_registered_canvas_class(format): ... - -class RendererBase: - def __init__(self) -> None: ... - def open_group(self, s, gid=...) -> None: ... - def close_group(self, s) -> None: ... - def draw_path(self, gc, path: Path, transform: Transform, rgbFace=...) -> None: ... - def draw_markers( - self, - gc: GraphicsContextBase, - marker_path: Path, - marker_trans: Transform, - path: Path, - trans: Transform, - rgbFace=..., - ) -> None: ... - def draw_path_collection( - self, - gc: GraphicsContextBase, - master_transform: Transform, - paths, - all_transforms, - offsets, - offsetTrans, - facecolors, - edgecolors, - linewidths, - linestyles, - antialiaseds, - urls, - offset_position, - ) -> None: ... - def draw_quad_mesh( - self, - gc: GraphicsContextBase, - master_transform: Transform, - meshWidth, - meshHeight, - coordinates, - offsets, - offsetTrans, - facecolors, - antialiased, - edgecolors, - ) -> None: ... - def draw_gouraud_triangle( - self, - gc: GraphicsContextBase, - points: ArrayLike, - colors: ArrayLike, - transform: Transform, - ) -> None: ... - def draw_gouraud_triangles( - self, - gc: GraphicsContextBase, - triangles_array: ArrayLike, - colors_array: ArrayLike, - transform: Transform, - ) -> None: ... - def get_image_magnification(self) -> float: ... - def draw_image( - self, - gc: GraphicsContextBase, - x: Scalar, - y: Scalar, - im: ArrayLike, - transform: Affine2DBase = ..., - ) -> None: ... - def option_image_nocomposite(self) -> bool: ... - def option_scale_image(self) -> bool: ... - def draw_tex(self, gc: GraphicsContextBase, x, y, s, prop, angle, *, mtext=...) -> None: ... - def draw_text( - self, - gc: GraphicsContextBase, - x: float, - y: float, - s: str, - prop: FontProperties, - angle: float, - ismath: bool = ..., - mtext: Text = ..., - ) -> None: ... - def get_text_width_height_descent(self, s: str, prop: FontProperties, ismath: bool) -> tuple[float, float, float]: ... - def flipy(self) -> bool: ... - def get_canvas_width_height(self) -> tuple[float, float]: ... - def get_texmanager(self) -> TexManager: ... - def new_gc(self) -> GraphicsContextBase: ... - def points_to_pixels(self, points: float | ArrayLike): ... - def start_rasterizing(self) -> None: ... - def stop_rasterizing(self) -> None: ... - def start_filter(self) -> bool: ... - def stop_filter(self, filter_func) -> None: ... - -class GraphicsContextBase: - def __init__(self) -> None: ... - def copy_properties(self, gc: GraphicsContextBase) -> None: ... - def restore(self) -> None: ... - def get_alpha(self) -> float: ... - def get_antialiased(self) -> bool: ... - def get_capstyle(self) -> CapStyle: ... - def get_clip_rectangle(self) -> Bbox: ... - def get_clip_path(self) -> tuple[Path, Transform]: ... - def get_dashes(self) -> tuple: ... - def get_forced_alpha(self) -> bool: ... - def get_joinstyle(self) -> JoinStyle: ... - def get_linewidth(self) -> float: ... - def get_rgb(self) -> tuple[float, ...]: ... - def get_url(self) -> str | None: ... - def get_gid(self) -> int: ... - def get_snap(self) -> bool | None: ... - def set_alpha(self, alpha: float) -> None: ... - def set_antialiased(self, b: bool) -> None: ... - def set_capstyle(self, cs: CapStyle | Literal["butt", "projecting", "round"]) -> None: ... - def set_clip_rectangle(self, rectangle: Bbox) -> None: ... - def set_clip_path(self, path: TransformedPath | None) -> None: ... - def set_dashes(self, dash_offset: float, dash_list: ArrayLike | None) -> None: ... - def set_foreground(self, fg: Color, isRGBA: bool = ...) -> None: ... - def set_joinstyle(self, js: JoinStyle | Literal["miter", "round", "bevel"]) -> None: ... - def set_linewidth(self, w) -> None: ... - def set_url(self, url: str) -> None: ... - def set_gid(self, id) -> None: ... - def set_snap(self, snap: bool | None) -> None: ... - def set_hatch(self, hatch) -> None: ... - def get_hatch(self): ... - def get_hatch_path(self, density=...) -> Path: ... - def get_hatch_color(self) -> Color: ... - def set_hatch_color(self, hatch_color: Color): ... - def get_hatch_linewidth(self) -> float: ... - def get_sketch_params(self) -> tuple[float, float, float] | None: ... - def set_sketch_params(self, scale: float = ..., length: float = ..., randomness: float = ...) -> None: ... - -class TimerBase: - def __init__(self, interval: int = 1000, callbacks: list[tuple[Callable, tuple, dict]] = ...) -> None: ... - def __del__(self) -> None: ... - def start(self, interval: int = ...) -> None: ... - def stop(self) -> None: ... - @property - def interval(self) -> int: ... - @interval.setter - def interval(self, interval: int) -> None: ... - @property - def single_shot(self) -> bool: ... - @single_shot.setter - def single_shot(self, ss: bool) -> None: ... - def add_callback(self, func: Callable, *args, **kwargs) -> None: ... - def remove_callback(self, func: Callable, *args, **kwargs) -> None: ... - -class Event: - name: str - canvas: FigureCanvasBase - guiEvent: Any - - def __init__(self, name: str, canvas: FigureCanvasBase, guiEvent=...) -> None: ... - -class DrawEvent(Event): - renderer: RendererBase - def __init__(self, name: str, canvas: FigureCanvasBase, renderer: RendererBase) -> None: ... - -class ResizeEvent(Event): - width: int - height: int - - def __init__(self, name: str, canvas: FigureCanvasBase) -> None: ... - -class CloseEvent(Event): ... - -class LocationEvent(Event): - x: int | None - y: int | None - inaxes: Axes | None - xdata: float | None - ydata: float | None - - lastevent = ... - def __init__(self, name: str, canvas: FigureCanvasBase, x: int, y: int, guiEvent=...) -> None: ... - -class MouseButton(IntEnum): - LEFT = 1 - MIDDLE = 2 - RIGHT = 3 - BACK = 8 - FORWARD = 9 - -class MouseEvent(LocationEvent): - button: None | MouseButton | Literal["up", "down"] - key: None | str - step: float - dblclick: bool - - def __init__( - self, - name: str, - canvas: FigureCanvasBase, - x: int, - y: int, - button: None | MouseButton | Literal["up", "down"] = ..., - key: str | None = ..., - step=..., - dblclick: bool = ..., - guiEvent=..., - ) -> None: ... - def __str__(self) -> str: ... - -class PickEvent(Event): - mouseevent: MouseEvent - artist: Artist - - def __init__( - self, name: str, canvas: FigureCanvasBase, mouseevent: MouseEvent, artist: Artist, guiEvent=..., **kwargs - ) -> None: ... - -class KeyEvent(LocationEvent): - key: None | str - - def __init__( - self, - name: str, - canvas: FigureCanvasBase, - key: None | str, - x: int = ..., - y: int = ..., - guiEvent=..., - ) -> None: ... - -class FigureCanvasBase: - required_interactive_framework = ... - manager_class: classproperty = ... - events: list[str] = ... - fixed_dpi = ... - filetypes: dict[str, str] = ... - widgetlock: LockDraw = ... - - @classmethod - def supports_blit(cls) -> bool: ... - def __init__(self, figure: Figure = ...) -> None: ... - - callbacks: property = ... - button_pick_id: property = ... - scroll_pick_id: property = ... - @classmethod - def new_manager(cls, figure: Figure, num) -> FigureManagerBase: ... - def is_saving(self) -> bool: ... - def pick(self, mouseevent: MouseEvent) -> None: ... - def blit(self, bbox=...) -> None: ... - def resize(self, w: int, h: int) -> None: ... - def draw_event(self, renderer: RendererBase) -> None: ... - def resize_event(self) -> None: ... - def close_event(self, guiEvent=...) -> None: ... - def key_press_event(self, key: str | None, guiEvent=...) -> None: ... - def key_release_event(self, key: str | None, guiEvent=...) -> None: ... - def pick_event(self, mouseevent: MouseEvent, artist: Artist, **kwargs) -> None: ... - def scroll_event(self, x: float, y: float, step, guiEvent=...) -> None: ... - def button_press_event(self, x: float, y: float, button, dblclick: bool = ..., guiEvent=...) -> None: ... - def button_release_event(self, x: float, y: float, button, guiEvent=...) -> None: ... - def motion_notify_event(self, x: float, y: float, guiEvent=...) -> None: ... - def leave_notify_event(self, guiEvent=...) -> None: ... - def enter_notify_event(self, guiEvent=..., xy: tuple[float, float] = ...) -> None: ... - def inaxes(self, xy: tuple[float, float]) -> Axes | None: ... - def grab_mouse(self, ax: Axes) -> None: ... - def release_mouse(self, ax: Axes) -> None: ... - def set_cursor(self, cursor: Cursors) -> None: ... - def draw(self, *args, **kwargs) -> None: ... - def draw_idle(self, *args, **kwargs) -> None: ... - @property - def device_pixel_ratio(self) -> float: ... - def get_width_height(self, *, physical: bool = ...) -> tuple[int, int]: ... - @classmethod - def get_supported_filetypes(cls) -> dict: ... - @classmethod - def get_supported_filetypes_grouped(cls) -> dict[str, list[str]]: ... - def print_figure( - self, - filename: str | PathLike | FileLike, - dpi: float = ..., - facecolor: Color | Literal["auto"] = ..., - edgecolor: Color | Literal["auto"] = ..., - orientation: Literal["landscape", "portrait"] = ..., - format: str = ..., - *, - bbox_inches: Literal["tight"] | Bbox = ..., - pad_inches: float = ..., - bbox_extra_artists: list[Artist] = ..., - backend: str = ..., - **kwargs, - ) -> None: ... - @classmethod - def get_default_filetype(cls) -> str: ... - def get_default_filename(self) -> str: ... - def switch_backends(self, FigureCanvasClass) -> None: ... - def mpl_connect(self, s: str, func: Callable) -> int: ... - def mpl_disconnect(self, cid: int): ... - _timer_cls = TimerBase - def new_timer(self, interval: int = ..., callbacks: list[tuple[Callable, tuple, dict]] = ...) -> _timer_cls: ... - def flush_events(self) -> None: ... - def start_event_loop(self, timeout: int = ...) -> None: ... - def stop_event_loop(self) -> None: ... - -def key_press_handler(event: KeyEvent, canvas: FigureCanvasBase = ..., toolbar: NavigationToolbar2 = ...) -> None: ... -def button_press_handler(event, canvas: FigureCanvasBase = ..., toolbar=...) -> None: ... - -class NonGuiException(Exception): ... - -class FigureManagerBase: - canvas: FigureCanvasBase - num: int | str - key_press_handler_id: int - button_press_handler_id: int - - def __init__(self, canvas: FigureCanvasBase, num: int | str) -> None: ... - @classmethod - def create_with_canvas(cls, canvas_class, figure: Figure, num: int | str) -> FigureManagerBase: ... - def show(self) -> None: ... - def destroy(self) -> None: ... - def full_screen_toggle(self) -> None: ... - def resize(self, w: int, h: int) -> None: ... - def get_window_title(self) -> None: ... - def set_window_title(self, title: str) -> None: ... - -cursors = tools.cursors - -class _Mode(str, Enum): - NONE: _Mode - PAN: _Mode - ZOOM: _Mode - def __str__(self) -> str: ... - -class NavigationToolbar2: - toolitems = ... - def __init__(self, canvas: FigureCanvasBase) -> None: ... - def set_message(self, s: str) -> None: ... - def draw_rubberband(self, event, x0, y0, x1, y1) -> None: ... - def remove_rubberband(self) -> None: ... - def home(self, *args) -> None: ... - def back(self, *args) -> None: ... - def forward(self, *args) -> None: ... - def mouse_move(self, event: MouseEvent) -> None: ... - def pan(self, *args) -> None: ... - def press_pan(self, event: MouseEvent) -> None: ... - def drag_pan(self, event: MouseEvent) -> None: ... - def release_pan(self, event: MouseEvent) -> None: ... - def zoom(self, *args) -> None: ... - def press_zoom(self, event: MouseEvent) -> None: ... - def drag_zoom(self, event: MouseEvent) -> None: ... - def release_zoom(self, event: MouseEvent) -> None: ... - def push_current(self) -> None: ... - def configure_subplots(self, *args) -> None: ... - def save_figure(self, *args) -> None: ... - def set_cursor(self, cursor: Cursor) -> None: ... - def update(self) -> None: ... - def set_history_buttons(self) -> None: ... - -class ToolContainerBase: - toolmanager: ToolManager - - def __init__(self, toolmanager: ToolManager) -> None: ... - def add_tool(self, tool: ToolManager, group: str, position: int = ...) -> None: ... - def trigger_tool(self, name: str) -> None: ... - def add_toolitem( - self, - name: str, - group: str, - position: int, - image: str, - description: str, - toggle: bool, - ) -> None: ... - def toggle_toolitem(self, name: str, toggled: bool) -> None: ... - def remove_toolitem(self, name: str) -> None: ... - def set_message(self, s: str) -> None: ... - -class _Backend: - backend_version: str = ... - FigureCanvas = FigureCanvasBase - FigureManager = FigureManagerBase - mainloop = ... - @classmethod - def new_figure_manager(cls, num, *args, **kwargs) -> FigureManagerBase: ... - @classmethod - def new_figure_manager_given_figure(cls, num, figure) -> FigureManagerBase: ... - @classmethod - def draw_if_interactive(cls) -> None: ... - @classmethod - def show(cls, *, block: bool | None = ...) -> None: ... - @classmethod - def export(cls) -> None: ... - -class ShowBase(_Backend): - def __call__(self, block: bool | None = ...) -> None: ... diff --git a/stubs/matplotlib/backend_managers.pyi b/stubs/matplotlib/backend_managers.pyi deleted file mode 100644 index 17e28a9d..00000000 --- a/stubs/matplotlib/backend_managers.pyi +++ /dev/null @@ -1,48 +0,0 @@ -from typing import Callable - -from matplotlib.widgets import LockDraw - -from .backend_bases import Event, FigureCanvasBase -from .backend_tools import ToolBase -from .figure import Figure - -class ToolEvent: - def __init__(self, name: str, sender, tool, data=...) -> None: ... - -class ToolTriggerEvent(ToolEvent): - def __init__(self, name: str, sender, tool, canvasevent=..., data=...) -> None: ... - -class ToolManagerMessageEvent: - def __init__(self, name: str, sender, message) -> None: ... - -class ToolManager: - keypresslock: LockDraw - messagelock: LockDraw - - def __init__(self, figure=...) -> None: ... - @property - def canvas(self) -> FigureCanvasBase: ... - @property - def figure(self) -> Figure: ... - @figure.setter - def figure(self, figure: Figure) -> None: ... - def set_figure(self, figure: Figure, update_tools: bool = ...) -> None: ... - def toolmanager_connect(self, s: str, func: Callable) -> int: ... - def toolmanager_disconnect(self, cid: int): ... - def message_event(self, message, sender=...) -> None: ... - @property - def active_toggle(self) -> dict: ... - def get_tool_keymap(self, name: str) -> list[str]: ... - def update_keymap(self, name: str, key: list[str] | str) -> None: ... - def remove_tool(self, name: str) -> None: ... - def add_tool(self, name: str, tool: type, *args, **kwargs) -> ToolBase: ... - def trigger_tool( - self, - name: str, - sender: object = ..., - canvasevent: Event = ..., - data: object = ..., - ) -> None: ... - @property - def tools(self) -> dict[str, ToolBase]: ... - def get_tool(self, name: str | ToolBase, warn: bool = ...) -> tuple[ToolBase, None]: ... diff --git a/stubs/matplotlib/backend_tools.pyi b/stubs/matplotlib/backend_tools.pyi deleted file mode 100644 index 2ac13667..00000000 --- a/stubs/matplotlib/backend_tools.pyi +++ /dev/null @@ -1,186 +0,0 @@ -import enum -from typing import Any - -from matplotlib.widgets import Cursor - -from .axes import Axes -from .backend_bases import Event, MouseEvent, ToolContainerBase -from .backend_managers import ToolManager -from .figure import Figure - -class Cursors(enum.IntEnum): - POINTER: Cursors - HAND: Cursors - SELECT_REGION: Cursors - MOVE: Cursors - WAIT: Cursors - RESIZE_HORIZONTAL: Cursors - RESIZE_VERTICAL: Cursors - -cursors = Cursors - -class ToolBase: - default_keymap: list[str] | None = None - description: str | None = None - image: str | None = None - def __init__(self, toolmanager: ToolManager, name: str) -> None: ... - - name: property = ... - toolmanager: property = ... - canvas: property = ... - @property - def figure(self) -> Figure: ... - @figure.setter - def figure(self, figure: Figure) -> None: ... - - set_figure = figure.fset - def trigger(self, sender: object, event: Event, data: object = ...) -> None: ... - def destroy(self) -> None: ... - -class ToolToggleBase(ToolBase): - radio_group: str | None = ... - cursor: Cursor | None = ... - default_toggled: bool = ... - def __init__(self, *args, **kwargs) -> None: ... - def trigger(self, sender, event, data=...) -> None: ... - def enable(self, event=...) -> None: ... - def disable(self, event=...) -> None: ... - @property - def toggled(self) -> bool: ... - def set_figure(self, figure: Figure) -> None: ... - -class SetCursorBase(ToolBase): - def __init__(self, *args, **kwargs) -> None: ... - def set_figure(self, figure: Figure) -> None: ... - def set_cursor(self, cursor: Cursor) -> None: ... - -ToolSetCursor = SetCursorBase - -class ToolCursorPosition(ToolBase): - def __init__(self, *args, **kwargs) -> None: ... - def set_figure(self, figure: Figure) -> None: ... - def send_message(self, event: MouseEvent) -> None: ... - -class RubberbandBase(ToolBase): - def trigger(self, sender, event: Event, data) -> None: ... - def draw_rubberband(self, *data) -> None: ... - def remove_rubberband(self) -> None: ... - -class ToolQuit(ToolBase): - description: str = ... - default_keymap: list[str] = ... - def trigger(self, sender: object, event: Event, data: object = ...) -> None: ... - -class ToolQuitAll(ToolBase): - description: str = ... - default_keymap: list[str] = ... - def trigger(self, sender: object, event: Event, data: object = ...) -> None: ... - -class ToolGrid(ToolBase): - description: str = ... - default_keymap: list[str] = ... - def trigger(self, sender: object, event: Event, data: object = ...) -> None: ... - -class ToolMinorGrid(ToolBase): - description: str = ... - default_keymap: list[str] = ... - def trigger(self, sender: object, event: Event, data: object = ...) -> None: ... - -class ToolFullScreen(ToolBase): - description: str = ... - default_keymap: list[str] = ... - def trigger(self, sender: object, event: Event, data: object = ...) -> None: ... - -class AxisScaleBase(ToolToggleBase): - def trigger(self, sender, event: Event, data=...) -> None: ... - def enable(self, event: Event) -> None: ... - def disable(self, event: Event) -> None: ... - -class ToolYScale(AxisScaleBase): - description: str = ... - default_keymap: list[str] = ... - def set_scale(self, ax, scale) -> None: ... - -class ToolXScale(AxisScaleBase): - description: str = ... - default_keymap: list[str] = ... - def set_scale(self, ax: Axes, scale) -> None: ... - -class ToolViewsPositions(ToolBase): - def __init__(self, *args, **kwargs) -> None: ... - def add_figure(self, figure: Figure) -> None: ... - def clear(self, figure: Figure) -> None: ... - def update_view(self) -> None: ... - def push_current(self, figure: Figure = ...) -> None: ... - def update_home_views(self, figur: Figure = ...) -> None: ... - def home(self) -> None: ... - def back(self) -> None: ... - def forward(self) -> None: ... - -class ViewsPositionsBase(ToolBase): - def trigger(self, sender: object, event: Event, data: object = ...) -> None: ... - -class ToolHome(ViewsPositionsBase): - description: str = ... - image: str = ... - default_keymap: list[str] = ... - -class ToolBack(ViewsPositionsBase): - description: str = ... - image: str = ... - default_keymap: list[str] = ... - -class ToolForward(ViewsPositionsBase): - description: str = ... - image: str = ... - default_keymap: list[str] = ... - -class ConfigureSubplotsBase(ToolBase): - description: str = ... - image: str = ... - -class SaveFigureBase(ToolBase): - description: str = ... - image: str = ... - default_keymap: list[str] = ... - -class ZoomPanBase(ToolToggleBase): - def __init__(self, *args) -> None: ... - def enable(self, event: Event) -> None: ... - def disable(self, event: Event) -> None: ... - def trigger(self, sender, event: Event, data=...) -> None: ... - def scroll_zoom(self, event: Event) -> None: ... - -class ToolZoom(ZoomPanBase): - description: str = ... - image: str = ... - default_keymap: list[str] = ... - cursor: Cursors = ... - radio_group: str = ... - def __init__(self, *args) -> None: ... - -class ToolPan(ZoomPanBase): - default_keymap: list[str] = ... - description: str = ... - image: str = ... - cursor: Cursors = ... - radio_group: str = ... - def __init__(self, *args) -> None: ... - -class ToolHelpBase(ToolBase): - description: str = ... - default_keymap: list[str] = ... - image: str = ... - @staticmethod - def format_shortcut(key_sequence) -> None: ... - -class ToolCopyToClipboardBase(ToolBase): - description: str = ... - default_keymap: list[str] = ... - def trigger(self, *args, **kwargs) -> None: ... - -default_tools: dict[str, ToolBase] = ... -default_toolbar_tools: list[list[str | list[str]]] = ... - -def add_tools_to_manager(toolmanager: ToolManager, tools: dict[str, Any] = ...) -> None: ... -def add_tools_to_container(container: ToolContainerBase, tools: list = ...) -> None: ... diff --git a/stubs/matplotlib/backends/__init__.pyi b/stubs/matplotlib/backends/__init__.pyi deleted file mode 100644 index e69de29b..00000000 diff --git a/stubs/matplotlib/backends/_backend_gtk.pyi b/stubs/matplotlib/backends/_backend_gtk.pyi deleted file mode 100644 index 88e1d171..00000000 --- a/stubs/matplotlib/backends/_backend_gtk.pyi +++ /dev/null @@ -1,45 +0,0 @@ -from matplotlib import backend_tools -from matplotlib._typing import * -from matplotlib.backend_bases import FigureCanvasBase, FigureManagerBase, NavigationToolbar2, TimerBase, _Backend -from matplotlib.backend_tools import Cursors - -backend_version = ... - -def mpl_to_gtk_cursor_name(mpl_cursor: Cursors) -> str: ... - -class TimerGTK(TimerBase): - def __init__(self, *args, **kwargs) -> None: ... - -class _FigureManagerGTK(FigureManagerBase): - canvas: FigureCanvasBase - num: int | str - toolbar: Gtk.Toolbar | Gtk.Box - vbox: Gtk.VBox - window: Gtk.Window - - def __init__(self, canvas: FigureCanvasBase, num: int | str) -> None: ... - def destroy(self, *args) -> None: ... - def show(self) -> None: ... - def full_screen_toggle(self) -> None: ... - def get_window_title(self): ... - def set_window_title(self, title) -> None: ... - def resize(self, width, height) -> None: ... - -class _NavigationToolbar2GTK(NavigationToolbar2): - def set_message(self, s) -> None: ... - def draw_rubberband(self, event, x0, y0, x1, y1) -> None: ... - def remove_rubberband(self) -> None: ... - def pan(self, *args) -> None: ... - def zoom(self, *args) -> None: ... - def set_history_buttons(self) -> None: ... - -class RubberbandGTK(backend_tools.RubberbandBase): - def draw_rubberband(self, x0, y0, x1, y1) -> None: ... - def remove_rubberband(self) -> None: ... - -class ConfigureSubplotsGTK(backend_tools.ConfigureSubplotsBase): - def trigger(self, *args) -> None: ... - -class _BackendGTK(_Backend): - @staticmethod - def mainloop() -> None: ... diff --git a/stubs/matplotlib/backends/_backend_pdf_ps.pyi b/stubs/matplotlib/backends/_backend_pdf_ps.pyi deleted file mode 100644 index 7d975775..00000000 --- a/stubs/matplotlib/backends/_backend_pdf_ps.pyi +++ /dev/null @@ -1,20 +0,0 @@ -from io import BytesIO - -from matplotlib._typing import * -from matplotlib.backend_bases import RendererBase -from matplotlib.font_manager import FontProperties - -def get_glyphs_subset(fontfile: str, characters: str) -> BytesIO: ... - -class CharacterTracker: - def __init__(self) -> None: ... - def track(self, font, s: str) -> None: ... - def track_glyph(self, font, glyph) -> None: ... - -class RendererPDFPSBase(RendererBase): - def __init__(self, width, height) -> None: ... - def flipy(self) -> bool: ... - def option_scale_image(self) -> bool: ... - def option_image_nocomposite(self) -> bool: ... - def get_canvas_width_height(self) -> tuple[float, float]: ... - def get_text_width_height_descent(self, s: str, prop: FontProperties, ismath: bool) -> tuple[float, float, float]: ... diff --git a/stubs/matplotlib/backends/_backend_tk.pyi b/stubs/matplotlib/backends/_backend_tk.pyi deleted file mode 100644 index db86de65..00000000 --- a/stubs/matplotlib/backends/_backend_tk.pyi +++ /dev/null @@ -1,112 +0,0 @@ -import tkinter as tk -from typing import Literal, Sequence - -from matplotlib import backend_tools -from matplotlib._api import classproperty -from matplotlib._typing import * -from matplotlib.backend_bases import ( - FigureCanvasBase, - FigureManagerBase, - NavigationToolbar2, - TimerBase, - ToolContainerBase, - _Backend, -) - -backend_version: float = ... -cursord: dict[backend_tools.Cursors, str] = ... - -TK_PHOTO_COMPOSITE_OVERLAY: Literal[0] = ... -TK_PHOTO_COMPOSITE_SET: Literal[1] = ... - -def blit(photoimage, aggimage, offsets: Sequence[int], bbox=...) -> None: ... - -class TimerTk(TimerBase): - def __init__(self, parent, *args, **kwargs) -> None: ... - -class FigureCanvasTk(FigureCanvasBase): - required_interactive_framework: str = ... - manager_class: classproperty = ... - - def __init__(self, figure=..., master=...) -> None: ... - def resize(self, event) -> None: ... - def draw_idle(self) -> None: ... - def get_tk_widget(self) -> tk.Canvas: ... - def motion_notify_event(self, event) -> None: ... - def enter_notify_event(self, event) -> None: ... - def button_press_event(self, event, dblclick=...) -> None: ... - def button_dblclick_event(self, event) -> None: ... - def button_release_event(self, event) -> None: ... - def scroll_event(self, event) -> None: ... - def scroll_event_windows(self, event) -> None: ... - def key_press(self, event) -> None: ... - def key_release(self, event) -> None: ... - def new_timer(self, *args, **kwargs) -> TimerTk: ... - def flush_events(self) -> None: ... - def start_event_loop(self, timeout: int = 0) -> None: ... - def stop_event_loop(self) -> None: ... - def set_cursor(self, cursor) -> None: ... - -class FigureManagerTk(FigureManagerBase): - canvas: FigureCanvasBase - num: int | str - toolbar: tk.Toolbar - window: tk.Window - - def __init__(self, canvas, num, window) -> None: ... - @classmethod - def create_with_canvas(cls, canvas_class, figure, num) -> FigureManagerTk: ... - def resize(self, width: float, height: float) -> None: ... - def show(self) -> None: ... - def destroy(self, *args) -> None: ... - def get_window_title(self): ... - def set_window_title(self, title) -> None: ... - def full_screen_toggle(self) -> None: ... - -class NavigationToolbar2Tk(NavigationToolbar2, tk.Frame): - window: tk.Window = ... - def __init__(self, canvas: FigureCanvasBase, window=..., *, pack_toolbar: bool = True) -> None: ... - def pan(self, *args) -> None: ... - def zoom(self, *args) -> None: ... - def set_message(self, s: str) -> None: ... - def draw_rubberband(self, event, x0: float, y0: float, x1: float, y1: float) -> None: ... - def remove_rubberband(self) -> None: ... - def save_figure(self, *args) -> None: ... - def set_history_buttons(self) -> None: ... - -class ToolTip: - @staticmethod - def createToolTip(widget, text) -> None: ... - def __init__(self, widget) -> None: ... - def showtip(self, text) -> None: ... - def hidetip(self) -> None: ... - -class RubberbandTk(backend_tools.RubberbandBase): - def draw_rubberband(self, x0, y0, x1, y1) -> None: ... - def remove_rubberband(self) -> None: ... - -class SetCursorTk(backend_tools.SetCursorBase): - def set_cursor(self, cursor) -> None: ... - -class ToolbarTk(ToolContainerBase, tk.Frame): - def __init__(self, toolmanager, window=...) -> None: ... - def add_toolitem(self, name, group, position, image_file, description, toggle) -> None: ... - def toggle_toolitem(self, name, toggled) -> None: ... - def remove_toolitem(self, name) -> None: ... - def set_message(self, s) -> None: ... - -class SaveFigureTk(backend_tools.SaveFigureBase): - def trigger(self, *args) -> None: ... - -class ConfigureSubplotsTk(backend_tools.ConfigureSubplotsBase): - def trigger(self, *args) -> None: ... - -class HelpTk(backend_tools.ToolHelpBase): - def trigger(self, *args) -> None: ... - -Toolbar = ToolbarTk - -class _BackendTk(_Backend): - FigureManager = FigureManagerTk - @staticmethod - def mainloop() -> None: ... diff --git a/stubs/matplotlib/backends/backend_agg.pyi b/stubs/matplotlib/backends/backend_agg.pyi deleted file mode 100644 index 07f60b98..00000000 --- a/stubs/matplotlib/backends/backend_agg.pyi +++ /dev/null @@ -1,75 +0,0 @@ -import threading -from io import BufferedWriter, BytesIO -from typing import Any, Tuple - -import numpy as np -from matplotlib._typing import * -from matplotlib.backend_bases import FigureCanvasBase, FigureManagerBase, GraphicsContextBase, RendererBase, _Backend -from matplotlib.font_manager import FontProperties -from matplotlib.text import Text -from matplotlib.transforms import Bbox - -backend_version: str = ... - -def get_hinting_flag() -> int: ... - -class RendererAgg(RendererBase): - lock: threading.RLock = ... - - def __init__(self, width, height, dpi) -> None: ... - def __getstate__(self) -> dict[str, Any]: ... - def __setstate__(self, state) -> None: ... - def draw_path(self, gc, path, transform, rgbFace=...) -> None: ... - def draw_mathtext(self, gc, x, y, s, prop, angle) -> None: ... - def draw_text( - self, - gc: GraphicsContextBase, - x: float, - y: float, - s: str, - prop: FontProperties, - angle: float, - ismath=..., - mtext: Text = ..., - ) -> None: ... - def get_text_width_height_descent(self, s: str, prop: FontProperties, ismath: bool) -> tuple[float, float, float]: ... - def draw_tex(self, gc: GraphicsContextBase, x, y, s: str, prop: FontProperties, angle, *, mtext=...) -> None: ... - def get_canvas_width_height(self) -> tuple[float, float]: ... - def points_to_pixels(self, points: int | float) -> float: ... - def buffer_rgba(self) -> memoryview: ... - def tostring_argb(self) -> bytes: ... - def tostring_rgb(self) -> bytes: ... - def clear(self) -> None: ... - def option_image_nocomposite(self) -> bool: ... - def option_scale_image(self) -> bool: ... - def restore_region(self, region, bbox=..., xy=...) -> None: ... - def start_filter(self) -> None: ... - def stop_filter(self, post_processing) -> None: ... - -class FigureCanvasAgg(FigureCanvasBase): - def copy_from_bbox(self, bbox: Bbox): ... - def restore_region(self, region, bbox: Bbox = ..., xy=...): ... - def draw(self) -> None: ... - def get_renderer(self, cleared: bool = ...) -> RendererAgg: ... - def tostring_rgb(self) -> str: ... - def tostring_argb(self) -> np.str_: ... - def buffer_rgba(self) -> memoryview: ... - def print_raw(self, filename_or_obj) -> None: ... - - print_rgba = print_raw - - def print_png( - self, filename_or_obj: BytesIO | BufferedWriter | str, metadata: dict = ..., pil_kwargs: dict = ... - ) -> None: ... - def print_to_buffer(self) -> tuple[bytes, tuple[int, int]]: ... - def print_jpg(self, filename_or_obj: str | PathLike | FileLike, pil_kwargs: dict = ...) -> None: ... - - print_jpeg = print_jpg - def print_tif(self, filename_or_obj: str | PathLike | FileLike, *, pil_kwargs: dict = ...) -> None: ... - - print_tiff = print_tif - def print_webp(self, filename_or_obj: str | PathLike | FileLike, *, pil_kwargs: dict = ...) -> None: ... - -class _BackendAgg(_Backend): - FigureCanvas = FigureCanvasAgg - FigureManager = FigureManagerBase diff --git a/stubs/matplotlib/backends/backend_cairo.pyi b/stubs/matplotlib/backends/backend_cairo.pyi deleted file mode 100644 index 443a0a4d..00000000 --- a/stubs/matplotlib/backends/backend_cairo.pyi +++ /dev/null @@ -1,51 +0,0 @@ -from matplotlib._enums import CapStyle, JoinStyle -from matplotlib.backend_bases import FigureCanvasBase, FigureManagerBase, GraphicsContextBase, RendererBase, _Backend - -backend_version = ... - -class RendererCairo(RendererBase): - def __init__(self, dpi) -> None: ... - def set_context(self, ctx) -> None: ... - def set_ctx_from_surface(self, surface) -> None: ... - def set_width_height(self, width, height) -> None: ... - def draw_path(self, gc, path, transform, rgbFace=...) -> None: ... - def draw_markers(self, gc, marker_path, marker_trans, path, transform, rgbFace=...) -> None: ... - def draw_image(self, gc, x, y, im) -> None: ... - def draw_text(self, gc, x, y, s, prop, angle, ismath=..., mtext=...) -> None: ... - def get_canvas_width_height(self) -> tuple[float, float]: ... - def get_text_width_height_descent(self, s, prop, ismath) -> tuple[float, float, float]: ... - def new_gc(self) -> GraphicsContextCairo: ... - def points_to_pixels(self, points) -> float: ... - -class GraphicsContextCairo(GraphicsContextBase): - def __init__(self, renderer) -> None: ... - def restore(self) -> None: ... - def set_alpha(self, alpha: float) -> None: ... - def set_antialiased(self, b: bool) -> None: ... - def set_capstyle(self, cs: CapStyle) -> None: ... - def set_clip_rectangle(self, rectangle) -> None: ... - def set_clip_path(self, path) -> None: ... - def set_dashes(self, offset, dashes) -> None: ... - def set_foreground(self, fg, isRGBA: bool | None = None) -> None: ... - def get_rgb(self) -> tuple[float, float, float]: ... - def set_joinstyle(self, js: JoinStyle) -> None: ... - def set_linewidth(self, w: float) -> None: ... - -class _CairoRegion: - def __init__(self, slices, data) -> None: ... - -class FigureCanvasCairo(FigureCanvasBase): - def copy_from_bbox(self, bbox) -> _CairoRegion: ... - def restore_region(self, region) -> None: ... - def print_png(self, fobj) -> None: ... - def print_rgba(self, fobj) -> None: ... - - print_raw = print_rgba - def print_pdf(self, fobj, *, orientation="portrait") -> None: ... - def print_ps(self, fobj, *, orientation="portrait") -> None: ... - def print_svg(self, fobj, *, orientation="portrait") -> None: ... - def print_svgz(self, fobj, *, orientation="portrait") -> None: ... - -class _BackendCairo(_Backend): - FigureCanvas = FigureCanvasCairo - FigureManager = FigureManagerBase diff --git a/stubs/matplotlib/backends/backend_gtk3.pyi b/stubs/matplotlib/backends/backend_gtk3.pyi deleted file mode 100644 index 18ae3b2f..00000000 --- a/stubs/matplotlib/backends/backend_gtk3.pyi +++ /dev/null @@ -1,74 +0,0 @@ -from typing import Callable, Type - -from gi.repository import Gtk -from matplotlib import backend_tools -from matplotlib._api import classproperty -from matplotlib.backend_bases import FigureCanvasBase, ToolContainerBase - -from ._backend_gtk import TimerGTK as TimerGTK3, _BackendGTK, _FigureManagerGTK, _NavigationToolbar2GTK - -class __getattr__: - @property - def cursord(self) -> dict: ... - - icon_filename: Callable = ... - window_icon: Callable = ... - -class FigureCanvasGTK3(Gtk.DrawingArea, FigureCanvasBase): - required_interactive_framework: str = ... - _timer_cls: Type[TimerGTK3] = TimerGTK3 - manager_class: classproperty = ... - event_mask: int = ... - - def __init__(self, figure=...) -> None: ... - def destroy(self) -> None: ... - def set_cursor(self, cursor) -> None: ... - def scroll_event(self, widget, event) -> bool: ... - def button_press_event(self, widget, event) -> bool: ... - def button_release_event(self, widget, event) -> bool: ... - def key_press_event(self, widget, event) -> bool: ... - def key_release_event(self, widget, event) -> bool: ... - def motion_notify_event(self, widget, event) -> bool: ... - def leave_notify_event(self, widget, event) -> None: ... - def enter_notify_event(self, widget, event) -> None: ... - def size_allocate(self, widget, allocation) -> None: ... - def configure_event(self, widget, event) -> bool: ... - def on_draw_event(self, widget, ctx) -> None: ... - def draw(self) -> None: ... - def draw_idle(self) -> None: ... - def flush_events(self) -> None: ... - -class NavigationToolbar2GTK3(_NavigationToolbar2GTK, Gtk.Toolbar): - def __init__(self, canvas, window=...) -> None: ... - - win: Callable = ... - def save_figure(self, *args) -> None: ... - -class ToolbarGTK3(ToolContainerBase, Gtk.Box): - def __init__(self, toolmanager) -> None: ... - def add_toolitem(self, name, group, position, image_file, description, toggle) -> None: ... - def toggle_toolitem(self, name, toggled) -> None: ... - def remove_toolitem(self, name) -> None: ... - def set_message(self, s: str) -> None: ... - -class SaveFigureGTK3(backend_tools.SaveFigureBase): - def trigger(self, *args, **kwargs) -> None: ... - -class SetCursorGTK3(backend_tools.SetCursorBase): - def set_cursor(self, cursor) -> None: ... - -class HelpGTK3(backend_tools.ToolHelpBase): - def trigger(self, *args) -> None: ... - -class ToolCopyToClipboardGTK3(backend_tools.ToolCopyToClipboardBase): - def trigger(self, *args, **kwargs) -> None: ... - -def error_msg_gtk(msg, parent=...) -> None: ... - -Toolbar: Type[ToolbarGTK3] = ToolbarGTK3 - -class FigureManagerGTK3(_FigureManagerGTK): ... - -class _BackendGTK3(_BackendGTK): - FigureCanvas: Type[FigureCanvasGTK3] = FigureCanvasGTK3 - FigureManager: Type[FigureManagerGTK3] = FigureManagerGTK3 diff --git a/stubs/matplotlib/backends/backend_gtk3agg.pyi b/stubs/matplotlib/backends/backend_gtk3agg.pyi deleted file mode 100644 index 7c279de2..00000000 --- a/stubs/matplotlib/backends/backend_gtk3agg.pyi +++ /dev/null @@ -1,13 +0,0 @@ -from . import backend_agg, backend_gtk3 -from .backend_gtk3 import _BackendGTK3 - -class FigureCanvasGTK3Agg(backend_gtk3.FigureCanvasGTK3, backend_agg.FigureCanvasAgg): - def __init__(self, figure) -> None: ... - def on_draw_event(self, widget, ctx) -> bool: ... - def blit(self, bbox=...) -> None: ... - def draw(self) -> None: ... - -class FigureManagerGTK3Agg(backend_gtk3.FigureManagerGTK3): ... - -class _BackendGTK3Cairo(_BackendGTK3): - FigureCanvas = FigureCanvasGTK3Agg diff --git a/stubs/matplotlib/backends/backend_mixed.pyi b/stubs/matplotlib/backends/backend_mixed.pyi deleted file mode 100644 index 21d32d79..00000000 --- a/stubs/matplotlib/backends/backend_mixed.pyi +++ /dev/null @@ -1,18 +0,0 @@ -from matplotlib._typing import Scalar -from matplotlib.backend_bases import RendererBase -from matplotlib.figure import Figure - -class MixedModeRenderer: - def __init__( - self, - figure: Figure, - width: Scalar, - height: Scalar, - dpi: float, - vector_renderer: RendererBase, - raster_renderer_class: RendererBase | None = None, - bbox_inches_restore=None, - ) -> None: ... - def __getattr__(self, attr: str): ... - def start_rasterizing(self) -> None: ... - def stop_rasterizing(self) -> None: ... diff --git a/stubs/matplotlib/backends/backend_pdf.pyi b/stubs/matplotlib/backends/backend_pdf.pyi deleted file mode 100644 index c614b640..00000000 --- a/stubs/matplotlib/backends/backend_pdf.pyi +++ /dev/null @@ -1,265 +0,0 @@ -from enum import Enum -from functools import total_ordering -from io import BytesIO -from typing import Any, Callable, Optional, Set - -import numpy as np -from matplotlib._enums import CapStyle, JoinStyle -from matplotlib._typing import * -from matplotlib.backend_bases import FigureCanvasBase, FigureManagerBase, GraphicsContextBase, _Backend -from matplotlib.figure import Figure -from matplotlib.font_manager import FontProperties -from matplotlib.text import Text -from matplotlib.transforms import Affine2DBase, Transform - -from . import _backend_pdf_ps - -def fill(strings, linelen: int = 75) -> bytes: ... -def pdfRepr(obj) -> bytes: ... - -class Reference: - def __init__(self, id: int) -> None: ... - def __repr__(self) -> str: ... - def pdfRepr(self) -> bytes: ... - def write(self, contentsy, file: "PdfFile") -> None: ... - -@total_ordering -class Name: - def __init__(self, name: bytes | Name | str) -> None: ... - def __repr__(self) -> str: ... - def __str__(self) -> str: ... - def __eq__(self, other) -> bool: ... - def __lt__(self, other) -> bool: ... - def __hash__(self) -> int: ... - @staticmethod - def hexify(match) -> str: ... - def pdfRepr(self) -> bytes: ... - -class Operator: - def __init__(self, op) -> None: ... - def __repr__(self) -> str: ... - def pdfRepr(self) -> bytes: ... - -class Verbatim: - def __init__(self, x: bytes) -> None: ... - def pdfRepr(self) -> bytes: ... - -class Op(Enum): - close_fill_stroke: Op - fill_stroke: Op - fill: Op - closepath: Op - close_stroke: Op - stroke: Op - endpath: Op - begin_text: Op - end_text: Op - curveto: Op - rectangle: Op - lineto: Op - moveto: Op - concat_matrix: Op - use_xobject: Op - setgray_stroke: Op - setgray_nonstroke: Op - setrgb_stroke: Op - setrgb_nonstroke: Op - setcolorspace_stroke: Op - setcolorspace_nonstroke: Op - setcolor_stroke: Op - setcolor_nonstroke: Op - setdash: Op - setlinejoin: Op - setlinecap: Op - setgstate: Op - gsave: Op - grestore: Op - textpos: Op - selectfont: Op - textmatrix: Op - show: Op - showkern: Op - setlinewidth: Op - clip: Op - shading: Op - op: Op - def pdfRepr(self) -> bytes: ... - @classmethod - def paint_path(cls, fill: bool, stroke: bool) -> Op: ... - -class Stream: - def __init__( - self, - id: int, - len: Reference | None, - file: PdfFile, - extra: None | dict[str, Any] = ..., - png: None | dict[str, int] = ..., - ) -> None: ... - def end(self) -> None: ... - def write(self, data: bytes) -> None: ... - -class PdfFile: - def __init__(self, filename: BytesIO | str | PathLike | FileLike, metadata: dict[str, Any] = ...) -> None: ... - def newPage(self, width, height) -> None: ... - def newTextnote(self, text: str, positionRect: list[int] = ...) -> None: ... - def finalize(self) -> None: ... - def close(self) -> None: ... - def write(self, data: bytes) -> None: ... - def output(self, *data) -> None: ... - def beginStream( - self, - id: int, - len: None | Reference, - extra: ( - None - | dict[str, int | Name] - | dict[str, Name | list[int]] - | dict[str, Name | int | Verbatim] - | dict[str, Name | int | Verbatim | Reference] - ) = ..., - png: Optional[dict[str, int]] = ..., - ) -> None: ... - def endStream(self) -> None: ... - def outputStream(self, ref: Reference, data: bytes, *, extra=...) -> None: ... - def fontName(self, fontprop: FontProperties | str) -> Name: ... - def dviFontName(self, dvifont) -> Name: ... - def writeFonts(self) -> None: ... - def createType1Descriptor(self, t1font, fontfile) -> Reference: ... - def embedTTF(self, filename: str, characters: Set[int]) -> Reference: ... - def alphaState(self, alpha: tuple[float, float]) -> Name: ... - def writeExtGSTates(self) -> None: ... - def hatchPattern(self, hatch_style) -> Name: ... - def writeHatches(self) -> None: ... - def addGouraudTriangles(self, points: np.ndarray, colors: np.ndarray) -> tuple[Name, Reference]: ... - def writeGouraudTriangles(self) -> None: ... - def imageObject(self, image) -> Name: ... - def writeImages(self) -> None: ... - def markerObject(self, path, trans, fill, stroke, lw, joinstyle, capstyle) -> Name: ... - def writeMarkers(self) -> None: ... - def pathCollectionObject(self, gc, path, trans, padding, filled, stroked) -> Name: ... - def writePathCollectionTemplates(self) -> None: ... - @staticmethod - def pathOperations(path, transform, clip=..., simplify=..., sketch=...) -> list[Verbatim]: ... - def writePath(self, path, transform, clip=..., sketch=...) -> None: ... - def reserveObject(self, name: str = ...) -> Reference: ... - def recordXref(self, id: int) -> None: ... - def writeObject(self, object: Reference, contents: Any) -> None: ... - def writeXref(self) -> None: ... - def writeInfoDict(self) -> None: ... - def writeTrailer(self) -> None: ... - -class RendererPdf(_backend_pdf_ps.RendererPDFPSBase): - def __init__(self, file, image_dpi, height, width) -> None: ... - def finalize(self) -> None: ... - def check_gc( - self, - gc: "GraphicsContextPdf", - fillcolor: None | tuple[float, float, float, float] = ..., - ) -> None: ... - def get_image_magnification(self) -> float: ... - def draw_image( - self, - gc: GraphicsContextBase, - x: Scalar, - y: Scalar, - im, - transform: Affine2DBase = ..., - ) -> None: ... - def draw_path(self, gc, path, transform, rgbFace=...) -> None: ... - def draw_path_collection( - self, - gc, - master_transform, - paths, - all_transforms, - offsets, - offsetTrans, - facecolors, - edgecolors, - linewidths, - linestyles, - antialiaseds, - urls, - offset_position, - ) -> None: ... - def draw_markers( - self, - gc: GraphicsContextBase, - marker_path, - marker_trans: Transform, - path, - trans: Transform, - rgbFace=..., - ) -> None: ... - def draw_gouraud_triangle(self, gc: GraphicsContextBase, points, colors, trans) -> None: ... - def draw_gouraud_triangles(self, gc, points, colors, trans) -> None: ... - def draw_mathtext(self, gc, x, y, s, prop, angle) -> None: ... - def draw_tex(self, gc, x, y, s, prop, angle, *, mtext=...) -> None: ... - def encode_string(self, s: str, fonttype: int) -> bytes: ... - def draw_text( - self, - gc: GraphicsContextBase, - x: float, - y: float, - s: str, - prop: FontProperties, - angle: float, - ismath=..., - mtext: Text = ..., - ) -> None: ... - def new_gc(self) -> GraphicsContextPdf: ... - -class GraphicsContextPdf(GraphicsContextBase): - def __init__(self, file: PdfFile) -> None: ... - def __repr__(self) -> str: ... - def stroke(self) -> bool: ... - def fill(self, *args) -> bool: ... - def paint( - self, - ) -> Op: ... - capstyles: dict[str, int] = ... - joinstyles: dict[str, int] = ... - def capstyle_cmd(self, style: CapStyle) -> list[int | Op]: ... - def joinstyle_cmd(self, style: JoinStyle) -> list[int | Op]: ... - def linewidth_cmd(self, width: int | float) -> list[float | Op]: ... - def dash_cmd(self, dashes) -> list: ... - def alpha_cmd(self, alpha: float, forced: bool, effective_alphas: tuple[float, float]) -> list[Name | Op]: ... - def hatch_cmd(self, hatch: None, hatch_color: tuple[float, float, float, float]) -> list[Name | Op | float]: ... - def rgb_cmd( - self, - rgb: tuple[float, float, float, float], - ) -> list[float | Op]: ... - def fillcolor_cmd( - self, - rgb: None | tuple[float, float, float, float], - ) -> list[float | Op]: ... - def push(self) -> list[Op]: ... - def pop(self) -> list[Op]: ... - def clip_cmd(self, cliprect, clippath) -> list[Op]: ... - commands: tuple = ... - def delta(self, other: "GraphicsContextPdf") -> list[Op | Name | float]: ... - def copy_properties(self, other: GraphicsContextPdf) -> None: ... - def finalize(self) -> list[Op]: ... - -class PdfPages: - def __init__(self, filename: str, keep_empty: bool = ..., metadata: dict[str, Any] = ...) -> None: ... - def __enter__(self) -> PdfPages: ... - def __exit__(self, exc_type, exc_val, exc_tb) -> None: ... - def close(self) -> None: ... - def infodict(self) -> dict[str, Any]: ... - def savefig(self, figure: Figure | int = ..., **kwargs) -> None: ... - def get_pagecount(self) -> int: ... - def attach_note(self, text: str, positionRect: list[int] = ...) -> None: ... - -class FigureCanvasPdf(FigureCanvasBase): - fixed_dpi: float = ... - filetypes: dict[str, str] = ... - def get_default_filetype(self) -> str: ... - def print_pdf(self, filename: BytesIO | PdfPages | str, *, bbox_inches_restore=..., metadata=...) -> None: ... - def draw(self) -> None: ... - -FigureManagerPdf = FigureManagerBase - -class _BackendPdf(_Backend): - FigureCanvas = FigureCanvasPdf diff --git a/stubs/matplotlib/backends/backend_pgf.pyi b/stubs/matplotlib/backends/backend_pgf.pyi deleted file mode 100644 index 43e4bcfc..00000000 --- a/stubs/matplotlib/backends/backend_pgf.pyi +++ /dev/null @@ -1,97 +0,0 @@ -from typing import Any, Callable - -import numpy as np -from matplotlib import _api -from matplotlib._typing import * -from matplotlib.backend_bases import FigureCanvasBase, FigureManagerBase, GraphicsContextBase, RendererBase, _Backend -from matplotlib.figure import Figure -from matplotlib.font_manager import FontProperties -from matplotlib.text import Text -from matplotlib.transforms import Affine2DBase, Transform - -class __getattr__: - NO_ESCAPE = ... - re_mathsep = ... - -def get_fontspec() -> str: ... -def get_preamble() -> str: ... - -latex_pt_to_in: float = ... -latex_in_to_pt: float = ... -mpl_pt_to_in: float = ... -mpl_in_to_pt: float = ... - -def common_texification(text) -> str: ... -def writeln(fh, line) -> None: ... -def make_pdf_to_png_converter() -> Callable: ... - -class LatexError(Exception): - def __init__(self, message, latex_output=...) -> None: ... - def __str__(self) -> str: ... - -class LatexManager: - def __init__(self) -> None: ... - - str_cache = ... - def get_width_height_descent(self, text, prop) -> tuple[float, float, float]: ... - -class RendererPgf(RendererBase): - def __init__(self, figure: Figure, fh: FileLike) -> None: ... - def draw_markers( - self, - gc: GraphicsContextBase, - marker_path, - marker_trans: Transform, - path, - trans: Transform, - rgbFace=..., - ) -> None: ... - def draw_path(self, gc, path, transform, rgbFace=...) -> None: ... - def option_scale_image(self) -> bool: ... - def option_image_nocomposite(self) -> bool: ... - def draw_image( - self, - gc: GraphicsContextBase, - x: Scalar, - y: Scalar, - im, - transform: Affine2DBase = ..., - ) -> None: ... - def draw_tex(self, gc, x, y, s, prop, angle, ismath=..., mtext=...) -> None: ... - def draw_text( - self, - gc: GraphicsContextBase, - x: float, - y: float, - s: str, - prop: FontProperties, - angle: float, - ismath=..., - mtext: Text = ..., - ) -> None: ... - def get_text_width_height_descent(self, s: str, prop: FontProperties, ismath: str) -> tuple[float, float, float]: ... - def flipy(self) -> bool: ... - def get_canvas_width_height(self) -> tuple[float, float]: ... - def points_to_pixels(self, points: float | ArrayLike): ... - -class FigureCanvasPgf(FigureCanvasBase): - filetypes: dict[str, str] = ... - def get_default_filetype(self) -> str: ... - def print_pgf(self, fname_or_fh, **kwargs) -> None: ... - def print_pdf(self, fname_or_fh, *, metadata=..., **kwargs) -> None: ... - def print_png(self, fname_or_fh, **kwargs) -> None: ... - def get_renderer(self) -> RendererPgf: ... - def draw(self) -> None: ... - -FigureManagerPgf = FigureManagerBase - -class _BackendPgf(_Backend): - FigureCanvas = FigureCanvasPgf - -class PdfPages: - def __init__(self, filename: str | PathLike, *, keep_empty: bool = True, metadata: dict[str, Any] = ...) -> None: ... - def __enter__(self) -> PdfPages: ... - def __exit__(self, exc_type, exc_val, exc_tb) -> None: ... - def close(self) -> None: ... - def savefig(self, figure: Figure | int = ..., **kwargs) -> None: ... - def get_pagecount(self) -> int: ... diff --git a/stubs/matplotlib/backends/backend_ps.pyi b/stubs/matplotlib/backends/backend_ps.pyi deleted file mode 100644 index cd6ae50d..00000000 --- a/stubs/matplotlib/backends/backend_ps.pyi +++ /dev/null @@ -1,113 +0,0 @@ -from enum import Enum -from typing import Type - -from matplotlib._typing import * -from matplotlib.backend_bases import FigureCanvasBase, FigureManagerBase, GraphicsContextBase, _Backend -from matplotlib.font_manager import FontProperties -from matplotlib.text import Text -from matplotlib.transforms import Affine2DBase, Transform -from traitlets import Int - -from . import _backend_pdf_ps - -backend_version: str = ... -debugPS: bool = ... - -class PsBackendHelper: - def __init__(self) -> None: ... - -ps_backend_helper: PsBackendHelper = ... -papersize: dict[str, tuple[float, float]] = ... - -def quote_ps_string(s: str) -> str: ... - -class RendererPS(_backend_pdf_ps.RendererPDFPSBase): - def __init__(self, width, height, pswriter, imagedpi=...) -> None: ... - def set_color(self, r: float, g: float, b: float, store: float | bool = ...) -> None: ... - def set_linewidth(self, linewidth: float, store: bool = ...) -> None: ... - def set_linejoin(self, linejoin: str, store: bool = ...) -> None: ... - def set_linecap(self, linecap: str, store: bool = ...) -> None: ... - def set_linedash(self, offset: int, seq: None, store: bool = ...) -> None: ... - def set_font(self, fontname: str, fontsize: float, store: bool = ...) -> None: ... - def create_hatch(self, hatch) -> str: ... - def get_image_magnification(self) -> float: ... - def draw_image( - self, - gc: GraphicsContextBase, - x: Scalar, - y: Scalar, - im, - transform: Affine2DBase = ..., - ) -> None: ... - def draw_path(self, gc, path, transform, rgbFace=...) -> None: ... - def draw_markers( - self, - gc: GraphicsContextBase, - marker_path, - marker_trans: Transform, - path, - trans: Transform, - rgbFace=..., - ) -> None: ... - def draw_path_collection( - self, - gc, - master_transform, - paths, - all_transforms, - offsets, - offsetTrans, - facecolors, - edgecolors, - linewidths, - linestyles, - antialiaseds, - urls, - offset_position, - ) -> None: ... - def draw_tex(self, gc, x, y, s, prop, angle, *, mtext=...) -> None: ... - def draw_text( - self, - gc: GraphicsContextBase, - x: float, - y: float, - s: str, - prop: FontProperties, - angle: float, - ismath=..., - mtext: Text = ..., - ) -> None: ... - def draw_mathtext(self, gc, x, y, s, prop, angle) -> None: ... - def draw_gouraud_triangle(self, gc: GraphicsContextBase, points, colors, trans) -> None: ... - def draw_gouraud_triangles(self, gc, points, colors, trans) -> None: ... - -class _Orientation(Enum): - def swap_if_landscape(self, shape: tuple[float, int]) -> tuple[float, int]: ... - -class FigureCanvasPS(FigureCanvasBase): - fixed_dpi: Int = ... - filetypes: dict[str, str] = ... - def get_default_filetype(self) -> str: ... - def print_ps(self, outfile, *args, metadata=None, papertype=None, orientation="portrait", **kwargs) -> None: ... - def print_eps(self, outfile, *args, metadata=None, papertype=None, orientation="portrait", **kwargs) -> None: ... - def draw(self) -> None: ... - -def convert_psfrags( - tmpfile, - psfrags, - font_preamble, - custom_preamble, - paper_width, - paper_height, - orientation, -) -> bool: ... -def gs_distill(tmpfile, eps=..., ptype=..., bbox=..., rotated=...) -> None: ... -def xpdf_distill(tmpfile, eps=..., ptype=..., bbox=..., rotated=...) -> None: ... -def get_bbox_header(lbrt, rotated=...) -> tuple[str, str]: ... -def pstoeps(tmpfile, bbox=..., rotated=...) -> None: ... - -FigureManagerPS: Type[FigureManagerBase] = ... -psDefs: list[str] = ... - -class _BackendPS(_Backend): - FigureCanvas = FigureCanvasPS diff --git a/stubs/matplotlib/backends/backend_qt.pyi b/stubs/matplotlib/backends/backend_qt.pyi deleted file mode 100644 index ebdf6f71..00000000 --- a/stubs/matplotlib/backends/backend_qt.pyi +++ /dev/null @@ -1,131 +0,0 @@ -from typing import Any, Type - -from matplotlib import backend_tools -from matplotlib._api import classproperty -from matplotlib.backend_bases import ( - FigureCanvasBase, - FigureManagerBase, - MouseButton, - NavigationToolbar2, - TimerBase, - ToolContainerBase, - _Backend, -) -from matplotlib.backend_tools import Cursors -from matplotlib.transforms import Bbox - -from .qt_compat import QtCore, QtWidgets - -backend_version = ... -SPECIAL_KEYS: dict = ... - -cursord: dict[Cursors, Any] = ... - -class __getattr__: - qApp = ... - -class TimerQT(TimerBase): - def __init__(self, *args, **kwargs) -> None: ... - def __del__(self) -> None: ... - -class FigureCanvasQT(QtWidgets.QWidget, FigureCanvasBase): - required_interactive_framework: str = ... - _timer_cls: Type[TimerQT] = TimerQT - manager_class: classproperty = ... - buttond: dict[str, MouseButton] = ... - - def __init__(self, figure=...) -> None: ... - def showEvent(self, event) -> None: ... - def set_cursor(self, cursor: Cursors) -> None: ... - def enterEvent(self, event) -> None: ... - def leaveEvent(self, event) -> None: ... - def mouseEventCoords(self, pos) -> tuple[float, float]: ... - def mousePressEvent(self, event) -> None: ... - def mouseDoubleClickEvent(self, event) -> None: ... - def mouseMoveEvent(self, event) -> None: ... - def mouseReleaseEvent(self, event) -> None: ... - def wheelEvent(self, event) -> None: ... - def keyPressEvent(self, event) -> None: ... - def keyReleaseEvent(self, event) -> None: ... - def resizeEvent(self, event) -> None: ... - def sizeHint(self) -> QtCore.QSize: ... - def minumumSizeHint(self) -> QtCore.QSize: ... - def flush_events(self) -> None: ... - def start_event_loop(self, timeout=...) -> None: ... - def stop_event_loop(self, event=...) -> None: ... - def draw(self) -> None: ... - def draw_idle(self) -> None: ... - def blit(self, bbox: Bbox | None = None) -> None: ... - def drawRectangle(self, rect) -> None: ... - -class MainWindow(QtWidgets.QMainWindow): - closing: QtCore.Signal = ... - def closeEvent(self, event) -> None: ... - -class FigureManagerQT(FigureManagerBase): - def __init__(self, canvas: FigureCanvasBase, num: int | str) -> None: ... - def full_screen_toggle(self) -> None: ... - def resize(self, width, height) -> None: ... - def show(self) -> None: ... - def destroy(self, *args) -> None: ... - def get_window_title(self) -> None: ... - def set_window_title(self, title) -> None: ... - -class NavigationToolbar2QT(NavigationToolbar2, QtWidgets.QToolBar): - message: QtCore.Signal = ... - toolitems: list = ... - def __init__(self, canvas, parent=..., coordinates=...) -> None: ... - def edit_parameters(self) -> None: ... - def pan(self, *args) -> None: ... - def zoom(self, *args) -> None: ... - def set_message(self, s) -> None: ... - def draw_rubberband(self, event, x0, y0, x1, y1) -> None: ... - def remove_rubberband(self) -> None: ... - def configure_subplots(self) -> SubplotToolQt: ... - def save_figure(self, *args) -> None: ... - def set_history_buttons(self) -> None: ... - -class SubplotToolQt(QtWidgets.QDialog): - def __init__(self, targetfig, parent) -> None: ... - def update_from_current_subplotpars(self) -> None: ... - -class ToolbarQt(ToolContainerBase, QtWidgets.QToolBar): - def __init__(self, toolmanager, parent=...) -> None: ... - def add_toolitem( - self, - name: str, - group: str, - position: int, - image_file, - description: str, - toggle: bool, - ) -> None: ... - def toggle_toolitem(self, name: str, toggled: bool) -> None: ... - def remove_toolitem(self, name: str) -> None: ... - def set_message(self, s: str) -> None: ... - -class ConfigureSubplotsQt(backend_tools.ConfigureSubplotsBase): - def __init__(self, *args, **kwargs) -> None: ... - def trigger(self, *args) -> None: ... - -class SaveFigureQt(backend_tools.SaveFigureBase): - def trigger(self, *args) -> None: ... - -class SetCursorQt(backend_tools.SetCursorBase): - def set_cursor(self, cursor) -> None: ... - -class RubberbandQt(backend_tools.RubberbandBase): - def draw_rubberband(self, x0, y0, x1, y1) -> None: ... - def remove_rubberband(self) -> None: ... - -class HelpQt(backend_tools.ToolHelpBase): - def trigger(self, *args) -> None: ... - -class ToolCopyToClipboardQT(backend_tools.ToolCopyToClipboardBase): - def trigger(self, *args, **kwargs) -> None: ... - -class _BackendQT(_Backend): - FigureCanvas = FigureCanvasQT - FigureManager = FigureManagerQT - @staticmethod - def mainloop() -> None: ... diff --git a/stubs/matplotlib/backends/backend_qtagg.pyi b/stubs/matplotlib/backends/backend_qtagg.pyi deleted file mode 100644 index 2cf94ddc..00000000 --- a/stubs/matplotlib/backends/backend_qtagg.pyi +++ /dev/null @@ -1,10 +0,0 @@ -from .backend_agg import FigureCanvasAgg -from .backend_qt import FigureCanvasQT, _BackendQT - -class FigureCanvasQTAgg(FigureCanvasAgg, FigureCanvasQT): - def __init__(self, figure=...) -> None: ... - def paintEvent(self, event) -> None: ... - def print_figure(self, *args, **kwargs) -> None: ... - -class _BackendQTAgg(_BackendQT): - FigureCanvas = FigureCanvasQTAgg diff --git a/stubs/matplotlib/backends/backend_svg.pyi b/stubs/matplotlib/backends/backend_svg.pyi deleted file mode 100644 index dd3a3797..00000000 --- a/stubs/matplotlib/backends/backend_svg.pyi +++ /dev/null @@ -1,104 +0,0 @@ -from encodings.utf_8 import StreamWriter -from io import BytesIO, TextIOWrapper -from typing import Any, Type - -from matplotlib._typing import * -from matplotlib.backend_bases import FigureCanvasBase, FigureManagerBase, GraphicsContextBase, RendererBase, _Backend -from matplotlib.font_manager import FontProperties -from matplotlib.text import Text -from matplotlib.transforms import Affine2DBase, Transform - -backend_version = ... - -def escape_cdata(s) -> str: ... -def escape_comment(s) -> str: ... -def escape_attrib(s) -> str: ... -def short_float_fmt(x) -> str: ... - -class XMLWriter: - def __init__(self, file: TextIOWrapper | StreamWriter) -> None: ... - def start(self, tag: str, attrib: dict[str, str] = ..., **extra) -> int: ... - def comment(self, comment: str) -> None: ... - def data(self, text: str) -> None: ... - def end(self, tag: str | None = ..., indent: bool = ...) -> None: ... - def close(self, id: int) -> None: ... - def element(self, tag: str, text: str | None = ..., attrib: dict[str, str] = ..., **extra) -> None: ... - def flush(self) -> None: ... - -def generate_transform(transform_list=...) -> str: ... -def generate_css(attrib=...) -> str: ... - -class RendererSVG(RendererBase): - def __init__(self, width, height, svgwriter, basename=..., image_dpi=..., *, metadata=...) -> None: ... - def finalize(self) -> None: ... - def open_group(self, s: str, gid: str | None = ...) -> None: ... - def close_group(self, s: str) -> None: ... - def option_image_nocomposite(self) -> bool: ... - def draw_path(self, gc, path, transform, rgbFace=...) -> None: ... - def draw_markers( - self, - gc: GraphicsContextBase, - marker_path, - marker_trans: Transform, - path, - trans: Transform, - rgbFace=..., - ) -> None: ... - def draw_path_collection( - self, - gc, - master_transform, - paths, - all_transforms, - offsets, - offsetTrans, - facecolors, - edgecolors, - linewidths, - linestyles, - antialiaseds, - urls, - offset_position, - ) -> None: ... - def draw_gouraud_triangle(self, gc: GraphicsContextBase, points, colors, trans) -> None: ... - def draw_gouraud_triangles(self, gc, triangles_array, colors_array, transform: Transform) -> None: ... - def option_scale_image(self) -> bool: ... - def get_image_magnification(self) -> float: ... - def draw_image( - self, - gc: GraphicsContextBase, - x: Scalar, - y: Scalar, - im, - transform: Affine2DBase = ..., - ) -> None: ... - def draw_tex(self, gc, x, y, s, prop, angle, *, mtext=...) -> None: ... - def draw_text( - self, - gc: GraphicsContextBase, - x: float, - y: float, - s: str, - prop: FontProperties, - angle: float, - ismath=..., - mtext: Text = ..., - ) -> None: ... - def flipy(self) -> bool: ... - def get_canvas_width_height(self) -> tuple[float, float]: ... - def get_text_width_height_descent(self, s: str, prop: FontProperties, ismath: bool) -> tuple[float, float, float]: ... - -class FigureCanvasSVG(FigureCanvasBase): - filetypes: dict[str, str] = ... - fixed_dpi: float = ... - - def print_svg(self, filename: BytesIO | str, *args, bbox_inches_restore=..., metadata: dict[str, Any] = ...) -> None: ... - def print_svgz(self, filename: str | PathLike | FileLike, *args, **kwargs) -> None: ... - def get_default_filetype(self) -> str: ... - def draw(self) -> None: ... - -FigureManagerSVG: Type[FigureManagerBase] = ... -svgProlog: str = ... - -class _BackendSVG(_Backend): - FigureCanvas = FigureCanvasSVG diff --git a/stubs/matplotlib/backends/backend_tkagg.pyi b/stubs/matplotlib/backends/backend_tkagg.pyi deleted file mode 100644 index 48a1222f..00000000 --- a/stubs/matplotlib/backends/backend_tkagg.pyi +++ /dev/null @@ -1,13 +0,0 @@ -from typing import Type - -from matplotlib.transforms import Bbox - -from ._backend_tk import FigureCanvasTk, _BackendTk -from .backend_agg import FigureCanvasAgg - -class FigureCanvasTkAgg(FigureCanvasAgg, FigureCanvasTk): - def draw(self) -> None: ... - def blit(self, bbox: Bbox = ...) -> None: ... - -class _BackendTkAgg(_BackendTk): - FigureCanvas: Type[FigureCanvasAgg] = FigureCanvasTkAgg diff --git a/stubs/matplotlib/backends/qt_compat.pyi b/stubs/matplotlib/backends/qt_compat.pyi deleted file mode 100644 index 3f6aa725..00000000 --- a/stubs/matplotlib/backends/qt_compat.pyi +++ /dev/null @@ -1,5 +0,0 @@ -QT_API_PYQT6: str = ... -QT_API_PYSIDE6: str = ... -QT_API_PYQT5: str = ... -QT_API_PYSIDE2: str = ... -QT_API_ENV: str = ... diff --git a/stubs/matplotlib/bezier.pyi b/stubs/matplotlib/bezier.pyi deleted file mode 100644 index e6a76c01..00000000 --- a/stubs/matplotlib/bezier.pyi +++ /dev/null @@ -1,46 +0,0 @@ -from typing import Callable - -import numpy as np -from matplotlib.path import Path - -from ._typing import * - -class NonIntersectingPathException(ValueError): ... - -def get_intersection(cx1, cy1, cos_t1, sin_t1, cx2, cy2, cos_t2, sin_t2) -> tuple[float, float]: ... -def get_normal_points(cx, cy, cos_t, sin_t, length) -> tuple[float, float, float, float]: ... -def split_de_casteljau(beta, t) -> float: ... -def find_bezier_t_intersecting_with_closedpath( - bezier_point_at_t: Callable, - inside_closedpath: Callable, - t0: float = ..., - t1: float = ..., - tolerance: float = ..., -) -> tuple[float, float]: ... - -class BezierSegment: - def __init__(self, control_points) -> None: ... - def __call__(self, t: ArrayLike) -> tuple: ... - def point_at_t(self, t) -> tuple[float]: ... - @property - def control_points(self) -> np.ndarray: ... - @property - def dimension(self) -> int: ... - @property - def degree(self) -> int: ... - @property - def polynomial_coefficients(self): ... - def axis_aligned_extrema(self) -> tuple: ... - -def split_bezier_intersecting_with_closedpath( - bezier, inside_closedpath: Callable, tolerance: float = ... -) -> tuple[list, list]: ... -def split_path_inout(path, inside, tolerance=..., reorder_inout=...) -> tuple[Path, Path]: ... -def inside_circle(cx, cy, r) -> Callable: ... -def get_cos_sin(x0, y0, x1, y1) -> tuple[float, float]: ... -def check_if_parallel(dx1: float, dy1: float, dx2: float, dy2: float, tolerance: float = ...) -> bool: ... -def get_parallels(bezier2, width) -> tuple[list[tuple[float, float]], list[tuple[float, float]]]: ... -def find_control_points(c1x, c1y, mmx, mmy, c2x, c2y) -> list[tuple[float, float]]: ... -def make_wedged_bezier2( - bezier2, width, w1=..., wm=..., w2=... -) -> tuple[list[tuple[float, float]], list[tuple[float, float]]]: ... diff --git a/stubs/matplotlib/blocking_input.pyi b/stubs/matplotlib/blocking_input.pyi deleted file mode 100644 index 964e6fa3..00000000 --- a/stubs/matplotlib/blocking_input.pyi +++ /dev/null @@ -1,3 +0,0 @@ -from typing import Any - -def __getattr__(name: str) -> Any: ... # incomplete diff --git a/stubs/matplotlib/category.pyi b/stubs/matplotlib/category.pyi deleted file mode 100644 index 1fe30a40..00000000 --- a/stubs/matplotlib/category.pyi +++ /dev/null @@ -1,29 +0,0 @@ -from typing import Any, Iterable - -import numpy as np - -from . import ticker, units -from .axis import Axis -from .units import AxisInfo - -class StrCategoryConverter(units.ConversionInterface): - @staticmethod - def convert(value: str | Iterable, unit: UnitData, axis: Axis) -> float | np.ndarray: ... - @staticmethod - def axisinfo(unit: UnitData, axis: Axis) -> AxisInfo: ... - @staticmethod - def default_units(data: str, axis: Axis) -> UnitData: ... - -class StrCategoryLocator(ticker.Locator): - def __init__(self, units_mapping: dict[str, int]) -> None: ... - def __call__(self): ... - def tick_values(self, vmin, vmax) -> list: ... - -class StrCategoryFormatter(ticker.Formatter): - def __init__(self, units_mapping: dict[str, int]) -> None: ... - def __call__(self, x, pos=...): ... - def format_ticks(self, values) -> list[str]: ... - -class UnitData: - def __init__(self, data=...) -> None: ... - def update(self, data: bytes) -> None: ... diff --git a/stubs/matplotlib/cbook/__init__.pyi b/stubs/matplotlib/cbook/__init__.pyi deleted file mode 100644 index ef790a60..00000000 --- a/stubs/matplotlib/cbook/__init__.pyi +++ /dev/null @@ -1,131 +0,0 @@ -import collections -import collections.abc -import contextlib -from typing import Any, Callable, Generator, Iterator, overload - -import numpy as np -from matplotlib._typing import * -from matplotlib.artist import Artist - -class _StrongRef: - def __init__(self, obj) -> None: ... - def __call__(self): ... - def __eq__(self, other) -> bool: ... - def __hash__(self) -> int: ... - -class CallbackRegistry: - def __init__(self, exception_handler: Callable = ..., *, signals: list = ...) -> None: ... - def __getstate__(self) -> dict[str, Any]: ... - def __setstate__(self, state: dict[str, Any]) -> None: ... - def connect(self, signal, func: Callable) -> int: ... - def disconnect(self, cid: int) -> None: ... - def process(self, s: str, *args, **kwargs) -> None: ... - @contextlib.contextmanager - def blocked(self, *, signal: str = ...) -> Generator: ... - -class silent_list(list): - def __init__(self, type, seq=...) -> None: ... - def __repr__(self) -> str: ... - -def strip_math(s: str) -> str: ... -def is_writable_file_like(obj) -> bool: ... -def file_requires_unicode(x) -> bool: ... -def to_filehandle( - fname: str | PathLike | FileLike, - flag: str = "r", - return_opened: bool = False, - encoding: str | None = None, -) -> tuple[FileLike, bool]: ... -def open_file_cm(path_or_file: str | PathLike | FileLike, mode=..., encoding=...) -> FileLike: ... -def is_scalar_or_string(val) -> bool: ... -@overload -def get_sample_data(fname, asfileobj: bool = ..., *, np_load: bool = ...) -> ArrayLike | tuple | dict: ... -@overload -def get_sample_data(fname, asfileobj: bool, *, np_load=...) -> PathLike: ... -@overload -def get_sample_data(fname, asfileobj: bool = ..., *, np_load=...) -> FileLike: ... -def flatten(seq, scalarp=...) -> Generator: ... - -class maxdict(dict): - def __init__(self, maxsize) -> None: ... - def __setitem__(self, k, v) -> None: ... - -class Stack: - def __init__(self, default=...) -> None: ... - def __call__(self): ... - def __len__(self) -> int: ... - def __getitem__(self, ind): ... - def forward(self): ... - def back(self): ... - def push(self, o): ... - def home(self): ... - def empty(self) -> bool: ... - def clear(self) -> None: ... - def bubble(self, o): ... - def remove(self, o) -> None: ... - -def report_memory(i=...): - int: ... - -def safe_masked_invalid(x, copy=...) -> np.ndarray: ... -def print_cycles(objects, outstream=..., show_progress: bool = ...) -> None: ... - -class Grouper: - def __init__(self, init=...) -> None: ... - def __contains__(self, item) -> bool: ... - def clean(self) -> None: ... - def join(self, a, *args) -> bool: ... - def joined(self, a, b) -> bool: ... - def remove(self, a) -> None: ... - def __iter__(self) -> Generator: ... - def get_siblings(self, a) -> list: ... - -class GrouperView: - def __init__(self, grouper) -> None: ... - - class _GrouperMethodForwarder: - def __init__(self, deprecated_kw=...) -> None: ... - def __set_name__(self, owner, name): ... - - joined = ... - get_siblings = ... - clean = ... - join = ... - remove = ... - -def simple_linear_interpolation(a, steps: int) -> np.ndarray: ... -def delete_masked_points(*args) -> tuple: ... -def boxplot_stats( - X: ArrayLike, - whis: float = 1.5, - bootstrap: int = ..., - labels: ArrayLike = ..., - autorange: bool = False, -) -> list[dict]: ... - -ls_mapper: dict[str, str] = ... -ls_mapper_r: dict[str, str] = ... - -def contiguous_regions(mask) -> list[tuple]: ... -def is_math_text(s) -> bool: ... -def violin_stats(X: ArrayLike, method: Callable, points: int = ..., quantiles: ArrayLike = ...) -> list[dict]: ... -def pts_to_prestep(x: list, *args) -> list: ... -def pts_to_poststep(x: list, *args) -> list: ... -def pts_to_midstep(x: list, *args) -> list: ... - -STEP_LOOKUP_MAP: dict = ... - -def index_of( - y: float | ArrayLike, -) -> tuple[np.ndarray, np.ndarray]: ... -def safe_first_element(obj): ... -def sanitize_sequence(data) -> list: ... -def normalize_kwargs(kw: dict | None, alias_mapping: dict | Artist = ...) -> dict: ... - -class _OrderedSet(collections.abc.MutableSet): - def __init__(self) -> None: ... - def __contains__(self, key) -> bool: ... - def __iter__(self) -> Iterator: ... - def __len__(self) -> int: ... - def add(self, key) -> None: ... - def discard(self, key) -> None: ... diff --git a/stubs/matplotlib/cm.pyi b/stubs/matplotlib/cm.pyi deleted file mode 100644 index b4f0a308..00000000 --- a/stubs/matplotlib/cm.pyi +++ /dev/null @@ -1,41 +0,0 @@ -from collections.abc import Mapping - -from ._typing import * -from .colors import Colormap, Normalize - -class __getattr__: - LUTSIZE = ... - -class ColormapRegistry(Mapping): - def __init__(self, cmaps) -> None: ... - def __getitem__(self, item: str): ... - def __iter__(self): ... - def __len__(self) -> int: ... - def __str__(self) -> str: ... - def __call__(self): ... - def register(self, cmap: Colormap, *, name: str = ..., force: bool = ...) -> None: ... - def unregister(self, name: str) -> None: ... - -def register_cmap(name: str = ..., cmap: Colormap = ..., *, override_builtin: bool = ...) -> None: ... -def get_cmap(name: Colormap | str | None = ..., lut: int | None = ...) -> Colormap: ... -def unregister_cmap(name: str) -> Colormap | None: ... - -class ScalarMappable: - def __init__(self, norm: Normalize | None = ..., cmap: str | Colormap = ...) -> None: ... - callbacksSM = ... - def to_rgba(self, x, alpha=..., bytes=..., norm=...) -> tuple[float, float, float, float]: ... - def set_array(self, A: ArrayLike | None) -> None: ... - def get_array(self): ... - def get_cmap(self) -> Colormap: ... - def get_clim(self) -> tuple: ... - def set_clim(self, vmin: float = ..., vmax: float = ...) -> None: ... - def get_alpha(self) -> float: ... - def set_cmap(self, cmap: Colormap | str | None) -> None: ... - @property - def norm(self) -> Normalize: ... - @norm.setter - def norm(self, norm: Normalize) -> None: ... - def set_norm(self, norm: Normalize | None): ... - def autoscale(self) -> None: ... - def autoscale_None(self) -> None: ... - def changed(self) -> None: ... diff --git a/stubs/matplotlib/collections.pyi b/stubs/matplotlib/collections.pyi deleted file mode 100644 index d5283100..00000000 --- a/stubs/matplotlib/collections.pyi +++ /dev/null @@ -1,188 +0,0 @@ -from tkinter.messagebox import NO -from typing import Callable, Literal, Sequence - -import numpy as np -from matplotlib._enums import CapStyle, JoinStyle -from matplotlib._typing import * -from matplotlib.artist import Artist, allow_rasterization -from matplotlib.backend_bases import Event, MouseEvent -from matplotlib.cm import ScalarMappable -from matplotlib.colors import Colormap, Normalize -from matplotlib.lines import Line2D -from matplotlib.patches import Patch -from matplotlib.path import Path -from matplotlib.transforms import Bbox, Transform - -class Collection(Artist, ScalarMappable): - _transforms: np.ndarray = ... - - def __init__( - self, - edgecolors: Color | Sequence[Color] | None = None, - facecolors: Color | Sequence[Color] | None = None, - linewidths: float | Sequence[float] | None = None, - linestyles: str | Sequence[str] | None = None, - capstyle: CapStyle | None = None, - joinstyle: JoinStyle | None = None, - antialiaseds: bool | Sequence[bool] | None = None, - offsets: Sequence[float] | Sequence[Sequence[float]] | None = None, - offset_transform: Transform | None = None, - norm: Normalize | None = None, - cmap: Colormap | None = None, - pickradius: float = 0.5, - hatch: str | None = None, - urls: Sequence[str] | None = None, - *, - zorder: int = 1, - **kwargs, - ) -> None: ... - def get_paths(self): ... - def set_paths(self) -> None: ... - def get_transforms(self): ... - def get_offset_transform(self) -> Transform: ... - def set_offset_transform(self, offset_transform: Transform) -> None: ... - def get_datalim(self, transData) -> Bbox: ... - def get_window_extent(self, renderer=...): ... - @allow_rasterization - def draw(self, renderer) -> None: ... - def set_pickradius(self, pr: float) -> None: ... - def get_pickradius(self) -> float: ... - def contains(self, mouseevent: Event) -> tuple[bool, dict]: ... - def set_urls(self, urls: list[str] | None) -> None: ... - def get_urls(self) -> list[str] | None: ... - def set_hatch(self, hatch: Literal["/", "\\", "|", "-", "+", "x", "o", "O", ".", "*"]) -> None: ... - def get_hatch(self) -> str: ... - def set_offsets(self, offsets: ArrayLike) -> None: ... - def get_offsets(self) -> ArrayLike: ... - def set_linewidth(self, lw: float | list[float]) -> None: ... - def set_linestyle(self, ls: str | tuple) -> None: ... - def set_capstyle(self, cs: CapStyle | Literal["butt", "projecting", "round"]) -> None: ... - def get_capstyle(self) -> CapStyle: ... - def set_joinstyle(self, js: JoinStyle | Literal["miter", "round", "bevel"]) -> None: ... - def get_joinstyle(self) -> JoinStyle: ... - def set_antialiased(self, aa: bool | list[bool]) -> None: ... - def set_color(self, c: Color | list) -> None: ... - def set_facecolor(self, c: Color | list[Color]) -> None: ... - def set_facecolors(self, c: Color | list[Color]) -> None: ... - def get_facecolor(self) -> Color | list[Color]: ... - def get_edgecolor(self) -> Color | list[Color]: ... - def get_facecolors(self) -> Color | list[Color]: ... - def get_edgecolors(self) -> Color | list[Color]: ... - def set_edgecolor(self, c: Color | list[Color] | Literal["face"]) -> None: ... - def set_edgecolors(self, c: Color | list[Color] | Literal["face"]) -> None: ... - def set_alpha(self, alpha: ArrayLike | Scalar | None) -> None: ... - def get_linewidth(self) -> float: ... - def get_linestyle(self) -> list[tuple]: ... - def update_scalarmappable(self) -> None: ... - def get_fill(self) -> bool: ... - def update_from(self, other: Collection) -> None: ... - -class _CollectionWithSizes(Collection): - def get_sizes(self) -> np.ndarray: ... - def set_sizes(self, sizes: np.ndarray | None, dpi: float = ...) -> None: ... - @allow_rasterization - def draw(self, renderer) -> None: ... - -class PathCollection(_CollectionWithSizes): - def __init__(self, paths: Sequence[Path], sizes: ArrayLike = ..., **kwargs) -> None: ... - def set_paths(self, paths: Sequence[Path]) -> None: ... - def get_paths(self): ... - def legend_elements( - self, prop: Literal["colors", "sizes"] = ..., num=..., fmt=..., func: Callable = ..., **kwargs - ) -> tuple[list[Line2D], list[str]]: ... - -class PolyCollection(_CollectionWithSizes): - def __init__(self, verts, sizes=..., closed=..., **kwargs) -> None: ... - def set_verts(self, verts: Sequence[ArrayLike], closed: bool = ...) -> None: ... - def set_paths(self, verts: Sequence[ArrayLike], closed: bool = ...) -> None: ... - def set_verts_and_codes(self, verts: Sequence[ArrayLike], codes: ArrayLike) -> None: ... - -class BrokenBarHCollection(PolyCollection): - def __init__(self, xranges: Sequence[Sequence[float]], yrange: Sequence[float], **kwargs) -> None: ... - @classmethod - def span_where(cls, x, ymin, ymax, where, **kwargs) -> BrokenBarHCollection: ... - -class RegularPolyCollection(_CollectionWithSizes): - def __init__(self, numsides: int, rotation: float = ..., sizes: Sequence[float] = ..., **kwargs) -> None: ... - def get_numsides(self) -> int: ... - def get_rotation(self) -> float: ... - @allow_rasterization - def draw(self, renderer) -> None: ... - -class StarPolygonCollection(RegularPolyCollection): ... -class AsteriskPolygonCollection(RegularPolyCollection): ... - -class LineCollection(Collection): - def __init__(self, segments: Sequence[ArrayLike], *, zorder: int = 2, **kwargs) -> None: ... - def set_segments(self, segments: Sequence[ArrayLike]) -> None: ... - def set_verts(self, segments: Sequence[ArrayLike]) -> None: ... - def set_paths(self, segments: Sequence[ArrayLike]) -> None: ... - def get_segments(self) -> list: ... - def set_color(self, c: Color | list[Color]): ... - def set_colors(self, c: Color | list[Color]): ... - def get_color(self) -> Color: ... - def get_colors(self) -> Color: ... - -class EventCollection(LineCollection): - def __init__( - self, - positions, - orientation: str = "horizontal", - lineoffset: float = 0, - linelength: float = 1, - linewidth: float | Sequence[float] | None = None, - color: Color | Sequence[Color] | None = None, - linestyle: str | Sequence[str] = "solid", - antialiased: bool | Sequence[bool] | None = None, - **kwargs, - ) -> None: ... - def get_positions(self) -> list: ... - def set_positions(self, positions: ArrayLike) -> None: ... - def add_positions(self, position: ArrayLike) -> None: ... - def extend_positions(self, position: ArrayLike) -> None: ... - def append_positions(self, position: ArrayLike) -> None: ... - def is_horizontal(self) -> bool: ... - def get_orientation(self) -> str: ... - def switch_orientation(self) -> None: ... - def set_orientation(self, orientation: Literal["horizontal", "vertical"]) -> None: ... - def get_linelength(self) -> float: ... - def set_linelength(self, linelength: float) -> None: ... - def get_lineoffset(self) -> float: ... - def set_lineoffset(self, lineoffset: float) -> None: ... - def get_linewidth(self) -> float: ... - def get_linewidths(self) -> list[float]: ... - def get_color(self) -> Color: ... - -class CircleCollection(_CollectionWithSizes): - def __init__(self, sizes, **kwargs) -> None: ... - -class EllipseCollection(Collection): - def __init__(self, widths: ArrayLike, heights: ArrayLike, angles: ArrayLike, units: str = ..., **kwargs) -> None: ... - @allow_rasterization - def draw(self, renderer) -> None: ... - -class PatchCollection(Collection): - def __init__(self, patches: Sequence[Patch], match_original: bool = ..., **kwargs) -> None: ... - def set_paths(self, patches) -> None: ... - -class TriMesh(Collection): - def __init__(self, triangulation, **kwargs) -> None: ... - def get_paths(self) -> list[Path]: ... - def set_paths(self) -> None: ... - @staticmethod - def convert_mesh_to_paths(tri) -> list[Path]: ... - @allow_rasterization - def draw(self, renderer) -> None: ... - -class QuadMesh(Collection): - def __init__(self, *args, **kwargs) -> None: ... - def get_paths(self) -> list[Path]: ... - def set_paths(self) -> None: ... - def set_array(self, A: ArrayLike) -> None: ... - def get_datalim(self, transData): ... - def get_coordinates(self) -> np.ndarray: ... - @staticmethod - def convert_mesh_to_paths(meshWidth, meshHeight, coordinates) -> list[Path]: ... - @allow_rasterization - def draw(self, renderer) -> None: ... - def get_cursor_data(self, event: MouseEvent): ... diff --git a/stubs/matplotlib/colorbar.pyi b/stubs/matplotlib/colorbar.pyi deleted file mode 100644 index 978a1d9b..00000000 --- a/stubs/matplotlib/colorbar.pyi +++ /dev/null @@ -1,107 +0,0 @@ -from typing import Literal, Sequence, Type - -from libcst import For - -from .axes import Axes -from .axis import Tick -from .backend_bases import RendererBase -from .cm import ScalarMappable -from .collections import LineCollection -from .colors import Colormap, Normalize -from .gridspec import SubplotSpec -from .spines import Spine -from .text import Text -from .ticker import Formatter, Locator - -class _ColorbarSpine(Spine): - def __init__(self, axes) -> None: ... - def get_window_extent(self, renderer: RendererBase = ...): ... - def set_xy(self, xy: Sequence[float]) -> None: ... - def draw(self, renderer) -> None: ... - -class _ColorbarAxesLocator: - def __init__(self, cbar) -> None: ... - def __call__(self, ax, renderer): ... - def get_subplotspec(self) -> SubplotSpec: ... - -class Colorbar: - ax: Axes - lines: list[LineCollection] - dividers: LineCollection - n_rasterize: int = ... - - def __init__( - self, - ax: Axes, - mappable: ScalarMappable = ..., - *, - cmap: Colormap = ..., - norm: Normalize = ..., - alpha: float = ..., - values: None = ..., - boundaries: None = ..., - orientation: Literal["vertical", "horizontal"] = "vertical", - ticklocation: Literal["auto", "left", "right", "top", "bottom"] = "auto", - extend: Literal["neither", "both", "min", "max"] | None = None, - spacing: Literal["uniform", "proportional"] = "uniform", - ticks: None | Sequence[Tick] | Locator = None, - format: None | str | Formatter = None, - drawedges: bool = False, - filled: bool = True, - extendfrac=None, - extendrect: bool = False, - label: str = "", - ) -> None: ... - @property - def locator(self) -> Locator: ... - @locator.setter - def locator(self, loc: Locator) -> None: ... - @property - def minorlocator(self) -> Locator: ... - @minorlocator.setter - def minorlocator(self, loc: Locator) -> None: ... - @property - def formatter(self) -> Formatter: ... - @formatter.setter - def formatter(self, fmt: Formatter) -> None: ... - @property - def minorformatter(self) -> Formatter: ... - @minorformatter.setter - def minorformatter(self, fmt: Formatter) -> None: ... - def update_normal(self, mappable) -> None: ... - def draw_all(self) -> None: ... - def add_lines(self, *args, **kwargs) -> None: ... - def update_ticks(self) -> None: ... - def set_ticks( - self, ticks: list[float], update_ticks: bool = True, labels: list[str] | None = None, *, minor: bool = False, **kwargs - ) -> None: ... - def get_ticks(self, minor: bool = False) -> list: ... - def set_ticklabels(self, ticklabels: Text, update_ticks: bool = True, *, minor: bool = False, **kwargs) -> None: ... - def minorticks_on(self) -> None: ... - def minorticks_off(self) -> None: ... - def set_label(self, label: str, *, loc: str | None = None, **kwargs) -> None: ... - def set_alpha(self, alpha: float) -> None: ... - def remove(self) -> None: ... - def drag_pan(self, button, key, x, y) -> None: ... - -ColorbarBase: Type[Colorbar] = Colorbar - -def make_axes( - parents: Axes | list[Axes], - location: None | Literal["left", "right", "top", "bottom"] = None, - orientation: None | Literal["vertical", "horizontal"] = None, - fraction: float = 0.15, - shrink: float = 1.0, - aspect: float = 20, - **kwargs, -) -> tuple[Axes, dict]: ... -def make_axes_gridspec( - parent: Axes, - *, - location: None | Literal["left", "right", "top", "bottom"] = None, - orientation: None | Literal["vertical", "horizontal"] = None, - fraction: float = 0.15, - shrink: float = 1.0, - aspect: float = 20, - **kwargs, -) -> tuple[Axes, dict]: ... diff --git a/stubs/matplotlib/colors.pyi b/stubs/matplotlib/colors.pyi deleted file mode 100644 index dbc3160e..00000000 --- a/stubs/matplotlib/colors.pyi +++ /dev/null @@ -1,230 +0,0 @@ -import functools -from collections.abc import Mapping -from email.errors import NonPrintableDefect -from re import Pattern -from typing import Callable, Iterator, Literal - -import numpy as np -from matplotlib._typing import * - -from .scale import AsinhScale, FuncScale, LogScale, SymmetricalLogScale - -class _ColorMapping(dict): - def __init__(self, mapping) -> None: ... - def __setitem__(self, key, value) -> None: ... - def __delitem__(self, key) -> None: ... - -def get_named_colors_mapping() -> _ColorMapping: ... - -class ColorSequenceRegistry(Mapping): - def __init__(self) -> None: ... - def __getitem__(self, item) -> list[Color]: ... - def __iter__(self) -> Iterator[Color]: ... - def __len__(self) -> int: ... - def __str__(self) -> str: ... - def register(self, name: str, color_list: list[Color]) -> None: ... - def unregister(self, name) -> None: ... - -def is_color_like(c) -> bool: ... -def same_color(c1: Color, c2: Color) -> bool: ... -def to_rgba(c: np.ma.masked_array, alpha: float = ...) -> tuple: ... -def to_rgba_array(c: ArrayLike, alpha: float = ...) -> list: ... -def to_rgb(c: Color) -> tuple: ... -def to_hex(c: Color, keep_alpha: bool = ...) -> str: ... - -cnames: dict[str, str] = ... -hexColorPattern: Pattern[str] = ... -rgb2hex = to_hex -hex2color = to_rgb - -class ColorConverter: - colors: _ColorMapping = ... - cache: dict = ... - @staticmethod - def to_rgb(c: Color) -> tuple: ... - @staticmethod - def to_rgba(c: np.ma.masked_array, alpha: float = ...) -> tuple: ... - @staticmethod - def to_rgba_array(c: ArrayLike, alpha: float = ...) -> list: ... - -colorConverter: ColorConverter = ... - -class Colormap: - def __init__(self, name: str, N: int = 256) -> None: ... - def __call__( - self, - X: float | int | np.ndarray | Scalar, - alpha: float | ArrayLike | None = None, - bytes: bool = False, - ) -> tuple: ... - def __copy__(self) -> Colormap: ... - def __eq__(self, other: Colormap) -> bool: ... - def get_bad(self) -> np.ndarray: ... - def set_bad(self, color: Color = "k", alpha: float | None = None): ... - def get_under(self) -> np.ndarray: ... - def set_under(self, color: Color = "k", alpha: float | None = None): ... - def get_over(self) -> np.ndarray: ... - def set_over(self, color: Color = "k", alpha: float | None = None): ... - def set_extremes(self, *, bad=None, under=None, over=None) -> None: ... - def with_extremes(self, *, bad=None, under: None = ..., over: None = ...) -> None: ... - def is_gray(self) -> bool: ... - def reversed(self, name: str | None = None) -> Colormap: ... - def copy(self): ... - -class LinearSegmentedColormap(Colormap): - def __init__(self, name, segmentdata, N=..., gamma=...) -> None: ... - def set_gamma(self, gamma) -> NonPrintableDefect: ... - @staticmethod - def from_list(name: str, colors, N: int = ..., gamma: float = ...) -> LinearSegmentedColormap: ... - def reversed(self, name: str = ...) -> LinearSegmentedColormap: ... - -class ListedColormap(Colormap): - def __init__(self, colors: list, name: str = ..., N: int = ...) -> None: ... - def reversed(self, name: str = ...) -> ListedColormap: ... - -class Normalize: - def __init__(self, vmin=..., vmax=..., clip=...) -> None: ... - @property - def vmin(self) -> float: ... - @vmin.setter - def vmin(self, value: float) -> None: ... - @property - def vmax(self) -> float: ... - @vmax.setter - def vmax(self, value: float) -> None: ... - @property - def clip(self) -> bool: ... - @clip.setter - def clip(self, value: bool) -> None: ... - @staticmethod - def process_value(value) -> tuple[np.ndarray, bool]: ... - def __call__(self, value, clip: bool | None = None): ... - def inverse(self, value): ... - def autoscale(self, A) -> None: ... - def autoscale_None(self, A) -> None: ... - def scaled(self) -> bool: ... - -class TwoSlopeNorm(Normalize): - def __init__(self, vcenter, vmin=..., vmax=...) -> None: ... - @property - def vcenter(self): ... - @vcenter.setter - def vcenter(self, value) -> None: ... - def autoscale_None(self, A) -> None: ... - def __call__(self, value, clip=...): ... - def inverse(self, value): ... - -class CenteredNorm(Normalize): - def __init__(self, vcenter=..., halfrange=..., clip=...) -> None: ... - def autoscale(self, A) -> None: ... - def autoscale_None(self, A) -> None: ... - @property - def vcenter(self): ... - @vcenter.setter - def vcenter(self, vcenter) -> None: ... - @property - def halfrange(self): ... - @halfrange.setter - def halfrange(self, halfrange) -> None: ... - def __call__(self, value, clip: bool = ...): ... - -def make_norm_from_scale(scale_cls, base_norm_cls=..., *, init=...): ... -@make_norm_from_scale(FuncScale, init=lambda functions, vmin=None, vmax=None, clip=False: None) -class FuncNorm(Normalize): ... - -@make_norm_from_scale(functools.partial(LogScale, nonpositive="mask")) -class LogNorm(Normalize): ... - -@make_norm_from_scale( - SymmetricalLogScale, - init=lambda linthresh, linscale=1, vmin=None, vmax=None, clip=False, *, base=10: None, -) -class SymLogNorm(Normalize): - @property - def linthresh(self): ... - @linthresh.setter - def linthresh(self, value): ... - -@make_norm_from_scale(AsinhScale, init=lambda linear_width=1, vmin=None, vmax=None, clip=False: None) -class AsinhNorm(Normalize): - @property - def linear_width(self): ... - @linear_width.setter - def linear_width(self, value) -> None: ... - -class PowerNorm(Normalize): - def __init__(self, gamma, vmin=..., vmax=..., clip=...) -> None: ... - def __call__(self, value, clip: bool = ...): ... - def inverse(self, value): ... - -class BoundaryNorm(Normalize): - def __init__(self, boundaries, ncolors, clip=..., *, extend=...) -> None: ... - def __call__(self, value, clip=...): ... - def inverse(self, value): ... - -class NoNorm(Normalize): - def __call__(self, value, clip: bool = ...): ... - def inverse(self, value): ... - -def rgb_to_hsv(arr): ... -def hsv_to_rgb(hsv): ... - -class LightSource: - def __init__( - self, - azdeg=..., - altdeg=..., - hsv_min_val=..., - hsv_max_val=..., - hsv_min_sat=..., - hsv_max_sat=..., - ) -> None: ... - @property - def direction(self): ... - def hillshade( - self, - elevation, - vert_exag: float = ..., - dx: float = ..., - dy: float = ..., - fraction: float = ..., - ) -> np.ndarray: ... - def shade_normals(self, normals, fraction: float = ...) -> np.ndarray: ... - def shade( - self, - data, - cmap: Colormap, - norm=..., - blend_mode: Literal["hsv", "overlay", "soft"] | Callable = ..., - vmin: float | None = ..., - vmax: float | None = ..., - vert_exag: float = ..., - dx: float = ..., - dy: float = ..., - fraction: float = ..., - **kwargs, - ) -> np.ndarray: ... - def shade_rgb( - self, - rgb: ArrayLike, - elevation: ArrayLike, - fraction: float = ..., - blend_mode: Literal["hsv", "overlay", "soft"] | Callable = ..., - vert_exag: float = ..., - dx: float = ..., - dy: float = ..., - **kwargs, - ) -> np.ndarray: ... - def blend_hsv( - self, - rgb: np.ndarray, - intensity: np.ndarray, - hsv_max_sat: float = ..., - hsv_max_val: float = ..., - hsv_min_val: float = ..., - hsv_min_sat: float = ..., - ) -> np.ndarray: ... - def blend_soft_light(self, rgb: np.ndarray, intensity: np.ndarray) -> np.ndarray: ... - def blend_overlay(self, rgb: np.ndarray, intensity: np.ndarray) -> np.ndarray: ... - -def from_levels_and_colors(levels, colors, extend: Literal["neither", "min", "max", "both"] = ...): ... diff --git a/stubs/matplotlib/container.pyi b/stubs/matplotlib/container.pyi deleted file mode 100644 index 7bcae2dc..00000000 --- a/stubs/matplotlib/container.pyi +++ /dev/null @@ -1,47 +0,0 @@ -from typing import Literal, Type - -from matplotlib.artist import Artist - -from ._typing import * -from .collections import LineCollection -from .lines import Line2D -from .patches import Rectangle - -class Container(tuple): - def __repr__(self) -> str: ... - def __new__(cls: Type[Container], *args, **kwargs) -> Container: ... - def __init__(self, kl: list[Rectangle], label: str = ...) -> None: ... - def remove(self) -> None: ... - def get_children(self) -> list[Rectangle]: ... - - get_label = Artist.get_label - set_label = Artist.set_label - add_callback = Artist.add_callback - remove_callback = Artist.remove_callback - pchanged = Artist.pchanged - -class BarContainer(Container): - patches: list[Rectangle] - errorbar: None | ErrorbarContainer - datavalues: None | ArrayLike - orientation: None | Literal["horizontal", "vertical"] - - def __init__( - self, patches: list[Rectangle], errorbar: ErrorbarContainer | None = ..., *, datavalues=..., orientation=..., **kwargs - ) -> None: ... - -class ErrorbarContainer(Container): - lines: tuple[Line2D, tuple[Line2D, ...], list[LineCollection]] - has_xerr: bool - has_yerr: bool - - def __init__( - self, lines: tuple[Line2D, tuple[Line2D, ...], list[LineCollection]], has_xerr: bool = ..., has_yerr: bool = ..., **kwargs - ) -> None: ... - -class StemContainer(Container): - markerline: Line2D - stemlines: list[Line2D] - baseline: Line2D - - def __init__(self, markerline_stemlines_baseline: tuple[Line2D, list[Line2D], Line2D], **kwargs) -> None: ... diff --git a/stubs/matplotlib/contour.pyi b/stubs/matplotlib/contour.pyi deleted file mode 100644 index 5f127425..00000000 --- a/stubs/matplotlib/contour.pyi +++ /dev/null @@ -1,87 +0,0 @@ -from tkinter import Label -from typing import Callable, Iterable, Literal, Sequence - -from matplotlib.collections import Collection - -from ._typing import * -from .artist import Artist -from .axes import Axes -from .cm import ScalarMappable -from .text import Text -from .ticker import Formatter -from .transforms import Transform - -class ClabelText(Text): - def get_rotation(self) -> float: ... - -class ContourLabeler: - def clabel( - self, - levels: ArrayLike = ..., - *, - fontsize: str | float = ..., - inline: bool = ..., - inline_spacing: float = ..., - fmt: Formatter | str | Callable | dict = ..., - colors: Color | Sequence[Color] | None = ..., - use_clabeltext: bool = ..., - manual: bool | Iterable = ..., - rightside_up: bool = ..., - zorder: float | None = ..., - ) -> list[Label]: ... - def print_label(self, linecontour, labelwidth) -> bool: ... - def too_close(self, x, y, lw) -> bool: ... - def get_label_width(self, lev, fmt, fsize) -> float: ... - def set_label_props(self, label, text, color) -> None: ... - def get_text(self, lev, fmt): ... - def locate_label(self, linecontour, labelwidth): ... - def calc_label_rot_and_inline(self, slc, ind, lw, lc=..., spacing=...): ... - def add_label(self, x, y, rotation, lev, cvalue): ... - def add_label_clabeltext(self, x, y, rotation, lev, cvalue): ... - def add_label_near( - self, - x: float, - y: float, - inline: bool = ..., - inline_spacing: int = ..., - transform: Transform | Literal[False] = ..., - ): ... - def pop_label(self, index=...): ... - def labels(self, inline, inline_spacing): ... - -class ContourSet(ScalarMappable, ContourLabeler): - def __init__( - self, - ax: Axes, - *args, - levels: Sequence[float] = ..., - filled=..., - linewidths=..., - linestyles=..., - hatches=..., - alpha=..., - origin=..., - extent=..., - cmap=..., - colors=..., - norm=..., - vmin=..., - vmax=..., - extend=..., - antialiased=..., - nchunk=..., - locator=..., - transform=..., - **kwargs, - ) -> None: ... - def get_transform(self) -> Transform: ... - def __getstate__(self): ... - def legend_elements(self, variable_name: str = ..., str_format: Callable = ...) -> tuple[list[Artist], list[str]]: ... - def changed(self) -> bool: ... - def get_alpha(self) -> float: ... - def set_alpha(self, alpha: float) -> None: ... - def find_nearest_contour( - self, x: float, y: float, indices: list[int] | None = ..., pixel: bool = ... - ) -> tuple[Collection, int, int, tuple[float, float], float]: ... - -class QuadContourSet(ContourSet): ... diff --git a/stubs/matplotlib/dates.pyi b/stubs/matplotlib/dates.pyi deleted file mode 100644 index ade97c58..00000000 --- a/stubs/matplotlib/dates.pyi +++ /dev/null @@ -1,215 +0,0 @@ -import datetime - -import numpy as np -from dateutil import rrule - -from .ticker import Formatter, Locator -from .units import ConversionInterface - -UTC: datetime.timezone = ... -EPOCH_OFFSET: float = ... -JULIAN_OFFSET: float = ... -MICROSECONDLY: int = ... -HOURS_PER_DAY: int = ... -MIN_PER_HOUR: int = ... -SEC_PER_MIN: int = ... -MONTHS_PER_YEAR: int = ... -DAYS_PER_WEEK: int = ... -DAYS_PER_MONTH: int = ... -DAYS_PER_YEAR: int = ... -MINUTES_PER_DAY: int = ... -SEC_PER_HOUR: int = ... -SEC_PER_DAY: int = ... -SEC_PER_WEEK: int = ... -MUSECONDS_PER_DAY: int = ... -MO: rrule.weekday = ... -TU: rrule.weekday = ... -WE: rrule.weekday = ... -TH: rrule.weekday = ... -FR: rrule.weekday = ... -SA: rrule.weekday = ... -SU: rrule.weekday = ... -WEEKDAYS: tuple[rrule.weekday] = ... -YEARLY: int = ... -MONTHLY: int = ... -WEEKLY: int = ... -DAILY: int = ... -HOURLY: int = ... -MINUTELY: int = ... -SECONDLY: int = ... - -def set_epoch(epoch: str): ... -def get_epoch() -> str: ... -def datestr2num(d: str, default: datetime.datetime = ...): ... -def date2num(d: datetime.datetime | np.datetime64) -> float: ... -def julian2num(j: float) -> float: ... -def num2julian(n: float) -> float: ... -def num2date(x: float, tz: str | datetime.tzinfo = ...) -> datetime.datetime: ... -def num2timedelta(x) -> tuple[datetime.timedelta, list[datetime.timedelta]]: ... -def drange( - dstart: datetime.datetime | datetime.date, - dend: datetime.datetime | datetime.date, - delta: datetime.timedelta, -) -> np.ndarray: ... - -class DateFormatter(Formatter): - def __init__(self, fmt: str, tz: str | datetime.tzinfo = ..., *, usetex: bool = ...) -> None: ... - def __call__(self, x, pos=...): ... - def set_tzinfo(self, tz: str | datetime.tzinfo): ... - -class ConciseDateFormatter(Formatter): - formats: list[str] = ... - offset_formats: list[str] = ... - zero_formats: list[str] = ... - - def __init__( - self, - locator: Locator, - tz: str | datetime.tzinfo = ..., - formats: list[str] = ..., - offset_formats: list[str] = ..., - zero_formats: list[str] = ..., - show_offset: bool = ..., - *, - usetex: bool = ..., - ) -> None: ... - def __call__(self, x, pos=...): ... - def format_ticks(self, values) -> None: ... - def get_offset(self): ... - def format_data_short(self, value): ... - -class AutoDateFormatter(Formatter): - def __init__( - self, locator: Locator, tz: str | datetime.tzinfo = ..., defaultfmt: str = ..., *, usetex: bool = ... - ) -> None: ... - def __call__(self, x, pos=...): ... - -class rrulewrapper: - def __init__(self, freq: int, tzinfo: datetime.tzinfo | None = ..., **kwargs) -> None: ... - def set(self, **kwargs) -> None: ... - def __getattr__(self, name): ... - def __setstate__(self, state) -> None: ... - -class DateLocator(Locator): - hms0d = ... - def __init__(self, tz: str | datetime.tzinfo = ...) -> None: ... - def set_tzinfo(self, tz: str | datetime.tzinfo) -> None: ... - def datalim_to_dt(self): ... - def viewlim_to_dt(self): ... - def nonsingular(self, vmin, vmax): ... - -class RRuleLocator(DateLocator): - def __init__(self, o, tz: str | datetime.tzinfo = ...) -> None: ... - def __call__(self): ... - def tick_values(self, vmin, vmax): ... - @staticmethod - def get_unit_generic(freq): ... - -class AutoDateLocator(DateLocator): - def __init__( - self, - tz: str | datetime.tzinfo = ..., - minticks: int = ..., - maxticks: int = ..., - interval_multiples: bool = True, - ) -> None: ... - def __call__(self): ... - def tick_values(self, vmin, vmax): ... - def nonsingular(self, vmin, vmax): ... - def get_locator(self, dmin, dmax): ... - -class YearLocator(RRuleLocator): - def __init__(self, base=..., month=..., day=..., tz: str | datetime.tzinfo = ...) -> None: ... - -class MonthLocator(RRuleLocator): - def __init__(self, bymonth=..., bymonthday=..., interval=..., tz: str | datetime.tzinfo = ...) -> None: ... - -class WeekdayLocator(RRuleLocator): - def __init__(self, byweekday=..., interval=..., tz: str | datetime.tzinfo = ...) -> None: ... - -class DayLocator(RRuleLocator): - def __init__(self, bymonthday=..., interval=..., tz: str | datetime.tzinfo = ...) -> None: ... - -class HourLocator(RRuleLocator): - def __init__(self, byhour=..., interval=..., tz: str | datetime.tzinfo = ...) -> None: ... - -class MinuteLocator(RRuleLocator): - def __init__(self, byminute=..., interval=..., tz: str | datetime.tzinfo = ...) -> None: ... - -class SecondLocator(RRuleLocator): - def __init__(self, bysecond=..., interval=..., tz: str | datetime.tzinfo = ...) -> None: ... - -class MicrosecondLocator(DateLocator): - def __init__(self, interval=..., tz: str | datetime.tzinfo = ...) -> None: ... - def set_axis(self, axis) -> None: ... - def set_view_interval(self, vmin: float, vmax: float) -> None: ... - def set_data_interval(self, vmin: float, vmax: float) -> None: ... - def __call__(self): ... - def tick_values(self, vmin, vmax): ... - -def epoch2num(e: list[float]) -> np.ndarray: ... -def num2epoch(d: list[float]) -> np.ndarray: ... -def date_ticker_factory(span, tz: str | datetime.tzinfo = ..., numticks=...): ... - -class DateConverter(ConversionInterface): - def __init__(self, *, interval_multiples=...) -> None: ... - def axisinfo(self, unit: None | datetime.tzinfo, axis): ... - @staticmethod - def convert(value, unit, axis): ... - @staticmethod - def default_units(x, axis): ... - -class ConciseDateConverter(DateConverter): - def __init__(self, formats=..., zero_formats=..., offset_formats=..., show_offset=..., *, interval_multiples=...) -> None: ... - def axisinfo(self, unit, axis): ... - -class _SwitchableDateConverter: - def axisinfo(self, *args, **kwargs): ... - def default_units(self, *args, **kwargs): ... - def convert(self, *args, **kwargs): ... - -__all__ = ( - "datestr2num", - "date2num", - "num2date", - "num2timedelta", - "drange", - "epoch2num", - "num2epoch", - "set_epoch", - "get_epoch", - "DateFormatter", - "ConciseDateFormatter", - "AutoDateFormatter", - "DateLocator", - "RRuleLocator", - "AutoDateLocator", - "YearLocator", - "MonthLocator", - "WeekdayLocator", - "DayLocator", - "HourLocator", - "MinuteLocator", - "SecondLocator", - "MicrosecondLocator", - "rrule", - "MO", - "TU", - "WE", - "TH", - "FR", - "SA", - "SU", - "YEARLY", - "MONTHLY", - "WEEKLY", - "DAILY", - "HOURLY", - "MINUTELY", - "SECONDLY", - "MICROSECONDLY", - "relativedelta", - "DateConverter", - "ConciseDateConverter", - "rrulewrapper", -) diff --git a/stubs/matplotlib/docstring.pyi b/stubs/matplotlib/docstring.pyi deleted file mode 100644 index 964e6fa3..00000000 --- a/stubs/matplotlib/docstring.pyi +++ /dev/null @@ -1,3 +0,0 @@ -from typing import Any - -def __getattr__(name: str) -> Any: ... # incomplete diff --git a/stubs/matplotlib/dviread.pyi b/stubs/matplotlib/dviread.pyi deleted file mode 100644 index f7f96fee..00000000 --- a/stubs/matplotlib/dviread.pyi +++ /dev/null @@ -1,53 +0,0 @@ -from collections import namedtuple -from functools import lru_cache - -from ._typing import * -from .path import Path - -Page = ... -Box = ... - -class Text(namedtuple("Text", "x y font glyph width")): - @property - def font_path(self) -> Path: ... - @property - def font_size(self): ... - @property - def font_effects(self): ... - @property - def glyph_name_or_index(self): ... - -class Dvi: - def __init__(self, filename, dpi: float) -> None: ... - baseline = ... - def __enter__(self): ... - def __exit__(self, etype, evalue, etrace): ... - def __iter__(self): ... - def close(self) -> None: ... - -class DviFont: - def __init__(self, scale: float, tfm: Tfm, texname: bytes, vf: Vf) -> None: ... - def __eq__(self, other) -> bool: ... - def __ne__(self, other) -> bool: ... - def __repr__(self) -> str: ... - -class Vf(Dvi): - def __init__(self, filename: str | PathLike) -> None: ... - def __getitem__(self, code): ... - -class Tfm: - def __init__(self, filename: str | PathLike) -> None: ... - -PsFont = ... - -class PsfontsMap: - @lru_cache() - def __new__(cls, filename): ... - def __getitem__(self, texname): ... - -class _LuatexKpsewhich: - @lru_cache() - def __new__(cls): ... - def search(self, filename): ... - -def find_tex_file(filename: str | PathLike, format: str | bytes = ...): ... diff --git a/stubs/matplotlib/figure.pyi b/stubs/matplotlib/figure.pyi deleted file mode 100644 index 4544cd09..00000000 --- a/stubs/matplotlib/figure.pyi +++ /dev/null @@ -1,301 +0,0 @@ -from io import BufferedWriter, BytesIO -from typing import Callable, Literal, overload - -import numpy as np -from mpl_toolkits.mplot3d import Axes3D - -from ._typing import * -from .artist import Artist, _finalize_rasterization, allow_rasterization -from .axes import Axes -from .backend_bases import FigureCanvasBase, MouseButton, MouseEvent, RendererBase -from .colorbar import Colorbar -from .colors import Colormap, Normalize -from .gridspec import GridSpec, SubplotSpec -from .image import FigureImage -from .layout_engine import LayoutEngine -from .legend import Legend -from .projections.geo import AitoffAxes, HammerAxes, LambertAxes, MollweideAxes -from .projections.polar import PolarAxes -from .text import Text -from .transforms import BboxBase - -class _AxesStack: - def __init__(self) -> None: ... - def as_list(self) -> list[Axes]: ... - def remove(self, a: Axes) -> None: ... - def bubble(self, a: Axes) -> None: ... - def add(self, a: Axes) -> None: ... - def current(self) -> None: ... - -class SubplotParams: - def __init__( - self, - left: float = ..., - bottom: float = ..., - right: float = ..., - top: float = ..., - wspace: float = ..., - hspace: float = ..., - ) -> None: ... - validate = ... - def update( - self, - left: float | None = ..., - bottom: float | None = ..., - right: float | None = ..., - top: float | None = ..., - wspace: float | None = ..., - hspace: float | None = ..., - ) -> None: ... - -class FigureBase(Artist): - def __init__(self, **kwargs) -> None: ... - def autofmt_xdate( - self, - bottom: float = 0.2, - rotation: int = 30, - ha: Literal["left", "center", "right"] = "right", - which: Literal["major", "minor", "both"] = "major", - ) -> None: ... - def get_children(self) -> list[Artist]: ... - def contains(self, mouseevent: MouseEvent) -> bool: ... - def get_window_extent(self, renderer: RendererBase = ..., *args, **kwargs): ... - def suptitle(self, t: str, **kwargs) -> Text: ... - def supxlabel(self, t: str, **kwargs) -> Text: ... - def supylabel(self, t: str, **kwargs) -> Text: ... - def get_edgecolor(self): ... - def get_facecolor(self): ... - def get_frameon(self) -> bool: ... - def set_linewidth(self, linewidth: float) -> None: ... - def get_linewidth(self) -> float: ... - def set_edgecolor(self, color: Color): ... - def set_facecolor(self, color: str) -> None: ... - def set_frameon(self, b: bool): ... - frameon = ... - def add_artist(self, artist: Artist, clip: bool = False) -> Artist: ... - def add_axes(self, *args, **kwargs) -> Axes: ... - @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( - self, - nrows: Literal[1] = ..., - ncols: Literal[1] = ..., - *, - squeeze: Literal[False], - sharex: bool | Literal["none", "all", "row", "col"] = ..., - sharey: bool | Literal["none", "all", "row", "col"] = ..., - subplot_kw: dict = ..., - gridspec_kw: dict = ..., - ) -> list[Axes]: ... - @overload - def subplots( - self, - nrows: int = ..., - ncols: int = ..., - *, - squeeze: Literal[False], - sharex: bool | Literal["none", "all", "row", "col"] = ..., - sharey: bool | Literal["none", "all", "row", "col"] = ..., - subplot_kw: dict = ..., - gridspec_kw: dict = ..., - ) -> list[list[Axes]]: ... - @overload - def subplots( - self, - nrows: Literal[1] = ..., - ncols: Literal[1] = ..., - *, - squeeze: Literal[True] = ..., - sharex: bool | Literal["none", "all", "row", "col"] = ..., - sharey: bool | Literal["none", "all", "row", "col"] = ..., - subplot_kw: dict = ..., - gridspec_kw: dict = ..., - ) -> Axes: ... - @overload - def subplots( - self, - nrows: int, - ncols: int, - *, - squeeze: bool = ..., - sharex: bool | Literal["none", "all", "row", "col"] = ..., - sharey: bool | Literal["none", "all", "row", "col"] = ..., - subplot_kw: dict = ..., - gridspec_kw: dict = ..., - ) -> list[Axes]: ... - def delaxes(self, ax: Axes) -> None: ... - def clear(self, keep_observers: bool = False) -> None: ... - def clf(self, keep_observers: bool = False) -> None: ... - def legend(self, *args, **kwargs) -> Legend: ... - def text(self, x: float, y: float, s: str, fontdict: dict = ..., **kwargs) -> Text: ... - def colorbar(self, mappable, cax: Axes = ..., ax=..., use_gridspec: bool = ..., **kwargs) -> Colorbar: ... - def subplots_adjust( - self, - left: float = ..., - bottom: float = ..., - right: float = ..., - top: float = ..., - wspace: float = ..., - hspace: float = ..., - ) -> None: ... - def align_xlabels(self, axs: list[Axes] = ...) -> None: ... - def align_ylabels(self, axs: list[Axes] = ...) -> None: ... - def align_labels(self, axs: list[Axes] = ...) -> None: ... - def add_gridspec(self, nrows: int = 1, ncols: int = 1, **kwargs) -> GridSpec: ... - def subfigures( - self, - nrows: int = 1, - ncols: int = 1, - squeeze: bool = True, - wspace: float | None = None, - hspace: float | None = None, - width_ratios: ArrayLike = ..., - height_ratios: ArrayLike = ..., - **kwargs, - ): ... - def add_subfigure(self, subplotspec: SubplotSpec, **kwargs) -> SubFigure: ... - def sca(self, a: Axes) -> Axes: ... - def gca(self) -> Axes: ... - def get_default_bbox_extra_artists(self): ... - def get_tightbbox( - self, - renderer: RendererBase = ..., - bbox_extra_artists: list[Artist] | None = ..., - ) -> BboxBase: ... - def subplot_mosaic( - self, - mosaic: list | str, - *, - sharex: bool = ..., - sharey: bool = ..., - subplot_kw: dict = ..., - gridspec_kw: dict = ..., - empty_sentinel: object = ..., - ) -> dict[Text, Axes]: ... - -class Figure(FigureBase): - callbacks = ... - def __str__(self) -> str: ... - def __repr__(self): ... - def __init__( - self, - figsize: tuple[float, float] = ..., - dpi: float = ..., - facecolor: Color = ..., - edgecolor: Color = ..., - linewidth: float = ..., - frameon: bool = ..., - subplotpars: SubplotParams = ..., - tight_layout: bool | dict = ..., - constrained_layout: bool = ..., - *, - layout: LayoutEngine | Literal["constrained", "compressed", "tight"] | None = ..., - **kwargs, - ) -> None: ... - def set_layout_engine( - self, layout: LayoutEngine | Literal["constrained", "compressed", "tight"] = ..., **kwargs: dict - ) -> None: ... - def get_layout_engine(self) -> None: ... - def show(self, warn: bool = True) -> None: ... - @property - def axes(self) -> list[Axes]: ... - get_axes = ... - dpi = ... - def get_tight_layout(self) -> bool: ... - def set_tight_layout(self, tight: bool | Literal["w_pad", "h_pad", "rect"] | None): ... - def get_constrained_layout(self) -> bool: ... - def set_constrained_layout(self, constrained: bool | dict | None): ... - def set_constrained_layout_pads(self, **kwargs) -> None: ... - def get_constrained_layout_pads(self, relative: bool = ...): ... - def set_canvas(self, canvas: FigureCanvasBase) -> None: ... - canvas: FigureCanvasBase - - def figimage( - self, - X: ArrayLike, - xo: int = ..., - yo: int = ..., - alpha: None | float = ..., - norm: Normalize = ..., - cmap: str | Colormap = ..., - vmin: float = ..., - vmax: float = ..., - origin: Literal["upper", "lower"] = ..., - resize: bool = ..., - **kwargs, - ) -> FigureImage: ... - def set_size_inches(self, w: float, h: float = ..., forward: bool = True) -> None: ... - def get_size_inches(self) -> np.ndarray: ... - def get_figwidth(self): ... - def get_figheight(self): ... - def get_dpi(self) -> float: ... - def set_dpi(self, val: float) -> None: ... - def set_figwidth(self, val: float, forward: bool = ...) -> None: ... - def set_figheight(self, val: float, forward: bool = ...) -> None: ... - def clear(self, keep_observers: bool = ...) -> None: ... - @allow_rasterization - def draw(self, renderer) -> None: ... - def draw_without_rendering(self) -> None: ... - def draw_artist(self, a: Artist) -> None: ... - def __getstate__(self): ... - def __setstate__(self, state) -> None: ... - def add_axobserver(self, func: Callable) -> None: ... - def savefig( - self, fname: str | PathLike | FileLike | BytesIO | BufferedWriter, *, transparent: bool = ..., **kwargs - ) -> None: ... - def ginput( - self, - n: int = ..., - timeout: float = ..., - show_clicks: bool = ..., - mouse_add: MouseButton | None = ..., - mouse_pop: MouseButton | None = ..., - mouse_stop: MouseButton | None = ..., - ) -> list[tuple[float, float]]: ... - def waitforbuttonpress(self, timeout=...) -> None: ... - def execute_constrained_layout(self, renderer=...) -> None: ... - def tight_layout( - self, *, pad: float = 1.08, h_pad: float = ..., w_pad: float = ..., rect: tuple[float, float, float, float] = ... - ) -> None: ... - -def figaspect(arg: float): ... - -class SubFigure(FigureBase): - callbacks = ... - def __init__( - self, - parent: FigureBase, - subplotspec: SubplotSpec, - *, - facecolor: Color = ..., - edgecolor: Color = ..., - linewidth: float = ..., - frameon: bool = ..., - **kwargs, - ) -> None: ... - @property - def dpi(self) -> float: ... - @dpi.setter - def dpi(self, value: float): ... - def get_dpi(self) -> float: ... - def set_dpi(self, val: float) -> None: ... - def get_constrained_layout(self) -> bool: ... - def get_constrained_layout_pads(self, relative: bool = ...): ... - def get_layout_engine(self) -> LayoutEngine: ... - @property - def axes(self) -> list[Axes]: ... - get_axes = ... - def draw(self, renderer: RendererBase) -> None: ... diff --git a/stubs/matplotlib/font_manager.pyi b/stubs/matplotlib/font_manager.pyi deleted file mode 100644 index f3a67a8f..00000000 --- a/stubs/matplotlib/font_manager.pyi +++ /dev/null @@ -1,209 +0,0 @@ -import json -from functools import lru_cache -from pathlib import PosixPath -from typing import Literal - -from matplotlib.ft2font import FT2Font - -from ._afm import AFM -from ._typing import * - -font_scalings = ... -stretch_dict = ... -weight_dict = ... - -font_family_aliases = ... -MSFolders = ... -MSFontDirectories = ... -MSUserFontDirectories = ... -X11FontDirectories = ... -OSXFontDirectories = ... - -def get_fontext_synonyms(fontext): ... -def list_fonts(directory, extensions): ... -def win32FontDirectory(): ... -def win32InstalledFonts(directory=..., fontext=...): ... -def get_fontconfig_fonts(fontext=...): ... -def findSystemFonts(fontpaths=..., fontext=...): ... - -FontEntry = ... - -def ttfFontProperty(font: FT2Font) -> FontEntry: ... -def afmFontProperty(fontpath, font: AFM) -> FontEntry: ... - -class FontProperties: - def __init__( - self, - family: list[str] | str | Literal["sans-serif", "serif", "cursive", "fantasy", "monospace"] = ..., - style: Literal["normal", "italic", "oblique"] = ..., - variant: Literal["normal", "small-caps"] = ..., - weight: ( - int - | Literal[ - "ultralight", - "light", - "normal", - "regular", - "book", - "medium", - "roman", - "semibold", - "demibold", - "demi", - "bold", - "heavy", - "extra bold", - "black", - ] - ) = ..., - stretch: ( - int - | Literal[ - "ultra-condensed", - "extra-condensed", - "condensed", - "semi-condensed", - "normal", - "semi-expanded", - "expanded", - "extra-expanded", - "ultra-expanded", - ] - ) = ..., - size: float | Literal["xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large"] = ..., - fname: PosixPath | None = ..., - math_fontfamily: Literal["dejavusans", "dejavuserif", "cm", "stix", "stixsans", "custom"] = ..., - ) -> None: ... - def __hash__(self) -> int: ... - def __eq__(self, other: "FontProperties") -> bool: ... - def __str__(self) -> str: ... - def get_family(self) -> list[str]: ... - def get_name(self) -> str: ... - def get_style(self) -> str: ... - def get_variant(self) -> str: ... - def get_weight(self) -> str: ... - def get_stretch(self) -> str: ... - def get_size(self) -> float: ... - def get_file(self) -> str | None: ... - def get_fontconfig_pattern(self) -> str: ... - def set_family( - self, - family: str | list[str] | Literal["sans-serif", "serif", "cursive", "fantasy", "monospace"], - ) -> None: ... - def set_style(self, style: Literal["normal", "italic", "oblique"]) -> None: ... - def set_variant(self, variant: Literal["normal", "small-caps"]) -> None: ... - def set_weight( - self, - weight: ( - int - | Literal[ - "ultralight", - "light", - "normal", - "regular", - "book", - "medium", - "roman", - "semibold", - "demibold", - "demi", - "bold", - "heavy", - "extra bold", - "black", - ] - ), - ) -> None: ... - def set_stretch( - self, - stretch: ( - int - | Literal[ - "ultra-condensed", - "extra-condensed", - "condensed", - "semi-condensed", - "normal", - "semi-expanded", - "expanded", - "extra-expanded", - "ultra-expanded", - ] - ), - ) -> None: ... - def set_size( - self, - size: float | Literal["xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large"], - ) -> None: ... - def set_file(self, file: PosixPath | None) -> None: ... - def set_fontconfig_pattern(self, pattern: str) -> None: ... - def get_math_fontfamily(self) -> str: ... - def set_math_fontfamily( - self, - fontfamily: Literal["dejavusans", "dejavuserif", "cm", "stix", "stixsans", "custom"], - ) -> None: ... - def copy(self) -> "FontProperties": ... - set_name = ... - get_slant = ... - set_slant = ... - get_size_in_points = ... - -class _JSONEncoder(json.JSONEncoder): - def default(self, o): ... - -def json_dump(data, filename): ... -def json_load(filename: PosixPath) -> FontManager: ... - -class FontManager: - def __init__(self, size=..., weight=...) -> None: ... - def addfont(self, path: str | PathLike): ... - @property - def defaultFont(self): ... - def get_default_weight(self): ... - @staticmethod - def get_default_size() -> float: ... - def set_default_weight( - self, - weight: ( - int - | Literal[ - "ultralight", - "light", - "normal", - "regular", - "book", - "medium", - "roman", - "semibold", - "demibold", - "demi", - "bold", - "heavy", - "extra bold", - "black", - ] - ), - ): ... - def score_family(self, families: list[str], family2: str) -> float: ... - def score_style(self, style1: str, style2: str) -> float: ... - def score_variant(self, variant1: str, variant2: str) -> float: ... - def score_stretch(self, stretch1: str, stretch2: str) -> float: ... - def score_weight(self, weight1: str, weight2: int) -> float: ... - def score_size(self, size1: float, size2: str) -> float: ... - def findfont( - self, - prop: FontProperties | str, - fontext: Literal["ttf", "afm"] = ..., - directory: str = ..., - fallback_to_default: bool = ..., - rebuild_if_missing: bool = ..., - ) -> str: ... - def get_font_names(self) -> list: ... - -@lru_cache() -def is_opentype_cff_font(filename): ... -def get_font(filename, hinting_factor=...): ... - -fontManager = ... -findfont = ... -get_font_names = ... diff --git a/stubs/matplotlib/fontconfig_pattern.pyi b/stubs/matplotlib/fontconfig_pattern.pyi deleted file mode 100644 index 964e6fa3..00000000 --- a/stubs/matplotlib/fontconfig_pattern.pyi +++ /dev/null @@ -1,3 +0,0 @@ -from typing import Any - -def __getattr__(name: str) -> Any: ... # incomplete diff --git a/stubs/matplotlib/ft2font.pyi b/stubs/matplotlib/ft2font.pyi deleted file mode 100644 index 3b63f4c1..00000000 --- a/stubs/matplotlib/ft2font.pyi +++ /dev/null @@ -1,227 +0,0 @@ -# Python: 3.8.8 (tags/v3.8.8:024d805, Feb 19 2021, 13:18:16) [MSC v.1928 64 bit (AMD64)] -# Library: matplotlib, version: 3.4.0 -# Module: matplotlib.ft2font, version: unspecified -import builtins as _mod_builtins -import typing - -BOLD: int -EXTERNAL_STREAM: int -FAST_GLYPHS: int -FIXED_SIZES: int -FIXED_WIDTH: int - -class FT2Font(_mod_builtins.object): - "Create a new FT2Font object.\n\nAttributes\n----------\nnum_faces\n Number of faces in file.\nface_flags, style_flags : int\n Face and style flags; see the ft2font constants.\nnum_glyphs\n Number of glyphs in the face.\nfamily_name, style_name\n Face family and style name.\nnum_fixed_sizes\n Number of bitmap in the face.\nscalable\n Whether face is scalable; attributes after this one are only\n defined for scalable faces.\nbbox\n Face global bounding box (xmin, ymin, xmax, ymax).\nunits_per_EM\n Number of font units covered by the EM.\nascender, descender\n Ascender and descender in 26.6 units.\nheight\n Height in 26.6 units; used to compute a default line spacing\n (baseline-to-baseline distance).\nmax_advance_width, max_advance_height\n Maximum horizontal and vertical cursor advance for all glyphs.\nunderline_position, underline_thickness\n Vertical position and thickness of the underline bar.\npostscript_name\n PostScript name of the font.\n" - def __init__(self, *args, **kwargs) -> None: - "Create a new FT2Font object.\n\nAttributes\n----------\nnum_faces\n Number of faces in file.\nface_flags, style_flags : int\n Face and style flags; see the ft2font constants.\nnum_glyphs\n Number of glyphs in the face.\nfamily_name, style_name\n Face family and style name.\nnum_fixed_sizes\n Number of bitmap in the face.\nscalable\n Whether face is scalable; attributes after this one are only\n defined for scalable faces.\nbbox\n Face global bounding box (xmin, ymin, xmax, ymax).\nunits_per_EM\n Number of font units covered by the EM.\nascender, descender\n Ascender and descender in 26.6 units.\nheight\n Height in 26.6 units; used to compute a default line spacing\n (baseline-to-baseline distance).\nmax_advance_width, max_advance_height\n Maximum horizontal and vertical cursor advance for all glyphs.\nunderline_position, underline_thickness\n Vertical position and thickness of the underline bar.\npostscript_name\n PostScript name of the font.\n" - ... - - @classmethod - def __init_subclass__(cls) -> None: - "This method is called when a class is subclassed.\n\nThe default implementation does nothing. It may be\noverridden to extend subclasses.\n" - ... - - @classmethod - def __subclasshook__(cls, subclass: typing.Any) -> bool: - "Abstract classes can override this to customize issubclass().\n\nThis is invoked early on by abc.ABCMeta.__subclasscheck__().\nIt should return True, False or NotImplemented. If it returns\nNotImplemented, the normal algorithm is used. Otherwise, it\noverrides the normal algorithm (and the outcome is cached).\n" - ... - - @property - def ascender(self) -> typing.Any: ... - @property - def bbox(self) -> typing.Any: ... - def clear(self) -> typing.Any: - "Clear all the glyphs, reset for a new call to `.set_text`.\n" - ... - - @property - def descender(self) -> typing.Any: ... - def draw_glyph_to_bitmap(self, bitmap, x, y, glyph) -> typing.Any: - "Draw a single glyph to the bitmap at pixel locations x, y\nNote it is your responsibility to set up the bitmap manually\nwith ``set_bitmap_size(w, h)`` before this call is made.\n\nIf you want automatic layout, use `.set_text` in combinations with\n`.draw_glyphs_to_bitmap`. This function is instead intended for people\nwho want to render individual glyphs (e.g., returned by `.load_char`)\nat precise locations.\n" - ... - - def draw_glyphs_to_bitmap(self) -> typing.Any: - "Draw the glyphs that were loaded by `.set_text` to the bitmap.\nThe bitmap size will be automatically set to include the glyphs.\n" - ... - - @property - def face_flags(self) -> typing.Any: ... - @property - def family_name(self) -> typing.Any: ... - @property - def fname(self) -> typing.Any: ... - def get_bitmap_offset(self) -> typing.Any: - "Get the (x, y) offset in 26.6 subpixels for the bitmap if ink hangs left or below (0, 0).\nSince Matplotlib only supports left-to-right text, y is always 0.\n" - ... - - def get_char_index(self, codepoint) -> typing.Any: - "Return the glyph index corresponding to a character *codepoint*.\n" - ... - - def get_charmap(self) -> typing.Any: - "Return a dict that maps the character codes of the selected charmap\n(Unicode by default) to their corresponding glyph indices.\n" - ... - - def get_descent(self) -> typing.Any: - "Get the descent in 26.6 subpixels of the current string set by `.set_text`.\nThe rotation of the string is accounted for. To get the descent\nin pixels, divide this value by 64.\n" - ... - - def get_glyph_name(self, index) -> typing.Any: - "Retrieve the ASCII name of a given glyph *index* in a face.\n\nDue to Matplotlib's internal design, for fonts that do not contain glyph\nnames (per FT_FACE_FLAG_GLYPH_NAMES), this returns a made-up name which\ndoes *not* roundtrip through `.get_name_index`.\n" - ... - - def get_image(self) -> typing.Any: - "Return the underlying image buffer for this font object.\n" - ... - - def get_kerning(self, left, right, mode) -> typing.Any: - "Get the kerning between *left* and *right* glyph indices.\n*mode* is a kerning mode constant:\n KERNING_DEFAULT - Return scaled and grid-fitted kerning distances\n KERNING_UNFITTED - Return scaled but un-grid-fitted kerning distances\n KERNING_UNSCALED - Return the kerning vector in original font units\n" - ... - - def get_name_index(self, name) -> typing.Any: - "Return the glyph index of a given glyph *name*.\nThe glyph index 0 means 'undefined character code'.\n" - ... - - def get_num_glyphs(self) -> typing.Any: - "Return the number of loaded glyphs.\n" - ... - - def get_path(self) -> typing.Any: - "Get the path data from the currently loaded glyph as a tuple of vertices, codes.\n" - ... - - def get_ps_font_info(self) -> typing.Any: - "Return the information in the PS Font Info structure.\n" - ... - - def get_sfnt(self) -> typing.Any: - "Load the entire SFNT names table, as a dict whose keys are\n(platform-ID, ISO-encoding-scheme, language-code, and description)\ntuples.\n" - ... - - def get_sfnt_table(self, name) -> typing.Any: - "Return one of the following SFNT tables: head, maxp, OS/2, hhea, vhea, post, or pclt.\n" - ... - - def get_width_height(self) -> typing.Any: - "Get the width and height in 26.6 subpixels of the current string set by `.set_text`.\nThe rotation of the string is accounted for. To get width and height\nin pixels, divide these values by 64.\n" - ... - - def get_xys(self) -> typing.Any: - "Get the xy locations of the current glyphs.\n" - ... - - @property - def height(self) -> typing.Any: ... - def load_char(self, charcode, flags) -> typing.Any: - "Load character with *charcode* in current fontfile and set glyph.\n*flags* can be a bitwise-or of the LOAD_XXX constants;\nthe default value is LOAD_FORCE_AUTOHINT.\nReturn value is a Glyph object, with attributes\n width # glyph width\n height # glyph height\n bbox # the glyph bbox (xmin, ymin, xmax, ymax)\n horiBearingX # left side bearing in horizontal layouts\n horiBearingY # top side bearing in horizontal layouts\n horiAdvance # advance width for horizontal layout\n vertBearingX # left side bearing in vertical layouts\n vertBearingY # top side bearing in vertical layouts\n vertAdvance # advance height for vertical layout\n" - ... - - def load_glyph(self, glyphindex, flags) -> typing.Any: - "Load character with *glyphindex* in current fontfile and set glyph.\n*flags* can be a bitwise-or of the LOAD_XXX constants;\nthe default value is LOAD_FORCE_AUTOHINT.\nReturn value is a Glyph object, with attributes\n width # glyph width\n height # glyph height\n bbox # the glyph bbox (xmin, ymin, xmax, ymax)\n horiBearingX # left side bearing in horizontal layouts\n horiBearingY # top side bearing in horizontal layouts\n horiAdvance # advance width for horizontal layout\n vertBearingX # left side bearing in vertical layouts\n vertBearingY # top side bearing in vertical layouts\n vertAdvance # advance height for vertical layout\n" - ... - - @property - def max_advance_height(self) -> typing.Any: ... - @property - def max_advance_width(self) -> typing.Any: ... - @property - def num_charmaps(self) -> typing.Any: ... - @property - def num_faces(self) -> typing.Any: ... - @property - def num_fixed_sizes(self) -> typing.Any: ... - @property - def num_glyphs(self) -> typing.Any: ... - @property - def postscript_name(self) -> typing.Any: ... - @property - def scalable(self) -> typing.Any: ... - def select_charmap(self, i) -> typing.Any: - "Select a charmap by its FT_Encoding number.\n" - ... - - def set_charmap(self, i) -> typing.Any: - "Make the i-th charmap current.\n" - ... - - def set_size(self, ptsize, dpi) -> typing.Any: - "Set the point size and dpi of the text.\n" - ... - - def set_text(self, string, angle, flags) -> typing.Any: - "Set the text *string* and *angle*.\n*flags* can be a bitwise-or of the LOAD_XXX constants;\nthe default value is LOAD_FORCE_AUTOHINT.\nYou must call this before `.draw_glyphs_to_bitmap`.\nA sequence of x,y positions is returned.\n" - ... - - @property - def style_flags(self) -> typing.Any: ... - @property - def style_name(self) -> typing.Any: ... - @property - def underline_position(self) -> typing.Any: ... - @property - def underline_thickness(self) -> typing.Any: ... - @property - def units_per_EM(self) -> typing.Any: ... - def __getattr__(self, name) -> typing.Any: ... - -class FT2Image(_mod_builtins.object): - def __init__(self, *args, **kwargs) -> None: ... - @classmethod - def __init_subclass__(cls) -> None: - "This method is called when a class is subclassed.\n\nThe default implementation does nothing. It may be\noverridden to extend subclasses.\n" - ... - - @classmethod - def __subclasshook__(cls, subclass: typing.Any) -> bool: - "Abstract classes can override this to customize issubclass().\n\nThis is invoked early on by abc.ABCMeta.__subclasscheck__().\nIt should return True, False or NotImplemented. If it returns\nNotImplemented, the normal algorithm is used. Otherwise, it\noverrides the normal algorithm (and the outcome is cached).\n" - ... - - def draw_rect(self, x0, y0, x1, y1) -> typing.Any: - "Draw an empty rectangle to the image.\n" - ... - - def draw_rect_filled(self, x0, y0, x1, y1) -> typing.Any: - "Draw a filled rectangle to the image.\n" - ... - - def __getattr__(self, name) -> typing.Any: ... - -GLYPH_NAMES: int -HORIZONTAL: int -ITALIC: int -KERNING: int -KERNING_DEFAULT: int -KERNING_UNFITTED: int -KERNING_UNSCALED: int -LOAD_CROP_BITMAP: int -LOAD_DEFAULT: int -LOAD_FORCE_AUTOHINT: int -LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH: int -LOAD_IGNORE_TRANSFORM: int -LOAD_LINEAR_DESIGN: int -LOAD_MONOCHROME: int -LOAD_NO_AUTOHINT: int -LOAD_NO_BITMAP: int -LOAD_NO_HINTING: int -LOAD_NO_RECURSE: int -LOAD_NO_SCALE: int -LOAD_PEDANTIC: int -LOAD_RENDER: int -LOAD_TARGET_LCD: int -LOAD_TARGET_LCD_V: int -LOAD_TARGET_LIGHT: int -LOAD_TARGET_MONO: int -LOAD_TARGET_NORMAL: int -LOAD_VERTICAL_LAYOUT: int -MULTIPLE_MASTERS: int -SCALABLE: int -SFNT: int -VERTICAL: int -__doc__: typing.Any -__file__: str -__freetype_build_type__: str -__freetype_version__: str -__name__: str -__package__: str - -def __getattr__(name) -> typing.Any: ... diff --git a/stubs/matplotlib/gridspec.pyi b/stubs/matplotlib/gridspec.pyi deleted file mode 100644 index db64bff5..00000000 --- a/stubs/matplotlib/gridspec.pyi +++ /dev/null @@ -1,98 +0,0 @@ -from typing import Sequence - -from ._typing import * -from .backend_bases import RendererBase -from .figure import Figure, FigureBase, SubplotParams - -class GridSpecBase: - def __init__( - self, - nrows: int, - ncols: int, - height_ratios: ArrayLike = ..., - width_ratios: ArrayLike = ..., - ) -> None: ... - def __repr__(self) -> str: ... - - nrows = ... - ncols = ... - def get_geometry(self) -> tuple[int, int]: ... - def get_subplot_params(self, figure: Figure = ...): ... - def new_subplotspec(self, loc: tuple[int, int], rowspan: int = ..., colspan: int = ...) -> SubplotSpec: ... - def set_width_ratios(self, width_ratios: ArrayLike) -> None: ... - def get_width_ratios(self) -> list[float]: ... - def set_height_ratios(self, height_ratios: ArrayLike) -> None: ... - def get_height_ratios(self) -> list[float]: ... - def get_grid_positions(self, fig: Figure, raw: bool = False): ... - def __getitem__(self, key) -> SubplotSpec: ... - def subplots(self, *, sharex=..., sharey=..., squeeze=..., subplot_kw=...): ... - -class GridSpec(GridSpecBase): - def __init__( - self, - nrows: int, - ncols: int, - figure: FigureBase = ..., - left: float = ..., - bottom: float = ..., - right: float = ..., - top: float = ..., - wspace: float = ..., - hspace: float = ..., - width_ratios: ArrayLike = ..., - height_ratios: ArrayLike = ..., - ) -> None: ... - def update(self, **kwargs) -> None: ... - def get_subplot_params(self, figure: FigureBase = ...) -> SubplotParams: ... - def locally_modified_subplot_params(self) -> list[str]: ... - def tight_layout( - self, - figure: Figure, - renderer: RendererBase = ..., - pad: float = ..., - h_pad: float = ..., - w_pad: float = ..., - rect: Sequence[float] = ..., - ) -> None: ... - -class GridSpecFromSubplotSpec(GridSpecBase): - def __init__( - self, - nrows: int, - ncols: int, - subplot_spec: SubplotSpec, - wspace: float = ..., - hspace: float = ..., - height_ratios: ArrayLike = ..., - width_ratios: ArrayLike = ..., - ) -> None: ... - def get_subplot_params(self, figure: Figure = ...) -> SubplotParams: ... - def get_topmost_subplotspec(self) -> SubplotSpec: ... - -class SubplotSpec: - def __init__( - self, - gridspec: GridSpecBase, - num1: int, - num2: int = ..., - ) -> None: ... - def __repr__(self) -> str: ... - @property - def num2(self): ... - @num2.setter - def num2(self, value): ... - def get_gridspec(self) -> GridSpecBase: ... - def get_geometry(self): ... - @property - def rowspan(self) -> range: ... - @property - def colspan(self) -> range: ... - def is_first_row(self) -> bool: ... - def is_last_row(self) -> bool: ... - def is_first_col(self) -> bool: ... - def is_last_col(self) -> bool: ... - def get_position(self, figure: Figure): ... - def get_topmost_subplotspec(self) -> SubplotSpec: ... - def __eq__(self, other: SubplotSpec) -> bool: ... - def __hash__(self) -> int: ... - def subgridspec(self, nrows: int, ncols: int, **kwargs) -> GridSpecFromSubplotSpec: ... diff --git a/stubs/matplotlib/hatch.pyi b/stubs/matplotlib/hatch.pyi deleted file mode 100644 index b29d7d51..00000000 --- a/stubs/matplotlib/hatch.pyi +++ /dev/null @@ -1,45 +0,0 @@ -class HatchPatternBase: ... - -class HorizontalHatch(HatchPatternBase): - def __init__(self, hatch: str, density: int) -> None: ... - def set_vertices_and_codes(self, vertices, codes) -> None: ... - -class VerticalHatch(HatchPatternBase): - def __init__(self, hatch: str, density: int) -> None: ... - def set_vertices_and_codes(self, vertices, codes) -> None: ... - -class NorthEastHatch(HatchPatternBase): - def __init__(self, hatch: str, density: int) -> None: ... - def set_vertices_and_codes(self, vertices, codes) -> None: ... - -class SouthEastHatch(HatchPatternBase): - def __init__(self, hatch: str, density: int) -> None: ... - def set_vertices_and_codes(self, vertices, codes) -> None: ... - -class Shapes(HatchPatternBase): - filled = ... - def __init__(self, hatch: str, density: int) -> None: ... - def set_vertices_and_codes(self, vertices, codes) -> None: ... - -class Circles(Shapes): - def __init__(self, hatch: str, density: int) -> None: ... - -class SmallCircles(Circles): - size = ... - def __init__(self, hatch: str, density: int) -> None: ... - -class LargeCircles(Circles): - size = ... - def __init__(self, hatch: str, density: int) -> None: ... - -class SmallFilledCircles(Circles): - size = ... - filled = ... - def __init__(self, hatch: str, density: int) -> None: ... - -class Stars(Shapes): - size = ... - filled = ... - def __init__(self, hatch: str, density: int) -> None: ... - -def get_path(hatchpattern, density=...): ... diff --git a/stubs/matplotlib/image.pyi b/stubs/matplotlib/image.pyi deleted file mode 100644 index c88015bc..00000000 --- a/stubs/matplotlib/image.pyi +++ /dev/null @@ -1,184 +0,0 @@ -from typing import Literal, Sequence - -import numpy as np -from PIL.Image import Image - -from ._typing import * -from .artist import Artist, allow_rasterization -from .axes import Axes -from .backend_bases import MouseEvent, RendererBase -from .cm import ScalarMappable -from .colors import Colormap, Normalize -from .figure import Figure -from .transforms import Affine2D, Bbox - -interpolations_names = ... - -def composite_images( - images: list[Image], renderer: RendererBase, magnification: float = 1 -) -> tuple[np.ndarray, tuple[float, float]]: ... - -class _ImageBase(Artist, ScalarMappable): - zorder = ... - def __init__( - self, - ax: Axes, - cmap: Colormap = ..., - norm: Normalize = ..., - interpolation=..., - origin=..., - filternorm=..., - filterrad=..., - resample=..., - *, - interpolation_stage=..., - **kwargs, - ) -> None: ... - def __str__(self) -> str: ... - def __getstate__(self): ... - def get_size(self): ... - def set_alpha(self, alpha: float | ArrayLike | None) -> None: ... - def changed(self) -> bool: ... - def make_image(self, renderer, magnification=..., unsampled=...) -> tuple[np.ndarray, tuple[float, float], Affine2D]: ... - @allow_rasterization - def draw(self, renderer: RendererBase, *args, **kwargs) -> None: ... - def contains(self, mouseevent: MouseEvent) -> bool: ... - def write_png(self, fname: str) -> None: ... - def set_data(self, A: ArrayLike | Image) -> None: ... - def set_array(self, A: ArrayLike) -> None: ... - def get_interpolation(self) -> str: ... - def set_interpolation( - self, - s: ( - Literal[ - "antialiased", - "nearest", - "bilinear", - "bicubic", - "spline16", - "spline36", - "hanning", - "hamming", - "hermite", - "kaiser", - "quadric", - "catrom", - "gaussian", - "bessel", - "mitchell", - "sinc", - "lanczos", - "none", - ] - | None - ), - ) -> None: ... - def set_interpolation_stage(self, s: Literal["data", "rgba"] | None) -> None: ... - def can_composite(self) -> bool: ... - def set_resample(self, v: bool | None) -> None: ... - def get_resample(self) -> bool: ... - def set_filternorm(self, filternorm: bool) -> None: ... - def get_filternorm(self) -> bool: ... - def set_filterrad(self, filterrad: float) -> None: ... - def get_filterrad(self) -> float: ... - -class AxesImage(_ImageBase): - def __init__( - self, - ax: Axes, - cmap: str | Colormap = ..., - norm: Normalize = ..., - interpolation: str = ..., - origin: Literal["upper", "lower"] = ..., - extent: tuple = ..., - filternorm: bool = True, - filterrad: float = 4, - resample: bool = False, - *, - interpolation_stage: Literal["data", "rgba"] = ..., - **kwargs, - ) -> None: ... - def get_window_extent(self, renderer: RendererBase = ...): ... - def make_image(self, renderer: RendererBase, magnification: float = ..., unsampled=...): ... - def set_extent(self, extent: Sequence[float]) -> None: ... - def get_extent(self) -> tuple[float, float, float, float]: ... - def get_cursor_data(self, event: MouseEvent): ... - -class NonUniformImage(AxesImage): - mouseover = ... - def __init__(self, ax: Axes, *, interpolation: Literal["nearest", "bilinear"] = "nearest", **kwargs) -> None: ... - def make_image(self, renderer: RendererBase, magnification: float = ..., unsampled=...): ... - def set_data(self, x: ArrayLike, y: ArrayLike, A: ArrayLike) -> None: ... - def set_array(self, *args) -> None: ... - def set_interpolation(self, s: Literal["nearest", "bilinear"] | None) -> None: ... - def get_extent(self): ... - def set_filternorm(self, s) -> None: ... - def set_filterrad(self, s) -> None: ... - def set_norm(self, norm: Normalize | None) -> None: ... - def set_cmap(self, cmap: Colormap | str | None) -> None: ... - -class PcolorImage(AxesImage): - def __init__( - self, - ax: Axes, - x: ArrayLike = ..., - y: ArrayLike = ..., - A: ArrayLike = ..., - cmap: str | Colormap = ..., - norm: Normalize = ..., - **kwargs, - ) -> None: ... - def make_image(self, renderer: RendererBase, magnification: float = ..., unsampled=...): ... - def set_data(self, x: ArrayLike, y: ArrayLike, A: ArrayLike) -> None: ... - def set_array(self, *args) -> None: ... - def get_cursor_data(self, event: MouseEvent): ... - -class FigureImage(_ImageBase): - zorder = ... - - def __init__( - self, fig: Figure, cmap: Colormap = ..., norm: Normalize = ..., offsetx=..., offsety=..., origin=..., **kwargs - ) -> None: ... - def get_extent(self) -> tuple[float, float, float, float]: ... - def make_image(self, renderer: RendererBase, magnification: float = ..., unsampled=...): ... - def set_data(self, A) -> None: ... - -class BboxImage(_ImageBase): - def __init__( - self, - bbox: Bbox, - cmap: Colormap = ..., - norm: Normalize = ..., - interpolation=..., - origin=..., - filternorm=..., - filterrad=..., - resample=..., - **kwargs, - ) -> None: ... - def get_window_extent(self, renderer: RendererBase = ...) -> tuple[float, float, float, float]: ... - def contains(self, mouseevent: MouseEvent) -> bool: ... - def make_image(self, renderer: RendererBase, magnification: float = ..., unsampled=...): ... - -def imread(fname: str | FileLike, format: str = ...) -> np.ndarray: ... -def imsave( - fname: str | PathLike | FileLike, - arr: ArrayLike, - vmin: float = ..., - vmax: float = ..., - cmap: str | Colormap = ..., - format: str = ..., - origin: Literal["upper", "lower"] = ..., - dpi: float = ..., - *, - metadata: dict = ..., - pil_kwargs: dict = ..., -): ... -def pil_to_array(pilImage) -> np.ndarray: ... -def thumbnail( - infile: str | FileLike, - thumbfile: str | FileLike, - scale: float = ..., - interpolation: str = ..., - preview: bool = ..., -) -> Figure: ... diff --git a/stubs/matplotlib/layout_engine.pyi b/stubs/matplotlib/layout_engine.pyi deleted file mode 100644 index 4995faaf..00000000 --- a/stubs/matplotlib/layout_engine.pyi +++ /dev/null @@ -1,39 +0,0 @@ -from typing import Sequence - -from ._layoutgrid import LayoutGrid -from .figure import Figure, FigureBase -from .gridspec import GridSpecBase - -class LayoutEngine: - def __init__(self, **kwargs) -> None: ... - def set(self, **kwargs) -> None: ... - @property - def colorbar_gridspec(self) -> bool: ... - @property - def adjust_compatible(self) -> bool: ... - def get(self): ... - def execute(self, fig: Figure): ... - -class TightLayoutEngine(LayoutEngine): - def __init__( - self, *, pad: float = 1.08, h_pad: float = ..., w_pad: float = ..., rect: Sequence[float] = ..., **kwargs - ) -> None: ... - def execute(self, fig: Figure) -> None: ... - def set(self, *, pad: float = 1.08, w_pad: float = ..., h_pad: float = ..., rect: Sequence[float] = ...) -> None: ... - -class ConstrainedLayoutEngine(LayoutEngine): - def __init__( - self, - *, - h_pad: float = ..., - w_pad: float = ..., - hspace: float = ..., - wspace: float = ..., - rect: Sequence[float] = ..., - compress: bool = ..., - **kwargs, - ) -> None: ... - def execute(self, fig: Figure) -> dict[str | FigureBase | GridSpecBase, bool | LayoutGrid]: ... - def set( - self, *, h_pad: float = ..., w_pad: float = ..., hspace: float = ..., wspace: float = ..., rect: tuple = ... - ) -> None: ... diff --git a/stubs/matplotlib/legend.pyi b/stubs/matplotlib/legend.pyi deleted file mode 100644 index 78651aff..00000000 --- a/stubs/matplotlib/legend.pyi +++ /dev/null @@ -1,88 +0,0 @@ -from typing import Literal, Sequence - -from .artist import Artist, allow_rasterization -from .axes import Axes -from .backend_bases import Event, RendererBase -from .figure import Figure -from .font_manager import FontProperties -from .lines import Line2D -from .offsetbox import DraggableOffsetBox -from .patches import Patch, Rectangle -from .text import Text -from .transforms import Bbox, BboxBase, Transform - -class DraggableLegend(DraggableOffsetBox): - def __init__(self, legend: Legend, use_blit: bool = ..., update: Literal["loc", "bbox"] = ...) -> None: ... - def finalize_offset(self): ... - -class Legend(Artist): - codes = ... - zorder = ... - def __str__(self) -> str: ... - def __init__( - self, - parent: Axes | Figure, - handles: Sequence[Artist], - labels: Sequence[str], - loc=..., - numpoints=..., - markerscale=..., - markerfirst=..., - scatterpoints=..., - scatteryoffsets=..., - prop=..., - fontsize=..., - labelcolor=..., - borderpad=..., - labelspacing=..., - handlelength=..., - handleheight=..., - handletextpad=..., - borderaxespad=..., - columnspacing=..., - ncols=..., - mode=..., - fancybox=..., - shadow=..., - title=..., - title_fontsize=..., - framealpha=..., - edgecolor=..., - facecolor=..., - bbox_to_anchor=..., - bbox_transform=..., - frameon=..., - handler_map=..., - title_fontproperties=..., - *, - ncol=..., - ) -> None: ... - def set_ncols(self, ncols: int) -> None: ... - @allow_rasterization - def draw(self, renderer: RendererBase): ... - @classmethod - def get_default_handler_map(cls): ... - @classmethod - def set_default_handler_map(cls, handler_map: dict): ... - @classmethod - def update_default_handler_map(cls, handler_map: dict): ... - def get_legend_handler_map(self) -> dict: ... - @staticmethod - def get_legend_handler(legend_handler_map: dict, orig_handle): ... - def get_children(self): ... - def get_frame(self) -> Rectangle: ... - def get_lines(self) -> list[Line2D]: ... - def get_patches(self) -> list[Patch]: ... - def get_texts(self) -> list[Text]: ... - def set_title(self, title, prop: FontProperties = ...) -> None: ... - def get_title(self) -> Text: ... - def get_window_extent(self, renderer: RendererBase = ...): ... - def get_tightbbox(self, renderer: RendererBase = ...) -> Bbox: ... - def get_frame_on(self) -> bool: ... - def set_frame_on(self, b: bool) -> None: ... - draw_frame = ... - def get_bbox_to_anchor(self) -> Bbox: ... - def set_bbox_to_anchor(self, bbox: BboxBase | Sequence[float] | None, transform: Transform = ...) -> None: ... - def contains(self, event: Event) -> bool: ... - def set_draggable(self, state: bool, use_blit: bool = ..., update: Literal["loc", "bbox"] = ...) -> DraggableLegend: ... - def get_draggable(self) -> bool: ... diff --git a/stubs/matplotlib/legend_handler.pyi b/stubs/matplotlib/legend_handler.pyi deleted file mode 100644 index d3349acb..00000000 --- a/stubs/matplotlib/legend_handler.pyi +++ /dev/null @@ -1,217 +0,0 @@ -from collections.abc import Sequence -from typing import Callable, Sequence - -from .artist import Artist -from .container import BarContainer -from .legend import Legend -from .lines import Line2D -from .offsetbox import OffsetBox -from .patches import Rectangle - -def update_from_first_child(tgt: Rectangle, src: BarContainer) -> None: ... - -class HandlerBase: - def __init__( - self, - xpad: float = ..., - ypad: float = ..., - update_func: Callable = ..., - ) -> None: ... - def update_prop(self, legend_handle: Artist, orig_handle: Artist, legend: Legend): ... - def adjust_drawing_area( - self, - legend: Legend, - orig_handle: Artist, - xdescent, - ydescent, - width, - height, - fontsize: int, - ): ... - def legend_artist(self, legend: Legend, orig_handle: Artist, fontsize: int, handlebox: OffsetBox): ... - def create_artists( - self, - legend: Legend, - orig_handle: Artist, - xdescent, - ydescent, - width, - height, - fontsize: int, - trans, - ): ... - -class HandlerNpoints(HandlerBase): - def __init__(self, marker_pad: float = ..., numpoints: None = ..., **kwargs) -> None: ... - def get_numpoints(self, legend: Legend): ... - def get_xdata(self, legend: Legend, xdescent, ydescent, width, height, fontsize: int): ... - -class HandlerNpointsYoffsets(HandlerNpoints): - def __init__(self, numpoints: int = ..., yoffsets: Sequence[float] = ..., **kwargs) -> None: ... - def get_ydata(self, legend: Legend, xdescent, ydescent, width, height, fontsize: int): ... - -class HandlerLine2DCompound(HandlerNpoints): - def create_artists( - self, - legend: Legend, - orig_handle: Artist, - xdescent, - ydescent, - width, - height, - fontsize: int, - trans, - ): ... - -class _Line2DHandleList(Sequence): - def __init__(self, legline: Line2D) -> None: ... - def __len__(self): ... - def __getitem__(self, index: int) -> Line2D: ... - -class HandlerLine2D(HandlerNpoints): - def create_artists( - self, - legend: Legend, - orig_handle: Artist, - xdescent, - ydescent, - width, - height, - fontsize: int, - trans, - ): ... - -class HandlerPatch(HandlerBase): - def __init__(self, patch_func: None = ..., **kwargs) -> None: ... - def create_artists( - self, - legend: Legend, - orig_handle: Artist, - xdescent, - ydescent, - width, - height, - fontsize: int, - trans, - ): ... - -class HandlerStepPatch(HandlerBase): - def create_artists( - self, - legend: Legend, - orig_handle: Artist, - xdescent, - ydescent, - width, - height, - fontsize: int, - trans, - ): ... - -class HandlerLineCollection(HandlerLine2D): - def get_numpoints(self, legend: Legend): ... - def create_artists( - self, - legend: Legend, - orig_handle: Artist, - xdescent, - ydescent, - width, - height, - fontsize: int, - trans, - ): ... - -class HandlerRegularPolyCollection(HandlerNpointsYoffsets): - def __init__(self, yoffsets=..., sizes=..., **kwargs) -> None: ... - def get_numpoints(self, legend: Legend): ... - def get_sizes( - self, - legend: Legend, - orig_handle: Artist, - xdescent, - ydescent, - width, - height, - fontsize: int, - ): ... - def update_prop(self, legend_handle: Artist, orig_handle: Artist, legend: Legend): ... - def create_collection(self, orig_handle, sizes, offsets, offset_transform): ... - def create_artists( - self, - legend: Legend, - orig_handle: Artist, - xdescent, - ydescent, - width, - height, - fontsize: int, - trans, - ): ... - -class HandlerPathCollection(HandlerRegularPolyCollection): - def create_collection(self, orig_handle: Artist, sizes, offsets, offset_transform): ... - -class HandlerCircleCollection(HandlerRegularPolyCollection): - def create_collection(self, orig_handle: Artist, sizes, offsets, offset_transform): ... - -class HandlerErrorbar(HandlerLine2D): - def __init__( - self, xerr_size: float = ..., yerr_size: float = ..., marker_pad: float = ..., numpoints: int = ..., **kwargs - ) -> None: ... - def get_err_size(self, legend: Legend, xdescent, ydescent, width, height, fontsize: int): ... - def create_artists( - self, - legend: Legend, - orig_handle: Artist, - xdescent, - ydescent, - width, - height, - fontsize: int, - trans, - ): ... - -class HandlerStem(HandlerNpointsYoffsets): - def __init__( - self, marker_pad: float = 0.3, numpoints: int = ..., bottom: float = ..., yoffsets: Sequence[float] = ..., **kwargs - ) -> None: ... - def get_ydata(self, legend: Legend, xdescent, ydescent, width, height, fontsize: int): ... - def create_artists( - self, - legend: Legend, - orig_handle: Artist, - xdescent, - ydescent, - width, - height, - fontsize: int, - trans, - ): ... - -class HandlerTuple(HandlerBase): - def __init__(self, ndivide: int = 1, pad: float = ..., **kwargs) -> None: ... - def create_artists( - self, - legend: Legend, - orig_handle: Artist, - xdescent, - ydescent, - width, - height, - fontsize: int, - trans, - ): ... - -class HandlerPolyCollection(HandlerBase): - def create_artists( - self, - legend: Legend, - orig_handle: Artist, - xdescent, - ydescent, - width, - height, - fontsize: int, - trans, - ): ... diff --git a/stubs/matplotlib/lines.pyi b/stubs/matplotlib/lines.pyi deleted file mode 100644 index e70e91ef..00000000 --- a/stubs/matplotlib/lines.pyi +++ /dev/null @@ -1,124 +0,0 @@ -from typing import Any, Callable, Literal, Sequence - -import numpy as np -from matplotlib.markers import MarkerStyle - -from ._enums import CapStyle, JoinStyle -from ._typing import * -from .artist import Artist, allow_rasterization -from .backend_bases import Event, MouseEvent, RendererBase -from .backends.backend_agg import RendererAgg -from .path import Path -from .transforms import Bbox, Transform - -def segment_hits(cx, cy, x, y, radius): ... - -class Line2D(Artist): - lineStyles = ... - - drawStyles = ... - drawStyleKeys = ... - markers = ... - filled_markers = ... - fillStyles = ... - zorder = ... - def __str__(self) -> str: ... - def __init__( - self, - xdata: Sequence[float], - ydata: Sequence[float], - linewidth: float = ..., - linestyle=..., - color: Color = ..., - marker: str = ..., - markersize: float = ..., - markeredgewidth: float = ..., - markeredgecolor: Color = ..., - markerfacecolor: Color = ..., - markerfacecoloralt: Color = ..., - fillstyle: Literal["full", "left", "right", "bottom", "top", "none"] = ..., - antialiased: bool = ..., - dash_capstyle: CapStyle = ..., - solid_capstyle: CapStyle = ..., - dash_joinstyle: JoinStyle = ..., - solid_joinstyle: JoinStyle = ..., - pickradius: float = ..., - drawstyle: Literal["default", "steps", "steps-pre", "steps-mid", "steps-post"] = "default", - markevery=..., - **kwargs, - ) -> None: ... - def contains(self, mouseevent: MouseEvent): ... - def get_pickradius(self) -> float: ... - def set_pickradius(self, d: float) -> None: ... - pickradius = ... - def get_fillstyle(self) -> str: ... - def set_fillstyle(self, fs: Literal["full", "left", "right", "bottom", "top", "none"]) -> None: ... - def set_markevery(self, every) -> None: ... - def get_markevery(self) -> Any: ... - def set_picker(self, p: Callable | float) -> None: ... - def get_bbox(self) -> Bbox: ... - def get_window_extent(self, renderer: RendererBase = ...): ... - def set_data(self, *args) -> None: ... - def recache_always(self) -> bool: ... - def recache(self, always: bool = ...) -> None: ... - def set_transform(self, t: Transform): ... - @allow_rasterization - def draw(self, renderer: RendererBase): ... - def get_antialiased(self) -> bool: ... - def get_color(self) -> str: ... - def get_drawstyle(self) -> str: ... - def get_linestyle(self) -> str: ... - def get_linewidth(self) -> float: ... - def get_marker(self) -> int | str: ... - def get_markeredgecolor(self) -> Color: ... - def get_markeredgewidth(self) -> float: ... - def get_markerfacecolor(self) -> Color: ... - def get_markerfacecoloralt(self) -> Color: ... - def get_markersize(self) -> float: ... - def get_data(self, orig: bool = False) -> tuple[Sequence[float], Sequence[float]]: ... - def get_xdata(self, orig: bool = False) -> Sequence[float]: ... - def get_ydata(self, orig: bool = False) -> Sequence[float]: ... - def get_path(self) -> Path: ... - def get_xydata(self) -> np.ndarray: ... - def set_antialiased(self, b: bool) -> None: ... - def set_color(self, color: Color) -> None: ... - def set_drawstyle( - self, - drawstyle: Literal["default", "steps", "steps-pre", "steps-mid", "steps-post"] = "default", - ) -> None: ... - def set_linewidth(self, w: float) -> None: ... - def set_linestyle(self, ls: Any) -> None: ... - def set_marker(self, marker: str | Path | MarkerStyle) -> None: ... - def set_markeredgecolor(self, ec: Color) -> None: ... - def set_markerfacecolor(self, fc: Color) -> None: ... - def set_markerfacecoloralt(self, fc: Color) -> None: ... - def set_markeredgewidth(self, ew: float) -> None: ... - def set_markersize(self, sz: float) -> None: ... - def set_xdata(self, x: ArrayLike) -> None: ... - def set_ydata(self, y: ArrayLike) -> None: ... - def set_dashes(self, seq: Sequence[int]) -> None: ... - def update_from(self, other: Line2D) -> None: ... - def set_dash_joinstyle(self, s: JoinStyle) -> None: ... - def set_solid_joinstyle(self, s: JoinStyle | str) -> None: ... - def get_dash_joinstyle(self) -> JoinStyle | str: ... - def get_solid_joinstyle(self) -> JoinStyle | str: ... - def set_dash_capstyle(self, s: CapStyle | str) -> None: ... - def set_solid_capstyle(self, s: CapStyle | str) -> None: ... - def get_dash_capstyle(self) -> CapStyle | str: ... - def get_solid_capstyle(self) -> CapStyle | str: ... - def is_dashed(self) -> bool: ... - -class _AxLine(Line2D): - def __init__(self, xy1: Sequence[float], xy2: Sequence[float], slope: float, **kwargs) -> None: ... - def get_transform(self): ... - def draw(self, renderer: RendererAgg) -> None: ... - -class VertexSelector: - def __init__(self, line: Line2D) -> None: ... - def process_selected(self, ind: Sequence[int], xs: ArrayLike, ys: ArrayLike): ... - def onpick(self, event: Event): ... - -lineStyles = ... -lineMarkers = ... -drawStyles = ... -fillStyles = ... diff --git a/stubs/matplotlib/markers.pyi b/stubs/matplotlib/markers.pyi deleted file mode 100644 index e95cf7ac..00000000 --- a/stubs/matplotlib/markers.pyi +++ /dev/null @@ -1,35 +0,0 @@ -from typing import Literal - -from ._enums import CapStyle, JoinStyle -from ._typing import * -from .path import Path -from .transforms import Affine2D, Transform - -class MarkerStyle: - markers: list = ... - filled_markers: list = ... - fillstyles: list = ... - - def __init__( - self, - marker: str | ArrayLike | Path | MarkerStyle | None = ..., - fillstyle: Literal["full", "left", "right", "bottom", "top", "none"] = ..., - transform: Transform = ..., - capstyle: CapStyle = ..., - joinstyle: JoinStyle = ..., - ) -> None: ... - def __bool__(self) -> bool: ... - def is_filled(self) -> bool: ... - def get_fillstyle(self) -> str: ... - def get_joinstyle(self) -> JoinStyle: ... - def get_capstyle(self) -> CapStyle: ... - def get_marker(self): ... - def get_path(self) -> Path: ... - def get_transform(self) -> Transform: ... - def get_alt_path(self) -> Path: ... - def get_alt_transform(self) -> Transform: ... - def get_snap_threshold(self): ... - def get_user_transform(self): ... - def transformed(self, transform: Affine2D | None = ...): ... - def rotated(self, *, deg: float = ..., rad: float = ...): ... - def scaled(self, sx: float, sy: float = ...): ... diff --git a/stubs/matplotlib/mathtext.pyi b/stubs/matplotlib/mathtext.pyi deleted file mode 100644 index 88997093..00000000 --- a/stubs/matplotlib/mathtext.pyi +++ /dev/null @@ -1,44 +0,0 @@ -from types import SimpleNamespace - -from ._typing import * -from .font_manager import FontProperties - -get_unicode_index = ... - -class MathtextBackend: - def __init__(self) -> None: ... - def set_canvas_size(self, w: float, h: float, d: float) -> None: ... - def render_glyph(self, ox: float, oy: float, info: SimpleNamespace): ... - def render_rect_filled(self, x1: float, y1: float, x2: float, y2: float): ... - def get_results(self, box) -> tuple: ... - def get_hinting_type(self) -> int: ... - -class MathtextBackendAgg(MathtextBackend): - def __init__(self) -> None: ... - def set_canvas_size(self, w: float, h: float, d: float) -> None: ... - def render_glyph(self, ox: float, oy: float, info: SimpleNamespace) -> None: ... - def render_rect_filled(self, x1: float, y1: float, x2: float, y2: float) -> None: ... - def get_results(self, box): ... - def get_hinting_type(self) -> int: ... - -class MathtextBackendPath(MathtextBackend): - def __init__(self) -> None: ... - def render_glyph(self, ox: float, oy: float, info: SimpleNamespace) -> None: ... - def render_rect_filled(self, x1: float, y1: float, x2: float, y2: float) -> None: ... - def get_results(self, box): ... - -class MathTextWarning(Warning): ... - -class MathTextParser: - def __init__(self, output: str) -> None: ... - def parse(self, s: str, dpi: float = ..., prop: FontProperties = ...): ... - -def math_to_image( - s: str, - filename_or_obj: str | PathLike | FileLike, - prop: FontProperties = ..., - dpi: float = ..., - format: str = ..., - *, - color: str = ..., -): ... diff --git a/stubs/matplotlib/mlab.pyi b/stubs/matplotlib/mlab.pyi deleted file mode 100644 index 28807864..00000000 --- a/stubs/matplotlib/mlab.pyi +++ /dev/null @@ -1,78 +0,0 @@ -from typing import Callable, Literal, Sequence - -import numpy as np - -from ._typing import * - -def window_hanning(x): ... -def window_none(x): ... -def detrend( - x: Sequence, - key: Literal["default", "constant", "mean", "linear", "none"] | Callable = ..., - axis: int = ..., -) -> Sequence: ... -def detrend_mean(x: Sequence, axis: int = ...) -> Sequence: ... -def detrend_none(x, axis: int = ...): ... -def detrend_linear(y: Sequence) -> Sequence: ... -def stride_windows(x: Sequence, n: int, noverlap: int = ..., axis: int = ...): ... -def psd( - x: Sequence, - NFFT: int = ..., - Fs: float = ..., - detrend: Literal["none", "mean", "linear"] | Callable = ..., - window: Callable | np.ndarray = ..., - noverlap: int = 0, - pad_to: int = ..., - sides: Literal["default", "onesided", "twosided"] = ..., - scale_by_freq: bool = ..., -) -> tuple[np.ndarray, np.ndarray]: ... -def csd( - x: ArrayLike, - y: ArrayLike, - NFFT: int = ..., - Fs: float = ..., - detrend: Literal["none", "mean", "linear"] | Callable = ..., - window: Callable | np.ndarray = ..., - noverlap: int = 0, - pad_to: int = ..., - sides: Literal["default", "onesided", "twosided"] = ..., - scale_by_freq: bool = ..., -) -> tuple[np.ndarray, np.ndarray]: ... - -complex_spectrum = ... -magnitude_spectrum = ... -angle_spectrum = ... -phase_spectrum = ... - -def specgram( - x: ArrayLike, - NFFT: int = ..., - Fs: float = ..., - detrend: Literal["none", "mean", "linear"] | Callable = ..., - window: Callable | np.ndarray = ..., - noverlap: int = 0, - pad_to: int = ..., - sides: Literal["default", "onesided", "twosided"] = ..., - scale_by_freq: bool = ..., - mode: str = ..., -) -> tuple[ArrayLike, ArrayLike, ArrayLike]: ... -def cohere( - x, - y, - NFFT: int = ..., - Fs: float = ..., - detrend: Literal["none", "mean", "linear"] | Callable = ..., - window: Callable | np.ndarray = ..., - noverlap: int = 0, - pad_to: int = ..., - sides: Literal["default", "onesided", "twosided"] = ..., - scale_by_freq: bool = ..., -) -> tuple[np.ndarray, np.ndarray]: ... - -class GaussianKDE: - def __init__(self, dataset: ArrayLike, bw_method: str | Scalar | Callable = ...) -> None: ... - def scotts_factor(self): ... - def silverman_factor(self): ... - - covariance_factor = ... - def evaluate(self, points) -> np.ndarray: ... diff --git a/stubs/matplotlib/offsetbox.pyi b/stubs/matplotlib/offsetbox.pyi deleted file mode 100644 index 1050ff02..00000000 --- a/stubs/matplotlib/offsetbox.pyi +++ /dev/null @@ -1,222 +0,0 @@ -from typing import Any, Callable, Literal, Sequence - -from ._typing import * -from .artist import Artist -from .backend_bases import Event, MouseEvent, RendererBase -from .colors import Colormap, Normalize -from .figure import Figure -from .font_manager import FontProperties -from .patches import FancyBboxPatch -from .text import _AnnotationBase -from .transforms import Bbox, BboxBase, Transform - -DEBUG = ... - -def bbox_artist(*args, **kwargs): ... - -class OffsetBox(Artist): - def __init__(self, *args, **kwargs) -> None: ... - def set_figure(self, fig: Figure): ... - def axes(self, ax): ... - def contains(self, mouseevent: MouseEvent) -> tuple[bool, dict]: ... - def set_offset(self, xy: Callable): ... - def get_offset(self, width, height, xdescent, ydescent, renderer: RendererBase) -> tuple[float, float]: ... - def set_width(self, width: float): ... - def set_height(self, height: float): ... - def get_visible_children(self) -> list[Artist]: ... - def get_children(self) -> list[Artist]: ... - def get_extent_offsets(self, renderer: RendererBase) -> tuple[float, float, float, float, list[tuple[float, float]]]: ... - def get_extent(self, renderer: RendererBase) -> tuple[float, float, float, float]: ... - def get_window_extent(self, renderer: RendererBase = ...): ... - def draw(self, renderer: RendererBase): ... - -class PackerBase(OffsetBox): - def __init__( - self, - pad: float = ..., - sep: float = ..., - width: float = ..., - height: float = ..., - align: Literal["top", "bottom", "left", "right", "center", "baseline"] = "baseline", - mode: Literal["fixed", "expand", "equal"] = "fixed", - children: list[Artist] = ..., - ) -> None: ... - -class VPacker(PackerBase): - def get_extent_offsets(self, renderer: RendererBase) -> list: ... - -class HPacker(PackerBase): - def get_extent_offsets(self, renderer: RendererBase) -> list: ... - -class PaddedBox(OffsetBox): - def __init__( - self, - child: Artist, - pad: float = ..., - draw_frame: bool = ..., - patch_attrs: dict | None = ..., - ) -> None: ... - def get_extent_offsets(self, renderer: RendererBase) -> list: ... - def draw(self, renderer: RendererBase): ... - def update_frame(self, bbox: Bbox, fontsize: float = ...): ... - def draw_frame(self, renderer: RendererBase): ... - -class DrawingArea(OffsetBox): - def __init__( - self, - width: float, - height: float, - xdescent: float = ..., - ydescent: float = ..., - clip: bool = ..., - ) -> None: ... - @property - def clip_children(self): ... - @clip_children.setter - def clip_children(self, val): ... - def get_transform(self) -> Transform: ... - def set_transform(self, t) -> None: ... - def set_offset(self, xy: Sequence[float]) -> None: ... - def get_offset(self) -> tuple[float, float]: ... - def get_window_extent(self, renderer: RendererBase = ...): ... - def get_extent(self, renderer: RendererBase): ... - def add_artist(self, a: Artist): ... - def draw(self, renderer: RendererBase): ... - -class TextArea(OffsetBox): - def __init__(self, s: str, textprops: dict = ..., multilinebaseline: bool = False) -> None: ... - def set_text(self, s: str): ... - def get_text(self) -> str: ... - def set_multilinebaseline(self, t: bool): ... - def get_multilinebaseline(self) -> bool: ... - def set_transform(self, t: Transform) -> None: ... - def set_offset(self, xy: Sequence[float]) -> None: ... - def get_offset(self) -> tuple[float, float]: ... - def get_window_extent(self, renderer: RendererBase = ...): ... - def get_extent(self, renderer: RendererBase): ... - def draw(self, renderer: RendererBase): ... - -class AuxTransformBox(OffsetBox): - def __init__(self, aux_transform) -> None: ... - def add_artist(self, a: Artist): ... - def get_transform(self) -> Transform: ... - def set_transform(self, t: Transform): ... - def set_offset(self, xy: Sequence[float]): ... - def get_offset(self) -> tuple[float, float]: ... - def get_window_extent(self, renderer: RendererBase = ...): ... - def get_extent(self, renderer: RendererBase): ... - def draw(self, renderer: RendererBase): ... - -class AnchoredOffsetbox(OffsetBox): - zorder = ... - codes = ... - - def __init__( - self, - loc: str, - pad: float = ..., - borderpad: float = ..., - child: OffsetBox = ..., - prop: FontProperties = ..., - frameon: bool = ..., - bbox_to_anchor: BboxBase | Sequence[float] = ..., - bbox_transform: Transform | None = ..., - **kwargs, - ) -> None: ... - def set_child(self, child): ... - def get_child(self): ... - def get_children(self) -> list: ... - def get_extent(self, renderer: RendererBase): ... - def get_bbox_to_anchor(self) -> Bbox: ... - def set_bbox_to_anchor(self, bbox: Bbox, transform: Transform = ...): ... - def get_window_extent(self, renderer: RendererBase = ...): ... - def update_frame(self, bbox: Bbox, fontsize: float = ...): ... - def draw(self, renderer: RendererBase): ... - -class AnchoredText(AnchoredOffsetbox): - patch: FancyBboxPatch - - def __init__(self, s: str, loc: str, pad: float = ..., borderpad: float = ..., prop: dict = ..., **kwargs) -> None: ... - -class OffsetImage(OffsetBox): - def __init__( - self, - arr, - zoom: float = ..., - cmap: Colormap = ..., - norm: Normalize = ..., - interpolation=..., - origin=..., - filternorm=..., - filterrad=..., - resample=..., - dpi_cor=..., - **kwargs, - ) -> None: ... - def set_data(self, arr: ArrayLike): ... - def get_data(self): ... - def set_zoom(self, zoom: float): ... - def get_zoom(self) -> float: ... - def get_offset(self): ... - def get_children(self): ... - def get_window_extent(self, renderer: RendererBase = ...): ... - def get_extent(self, renderer: RendererBase): ... - def draw(self, renderer: RendererBase): ... - -class AnnotationBbox(Artist, _AnnotationBase): - zorder = ... - def __str__(self) -> str: ... - def __init__( - self, - offsetbox, - xy: Sequence[float], - xybox: Sequence[float] = ..., - xycoords: str | Artist | Transform | Callable | Sequence[float] = "data", - boxcoords: str | Artist | Transform | Callable | Sequence[float] = ..., - frameon: bool = True, - pad: float = 0.4, - annotation_clip=..., - box_alignment: Sequence[float] = ..., - bboxprops=..., - arrowprops=..., - fontsize: float = ..., - **kwargs, - ) -> None: ... - @property - def xyann(self): ... - @xyann.setter - def xyann(self, xyann): ... - @property - def anncoords(self): ... - @anncoords.setter - def anncoords(self, coords): ... - def contains(self, mouseevent: MouseEvent): ... - def get_children(self) -> list: ... - def set_figure(self, fig: Figure): ... - def set_fontsize(self, s: float = ...): ... - def get_fontsize(self) -> float: ... - def get_window_extent(self, renderer: RendererBase = ...): ... - def get_tightbbox(self, renderer: RendererBase = ...) -> Bbox: ... - def update_positions(self, renderee: RendererBase): ... - def draw(self, renderer: RendererBase): ... - -class DraggableBase: - def __init__(self, ref_artist, use_blit: bool = ...) -> None: ... - def on_motion(self, evt: Event): ... - def on_pick(self, evt: Event): ... - def on_release(self, event: Event): ... - def disconnect(self): ... - def save_offset(self): ... - def update_offset(self, dx: float, dy: float): ... - def finalize_offset(self): ... - -class DraggableOffsetBox(DraggableBase): - def __init__(self, ref_artist, offsetbox, use_blit: bool = ...) -> None: ... - def save_offset(self): ... - def update_offset(self, dx: float, dy: float): ... - def get_loc_in_canvas(self): ... - -class DraggableAnnotation(DraggableBase): - def __init__(self, annotation, use_blit: bool = ...) -> None: ... - def save_offset(self): ... - def update_offset(self, dx: float, dy: float): ... diff --git a/stubs/matplotlib/patches.pyi b/stubs/matplotlib/patches.pyi deleted file mode 100644 index 85c1fed4..00000000 --- a/stubs/matplotlib/patches.pyi +++ /dev/null @@ -1,548 +0,0 @@ -from typing import Literal, Sequence - -import numpy as np - -from ._enums import CapStyle, JoinStyle -from ._typing import * -from .artist import Artist, allow_rasterization -from .backend_bases import MouseEvent, RendererBase -from .path import Path -from .transforms import Bbox, Transform - -class Patch(Artist): - zorder: float = ... - - def __init__( - self, - edgecolor: Color = ..., - facecolor: Color = ..., - color: Color = ..., - linewidth: float = ..., - linestyle=..., - antialiased: bool = ..., - hatch=..., - fill=..., - capstyle: CapStyle = ..., - joinstyle: JoinStyle = ..., - **kwargs, - ) -> None: ... - def get_verts(self): ... - def contains(self, mouseevent: MouseEvent, radius: float = ...): ... - def contains_point(self, point: Sequence[float], radius: float = ...) -> bool: ... - def contains_points(self, points: ArrayLike, radius: float = ...) -> list[bool]: ... - def update_from(self, other: Patch): ... - def get_extents(self) -> Bbox: ... - def get_transform(self) -> Transform: ... - def get_data_transform(self) -> Transform: ... - def get_patch_transform(self) -> Transform: ... - def get_antialiased(self) -> bool: ... - def get_edgecolor(self) -> Color: ... - def get_facecolor(self) -> Color: ... - def get_linewidth(self) -> float: ... - def get_linestyle(self): ... - def set_antialiased(self, aa: bool | None): ... - def set_edgecolor(self, color: Color | None): ... - def set_facecolor(self, color: Color | None): ... - def set_color(self, c: Color): ... - def set_alpha(self, alpha: Scalar | None): ... - def set_linewidth(self, w: float | None): ... - def set_linestyle( - self, - ls: Literal[ - "-", - "solid", - "--", - "dashed", - "-.", - "dashdot", - ":", - "dotted", - "None", - "none", - " ", - "", - ], - ): ... - def set_fill(self, b: bool): ... - def get_fill(self) -> bool: ... - fill = ... - - def set_capstyle(self, s: CapStyle | Literal["butt", "projecting", "round"]): ... - def get_capstyle(self) -> CapStyle: ... - def set_joinstyle(self, s: JoinStyle | Literal["miter", "round", "bevel"]): ... - def get_joinstyle(self) -> JoinStyle | str: ... - def set_hatch(self, hatch: Literal["/", "\\", "|", "-", "+", "x", "o", "O", ".", "*"]): ... - def get_hatch(self) -> str: ... - @allow_rasterization - def draw(self, renderer: RendererBase): ... - def get_path(self) -> Path: ... - def get_window_extent(self, renderer: RendererBase = ...): ... - -class Shadow(Patch): - def __str__(self) -> str: ... - def __init__(self, patch: Patch, ox: float, oy: float, **kwargs) -> None: ... - def get_path(self) -> Path: ... - def get_patch_transform(self) -> Transform: ... - def draw(self, renderer: RendererBase): ... - -class Rectangle(Patch): - def __str__(self) -> str: ... - def __init__( - self, - xy: Sequence[float], - width: float, - height: float, - angle: float = 0, - *, - rotation_point: Literal["xy", "center"] | Sequence[float] = "xy", - **kwargs, - ) -> None: ... - def get_path(self) -> Path: ... - def get_patch_transform(self): ... - @property - def rotation_point(self): ... - @rotation_point.setter - def rotation_point(self, value): ... - def get_x(self) -> float: ... - def get_y(self) -> float: ... - def get_xy(self) -> tuple[float, float]: ... - def get_corners(self) -> list[tuple[float, float]]: ... - def get_center(self) -> tuple[float, float]: ... - def get_width(self) -> float: ... - def get_height(self) -> float: ... - def get_angle(self) -> float: ... - def set_x(self, x: float): ... - def set_y(self, y: float): ... - def set_angle(self, angle: float): ... - def set_xy(self, xy: Sequence[float]): ... - def set_width(self, w: float): ... - def set_height(self, h: float): ... - def set_bounds(self, *args): ... - def get_bbox(self) -> Bbox: ... - xy: tuple[float, float] = ... - -class RegularPolygon(Patch): - def __str__(self) -> str: ... - def __init__( - self, xy: Sequence[float], numVertices: int, radius: float = ..., orientation: float = ..., **kwargs - ) -> None: ... - def get_path(self) -> Path: ... - def get_patch_transform(self) -> Transform: ... - -class PathPatch(Patch): - def __str__(self) -> str: ... - def __init__(self, path: Path, **kwargs) -> None: ... - def get_path(self) -> Path: ... - def set_path(self, path: Path): ... - -class StepPatch(PathPatch): - def __init__( - self, - values: ArrayLike, - edges: ArrayLike, - *, - orientation: Literal["vertical", "horizontal"] = "vertical", - baseline: float | ArrayLike | None = 0, - **kwargs, - ) -> None: ... - def get_data(self): ... - def set_data( - self, - values: ArrayLike | None = ..., - edges: ArrayLike = ..., - baseline: float | ArrayLike | None = ..., - ): ... - -class Polygon(Patch): - def __str__(self) -> str: ... - def __init__(self, xy: Sequence[float], closed: bool = ..., **kwargs) -> None: ... - def get_path(self) -> Path: ... - def get_closed(self) -> bool: ... - def set_closed(self, closed: bool): ... - def get_xy(self) -> np.ndarray: ... - def set_xy(self, xy: ArrayLike): ... - xy = ... - -class Wedge(Patch): - def __str__(self) -> str: ... - def __init__(self, center: Sequence[float], r: float, theta1: float, theta2: float, width: float = ..., **kwargs) -> None: ... - def set_center(self, center: Sequence[float]): ... - def set_radius(self, radius: float): ... - def set_theta1(self, theta1: float): ... - def set_theta2(self, theta2: float): ... - def set_width(self, widt: float): ... - def get_path(self) -> Path: ... - -class Arrow(Patch): - def __str__(self) -> str: ... - def __init__(self, x: float, y: float, dx: float, dy: float, width: float = ..., **kwargs) -> None: ... - def get_path(self) -> Path: ... - def get_patch_transform(self) -> Transform: ... - -class FancyArrow(Polygon): - def __str__(self) -> str: ... - def __init__( - self, - x: float, - y: float, - dx: float, - dy: float, - width: float = 0.001, - length_includes_head: bool = False, - head_width: float = ..., - head_length: float | None = ..., - shape: Literal["full", "left", "right"] = "full", - overhang: float = 0, - head_starts_at_zero: bool = False, - **kwargs, - ) -> None: ... - def set_data( - self, - *, - x: float | None = None, - y: float | None = None, - dx: float | None = None, - dy: float | None = None, - width: float | None = None, - head_width: float | None = None, - head_length: float | None = None, - ): ... - -class CirclePolygon(RegularPolygon): - def __str__(self) -> str: ... - def __init__(self, xy: Sequence[float], radius: float = ..., resolution=..., **kwargs) -> None: ... - -class Ellipse(Patch): - def __str__(self) -> str: ... - def __init__(self, xy: Sequence[float], width: float, height: float, angle: float = 0, **kwargs) -> None: ... - def get_path(self) -> Path: ... - def get_patch_transform(self) -> Transform: ... - def set_center(self, xy: Sequence[float]): ... - def get_center(self) -> tuple[float, float]: ... - center = ... - def set_width(self, width: float): ... - def get_width(self) -> float: ... - width = ... - def set_height(self, height: float): ... - def get_height(self) -> float: ... - height = ... - def set_angle(self, angle: float): ... - def get_angle(self) -> float: ... - angle = ... - def get_corners(self): ... - -class Annulus(Patch): - def __init__(self, xy: Sequence[float], r: float | Sequence[float], width: float, angle: float = 0, **kwargs) -> None: ... - def __str__(self) -> str: ... - def set_center(self, xy: Sequence[float]): ... - def get_center(self) -> tuple[float, float]: ... - center = ... - def set_width(self, width: float): ... - def get_width(self) -> float: ... - width = ... - def set_angle(self, angle: float): ... - def get_angle(self) -> float: ... - angle = ... - def set_semimajor(self, a: float): ... - def set_semiminor(self, b: float): ... - def set_radii(self, r: float): ... - def get_radii(self) -> float: ... - radii = ... - def get_path(self) -> Path: ... - -class Circle(Ellipse): - def __str__(self) -> str: ... - def __init__(self, xy: Sequence[float], radius: float = ..., **kwargs) -> None: ... - def set_radius(self, radius: float): ... - def get_radius(self) -> float: ... - radius: float = ... - -class Arc(Ellipse): - def __str__(self) -> str: ... - def __init__( - self, xy: Sequence[float], width: float, height: float, angle: float = 0, theta1: float = 0, theta2: float = 360, **kwargs - ) -> None: ... - @allow_rasterization - def draw(self, renderer: RendererBase): ... - -def bbox_artist(artist, renderer: RendererBase, props: dict = ..., fill=...): ... -def draw_bbox(bbox, renderer: RendererBase, color: Color = ..., trans: Transform = ...): ... - -class _Style: - def __new__(cls, stylename: str, **kwargs): ... - @classmethod - def get_styles(cls): ... - @classmethod - def pprint_styles(cls): ... - @classmethod - def register(cls, name: str, style: _Style): ... - -class BoxStyle(_Style): - class Square: - def __init__(self, pad: float = 0.3) -> None: ... - def __call__(self, x0: float, y0: float, width: float, height: float, mutation_size): ... - - class Circle: - def __init__(self, pad: float = 0.3) -> None: ... - def __call__(self, x0: float, y0: float, width: float, height: float, mutation_size): ... - - class LArrow: - def __init__(self, pad: float = 0.3) -> None: ... - def __call__(self, x0, y0, width, height, mutation_size): ... - - class RArrow(LArrow): - def __call__(self, x0: float, y0: float, width: float, height: float, mutation_size): ... - - class DArrow: - def __init__(self, pad: float = 0.3) -> None: ... - def __call__(self, x0: float, y0: float, width: float, height: float, mutation_size): ... - - class Round: - def __init__(self, pad=0.3, rounding_size: float = ...) -> None: ... - def __call__(self, x0: float, y0: float, width: float, height: float, mutation_size): ... - - class Round4: - def __init__(self, pad: float = 0.3, rounding_size: float = ...) -> None: ... - def __call__(self, x0: float, y0: float, width: float, height: float, mutation_size): ... - - class Sawtooth: - def __init__(self, pad: float = 0.3, tooth_size: float = ...) -> None: ... - def __call__(self, x0: float, y0: float, width: float, height: float, mutation_size): ... - - class Roundtooth(Sawtooth): - def __call__(self, x0: float, y0: float, width: float, height: float, mutation_size): ... - -class ConnectionStyle(_Style): - class _Base: - class SimpleEvent: - def __init__(self, xy: Sequence[float]) -> None: ... - - def __call__(self, posA, posB, shrinkA=..., shrinkB=..., patchA=..., patchB=...): ... - - class Arc3(_Base): - def __init__(self, rad=...) -> None: ... - def connect(self, posA, posB): ... - - class Angle3(_Base): - def __init__(self, angleA: float = ..., angleB: float = ...) -> None: ... - def connect(self, posA, posB): ... - - class Angle(_Base): - def __init__(self, angleA: float = ..., angleB: float = ..., rad: float = ...) -> None: ... - def connect(self, posA, posB): ... - - class Arc(_Base): - def __init__( - self, - angleA: float = ..., - angleB: float = ..., - armA: float = ..., - armB: float = ..., - rad: float = ..., - ) -> None: ... - def connect(self, posA, posB): ... - - class Bar(_Base): - def __init__( - self, - armA: float = ..., - armB: float = ..., - fraction: float = ..., - angle: float = ..., - ) -> None: ... - def connect(self, posA, posB): ... - -class ArrowStyle(_Style): - class _Base: - @staticmethod - def ensure_quadratic_bezier(path: Path): ... - def transmute(self, path: Path, mutation_size, linewidth: float): ... - def __call__(self, path: Path, mutation_size, linewidth: float, aspect_ratio: float = ...): ... - - class _Curve(_Base): - beginarrow = ... - arrow = ... - fillbegin = ... - def __init__( - self, - head_length: float = ..., - head_width: float = ..., - widthA: float = ..., - widthB: float = ..., - lengthA: float = ..., - lengthB: float = ..., - angleA: float = ..., - angleB: float = ..., - scaleA: float = ..., - scaleB: float = ..., - ) -> None: ... - def transmute(self, path, mutation_size, linewidth): ... - - class Curve(_Curve): - def __init__(self) -> None: ... - - class CurveA(_Curve): - arrow = ... - - class CurveB(_Curve): - arrow = ... - - class CurveAB(_Curve): - arrow = ... - - class CurveFilledA(_Curve): - arrow = ... - - class CurveFilledB(_Curve): - arrow = ... - - class CurveFilledAB(_Curve): - arrow = ... - - class BracketA(_Curve): - arrow = ... - def __init__(self, widthA: float = ..., lengthA: float = ..., angleA: float = ...) -> None: ... - - class BracketB(_Curve): - arrow = ... - def __init__(self, widthB: float = ..., lengthB: float = ..., angleB: float = ...) -> None: ... - - class BracketAB(_Curve): - arrow = ... - def __init__( - self, - widthA: float = ..., - lengthA: float = ..., - angleA: float = ..., - widthB: float = ..., - lengthB: float = ..., - angleB: float = ..., - ) -> None: ... - - class BarAB(_Curve): - arrow = ... - def __init__( - self, - widthA: float = ..., - angleA: float = ..., - widthB: float = ..., - angleB: float = ..., - ) -> None: ... - - class BracketCurve(_Curve): - arrow = ... - def __init__(self, widthA: float = ..., lengthA: float = ..., angleA: float = ...) -> None: ... - - class CurveBracket(_Curve): - arrow = ... - def __init__(self, widthB: float = ..., lengthB: float = ..., angleB: float = ...) -> None: ... - - class Simple(_Base): - def __init__( - self, - head_length: float = ..., - head_width: float = ..., - tail_width: float = ..., - ) -> None: ... - def transmute(self, path: Path, mutation_size, linewidth: float): ... - - class Fancy(_Base): - def __init__( - self, - head_length: float = ..., - head_width: float = ..., - tail_width: float = ..., - ) -> None: ... - def transmute(self, path: Path, mutation_size, linewidth: float): ... - - class Wedge(_Base): - def __init__(self, tail_width: float = ..., shrink_factor: float = ...) -> None: ... - def transmute(self, path: Path, mutation_size, linewidth: float): ... - -class FancyBboxPatch(Patch): - def __str__(self) -> str: ... - def __init__( - self, - xy: Sequence[float], - width: float, - height: float, - boxstyle: str | BoxStyle = ..., - bbox_transmuter=..., - mutation_scale: float = ..., - mutation_aspect: float = ..., - **kwargs, - ) -> None: ... - def set_boxstyle(self, boxstyle: str | BoxStyle = ..., **kwargs): ... - def set_mutation_scale(self, scale: float): ... - def get_mutation_scale(self): ... - def set_mutation_aspect(self, aspect: float): ... - def get_mutation_aspect(self) -> float: ... - def get_boxstyle(self) -> str | BoxStyle: ... - def get_path(self) -> Path: ... - def get_x(self) -> float: ... - def get_y(self) -> float: ... - def get_width(self) -> float: ... - def get_height(self) -> float: ... - def set_x(self, x: float): ... - def set_y(self, y: float): ... - def set_width(self, w: float): ... - def set_height(self, h: float): ... - def set_bounds(self, *args): ... - def get_bbox(self) -> Bbox: ... - -class FancyArrowPatch(Patch): - def __str__(self) -> str: ... - def __init__( - self, - posA: Sequence[float] = ..., - posB: Sequence[float] = ..., - path: Path = ..., - arrowstyle: str | ArrowStyle = ..., - connectionstyle: str | ConnectionStyle = ..., - patchA: Patch = ..., - patchB: Patch = ..., - shrinkA: float = ..., - shrinkB: float = ..., - mutation_scale: float = ..., - mutation_aspect: float = ..., - **kwargs, - ) -> None: ... - def set_positions(self, posA: None | Sequence[float], posB: None | Sequence[Sequence]): ... - def set_patchA(self, patchA: Patch): ... - def set_patchB(self, patchB: Patch): ... - def set_connectionstyle(self, connectionstyle: str | ConnectionStyle | None, **kwargs): ... - def get_connectionstyle(self) -> ConnectionStyle: ... - def set_arrowstyle(self, arrowstyle: None | ArrowStyle | str = ..., **kwargs): ... - def get_arrowstyle(self) -> ArrowStyle: ... - def set_mutation_scale(self, scale: float): ... - def get_mutation_scale(self) -> float: ... - def set_mutation_aspect(self, aspect: float): ... - def get_mutation_aspect(self) -> float: ... - def get_path(self) -> Path: ... - get_path_in_displaycoord = ... - def draw(self, renderer: RendererBase): ... - -class ConnectionPatch(FancyArrowPatch): - def __str__(self) -> str: ... - def __init__( - self, - xyA: Sequence[float], - xyB: Sequence[float], - coordsA, - coordsB=..., - axesA=..., - axesB=..., - arrowstyle: str | ArrowStyle = ..., - connectionstyle: str | ConnectionStyle = ..., - patchA: Patch = ..., - patchB: Patch = ..., - shrinkA: float = ..., - shrinkB: float = ..., - mutation_scale: float = ..., - mutation_aspect: float = ..., - clip_on: bool = ..., - **kwargs, - ) -> None: ... - def set_annotation_clip(self, b: bool | None): ... - def get_annotation_clip(self) -> bool: ... - def draw(self, renderer): ... diff --git a/stubs/matplotlib/path.pyi b/stubs/matplotlib/path.pyi deleted file mode 100644 index 24e4ec78..00000000 --- a/stubs/matplotlib/path.pyi +++ /dev/null @@ -1,131 +0,0 @@ -from functools import lru_cache -from typing import Sequence - -import numpy as np - -from ._typing import * -from .transforms import Affine2D, Bbox, Transform - -class Path: - code_type = np.uint8 - STOP = code_type(0) - MOVETO = code_type(1) - LINETO = code_type(2) - CURVE3 = code_type(3) - CURVE4 = code_type(4) - CLOSEPOLY = code_type(79) - NUM_VERTICES_FOR_CODE = ... - def __init__( - self, - vertices: ArrayLike, - codes: ArrayLike | None = ..., - _interpolation_steps: int = ..., - closed: bool = ..., - readonly: bool = ..., - ) -> None: ... - @property - def vertices(self) -> np.ndarray: ... - @vertices.setter - def vertices(self, vertices: ArrayLike): ... - @property - def codes(self) -> np.ndarray: ... - @codes.setter - def codes(self, codes: ArrayLike): ... - @property - def simplify_threshold(self): ... - @simplify_threshold.setter - def simplify_threshold(self, threshold): ... - @property - def should_simplify(self) -> bool: ... - @should_simplify.setter - def should_simplify(self, should_simplify: bool): ... - @property - def readonly(self) -> bool: ... - def copy(self) -> Path: ... - def __deepcopy__(self, memo=...) -> Path: ... - deepcopy = ... - @classmethod - def make_compound_path_from_polys(cls, XY): ... - @classmethod - def make_compound_path(cls, *args): ... - def __repr__(self): ... - def __len__(self): ... - def iter_segments( - self, - transform: None = ..., - remove_nans: bool = ..., - clip: None | float | float = ..., - snap: None | bool = ..., - stroke_width: float = ..., - simplify: None | bool = ..., - curves: bool = ..., - sketch: None | Sequence = ..., - ): ... - def iter_bezier(self, **kwargs): ... - def cleaned( - self, - transform: Transform = ..., - remove_nans=..., - clip=..., - *, - simplify=..., - curves=..., - stroke_width: float = ..., - snap=..., - sketch=..., - ): ... - def transformed(self, transform) -> Path: ... - def contains_point( - self, - point: Sequence[float], - transform: Transform = ..., - radius: float = ..., - ) -> bool: ... - def contains_points(self, points: ArrayLike, transform: Transform = ..., radius: float = ...) -> list[bool]: ... - def contains_path(self, path: Path, transform: Transform = ...) -> bool: ... - def get_extents(self, transform: Transform = ..., **kwargs) -> Bbox: ... - def intersects_path(self, other: Path, filled: bool = ...) -> bool: ... - def intersects_bbox(self, bbox: Bbox, filled: bool = ...): ... - def interpolated(self, steps): ... - def to_polygons( - self, - transform: Transform = ..., - width: float = ..., - height: float = ..., - closed_only: bool = ..., - ): ... - @classmethod - def unit_rectangle(cls) -> Path: ... - @classmethod - def unit_regular_polygon(cls, numVertices: int) -> Path: ... - @classmethod - def unit_regular_star(cls, numVertices: int, innerCircle=...) -> Path: ... - @classmethod - def unit_regular_asterisk(cls, numVertices: int) -> Path: ... - @classmethod - def unit_circle(cls) -> Path: ... - @classmethod - def circle( - cls, - center: Sequence[float] = ..., - radius: float = ..., - readonly: bool = ..., - ) -> Path: ... - @classmethod - def unit_circle_righthalf(cls) -> Path: ... - @classmethod - def arc(cls, theta1: float, theta2: float, n: int = ..., is_wedge: bool = ...) -> Path: ... - @classmethod - def wedge(cls, theta1: float, theta2: float, n: int = ...) -> Path: ... - @staticmethod - @lru_cache(8) - def hatch(hatchpattern, density: float = ...): ... - def clip_to_bbox(self, bbox: Bbox, inside: bool = ...): ... - -def get_path_collection_extents( - master_transform: Transform, - paths: Sequence[Path], - transforms: list, - offsets, - offset_transform: Affine2D, -) -> Bbox: ... diff --git a/stubs/matplotlib/patheffects.pyi b/stubs/matplotlib/patheffects.pyi deleted file mode 100644 index cfc84042..00000000 --- a/stubs/matplotlib/patheffects.pyi +++ /dev/null @@ -1,93 +0,0 @@ -from typing import Callable, Iterable, Sequence - -from ._typing import * -from .backend_bases import GraphicsContextBase, RendererBase -from .transforms import Transform - -class AbstractPathEffect: - def __init__(self, offset: Sequence[float] = ...) -> None: ... - def draw_path( - self, - renderer: RendererBase, - gc: GraphicsContextBase, - tpath, - affine, - rgbFace=..., - ): ... - -class PathEffectRenderer(RendererBase): - def __init__(self, path_effects: Iterable[AbstractPathEffect], renderer: RendererBase) -> None: ... - def copy_with_path_effect(self, path_effects): ... - def draw_path(self, gc: GraphicsContextBase, tpath, affine, rgbFace=...): ... - def draw_markers(self, gc: GraphicsContextBase, marker_path, marker_trans: Transform, path, *args, **kwargs): ... - def draw_path_collection(self, gc: GraphicsContextBase, master_transform, paths, *args, **kwargs): ... - def __getattribute__(self, name: str) -> Callable | list[Stroke | Normal] | RendererBase: ... - -class Normal(AbstractPathEffect): ... - -class Stroke(AbstractPathEffect): - def __init__(self, offset: Sequence[float] = ..., **kwargs) -> None: ... - def draw_path( - self, - renderer: RendererBase, - gc: GraphicsContextBase, - tpath, - affine, - rgbFace: Color, - ): ... - -withStroke = ... - -class SimplePatchShadow(AbstractPathEffect): - def __init__( - self, offset: Sequence[float] = ..., shadow_rgbFace: Color = ..., alpha: float = 0.3, rho: float = 0.3, **kwargs - ) -> None: ... - def draw_path( - self, - renderer: RendererBase, - gc: GraphicsContextBase, - tpath, - affine, - rgbFace: Color, - ): ... - -withSimplePatchShadow = ... - -class SimpleLineShadow(AbstractPathEffect): - def __init__( - self, offset: Sequence[float] = ..., shadow_color: Color = "black", alpha: float = 0.3, rho: float = 0.3, **kwargs - ) -> None: ... - def draw_path( - self, - renderer: RendererBase, - gc: GraphicsContextBase, - tpath, - affine, - rgbFace: Color, - ): ... - -class PathPatchEffect(AbstractPathEffect): - def __init__(self, offset: Sequence[float] = ..., **kwargs) -> None: ... - def draw_path( - self, - renderer: RendererBase, - gc: GraphicsContextBase, - tpath, - affine, - rgbFace: Color, - ): ... - -class TickedStroke(AbstractPathEffect): - def __init__( - self, offset: Sequence[float] = ..., spacing: float = 10, angle: float = 45, length: float = 1.414, **kwargs - ) -> None: ... - def draw_path( - self, - renderer: RendererBase, - gc: GraphicsContextBase, - tpath, - affine, - rgbFace: Color, - ): ... - -withTickedStroke = ... diff --git a/stubs/matplotlib/projections/__init__.pyi b/stubs/matplotlib/projections/__init__.pyi deleted file mode 100644 index 6e22c18c..00000000 --- a/stubs/matplotlib/projections/__init__.pyi +++ /dev/null @@ -1,14 +0,0 @@ -from typing import Callable - -class ProjectionRegistry: - def __init__(self) -> None: ... - def register(self, *projections) -> None: ... - def get_projection_class(self, name): ... - def get_projection_names(self) -> list: ... - -projection_registry: ProjectionRegistry = ... - -def register_projection(cls) -> None: ... -def get_projection_class(projection=...): ... - -get_projection_names: Callable = ... diff --git a/stubs/matplotlib/projections/geo.pyi b/stubs/matplotlib/projections/geo.pyi deleted file mode 100644 index b6f3fc14..00000000 --- a/stubs/matplotlib/projections/geo.pyi +++ /dev/null @@ -1,98 +0,0 @@ -from typing import Sequence - -import numpy as np -from matplotlib.axes import Axes -from matplotlib.backend_bases import MouseButton -from matplotlib.path import Path -from matplotlib.ticker import Formatter -from matplotlib.transforms import Transform - -class GeoAxes(Axes): - class ThetaFormatter(Formatter): - def __init__(self, round_to=...) -> None: ... - def __call__(self, x, pos=...): ... - - RESOLUTION = ... - def clear(self) -> None: ... - def get_xaxis_transform(self, which=...) -> Transform: ... - def get_xaxis_text1_transform(self, pad) -> Transform: ... - def get_xaxis_text2_transform(self, pad) -> Transform: ... - def get_yaxis_transform(self, which=...) -> Transform: ... - def get_yaxis_text1_transform(self, pad) -> Transform: ... - def get_yaxis_text2_transform(self, pad) -> Transform: ... - def set_yscale(self, *args, **kwargs) -> None: ... - - set_xscale = set_yscale - def set_xlim(self, *args, **kwargs) -> None: ... - set_ylim = set_xlim - def format_coord(self, lon, lat) -> str: ... - def set_longitude_grid(self, degrees: float) -> None: ... - def set_latitude_grid(self, degrees: float) -> None: ... - def set_longitude_grid_ends(self, degrees: float) -> None: ... - def get_data_ratio(self) -> float: ... - def can_zoom(self) -> bool: ... - def can_pan(self) -> bool: ... - def start_pan(self, x: float, y: float, button: MouseButton): ... - def end_pan(self) -> bool: ... - def drag_pan(self, button: MouseButton, key: str | None, x: float, y: float): ... - -class _GeoTransform(Transform): - input_dims = ... - def __init__(self, resolution) -> None: ... - def __str__(self) -> str: ... - def transform_path_non_affine(self, path: Path) -> Path: ... - -class AitoffAxes(GeoAxes): - name: str = ... - - class AitoffTransform(_GeoTransform): - def transform_non_affine(self, ll) -> np.ndarray: ... - def inverted(self) -> _GeoTransform: ... - - class InvertedAitoffTransform(_GeoTransform): - def transform_non_affine(self, xy: Sequence[float]): ... - def inverted(self) -> _GeoTransform: ... - - def __init__(self, *args, **kwargs) -> None: ... - -class HammerAxes(GeoAxes): - name = ... - - class HammerTransform(_GeoTransform): - def transform_non_affine(self, ll) -> np.ndarray: ... - def inverted(self) -> _GeoTransform: ... - - class InvertedHammerTransform(_GeoTransform): - def transform_non_affine(self, xy: Sequence[float]) -> np.ndarray: ... - def inverted(self) -> _GeoTransform: ... - - def __init__(self, *args, **kwargs) -> None: ... - -class MollweideAxes(GeoAxes): - name = ... - - class MollweideTransform(_GeoTransform): - def transform_non_affine(self, ll) -> np.ndarray: ... - def inverted(self) -> _GeoTransform: ... - - class InvertedMollweideTransform(_GeoTransform): - def transform_non_affine(self, xy: Sequence[float]) -> np.ndarray: ... - def inverted(self) -> _GeoTransform: ... - - def __init__(self, *args, **kwargs) -> None: ... - -class LambertAxes(GeoAxes): - name = ... - - class LambertTransform(_GeoTransform): - def __init__(self, center_longitude, center_latitude, resolution) -> None: ... - def transform_non_affine(self, ll) -> np.ndarray: ... - def inverted(self) -> _GeoTransform: ... - - class InvertedLambertTransform(_GeoTransform): - def __init__(self, center_longitude, center_latitude, resolution) -> None: ... - def transform_non_affine(self, xy: Sequence[float]) -> np.ndarray: ... - def inverted(self) -> _GeoTransform: ... - - def __init__(self, *args, center_longitude=..., center_latitude=..., **kwargs) -> None: ... - def clear(self) -> None: ... diff --git a/stubs/matplotlib/projections/plot_directive.pyi b/stubs/matplotlib/projections/plot_directive.pyi deleted file mode 100644 index 964e6fa3..00000000 --- a/stubs/matplotlib/projections/plot_directive.pyi +++ /dev/null @@ -1,3 +0,0 @@ -from typing import Any - -def __getattr__(name: str) -> Any: ... # incomplete diff --git a/stubs/matplotlib/projections/polar.pyi b/stubs/matplotlib/projections/polar.pyi deleted file mode 100644 index 2308935c..00000000 --- a/stubs/matplotlib/projections/polar.pyi +++ /dev/null @@ -1,130 +0,0 @@ -from typing import Literal, Sequence, Type - -import numpy as np -from matplotlib._typing import * -from matplotlib.axes import Axes -from matplotlib.axis import Axis, XTick, YTick -from matplotlib.backend_bases import MouseButton -from matplotlib.lines import Line2D -from matplotlib.path import Path -from matplotlib.text import Text -from matplotlib.ticker import Formatter, Locator -from matplotlib.transforms import Affine2DBase, Bbox, ScaledTranslation, Transform - -class PolarTransform(Transform): - input_dims = ... - def __init__(self, axis=..., use_rmin=..., _apply_theta_transforms=...) -> None: ... - def transform_non_affine(self, tr) -> np.ndarray: ... - def transform_path_non_affine(self, path: Path) -> Path: ... - def inverted(self) -> InvertedPolarTransform: ... - -class PolarAffine(Affine2DBase): - def __init__(self, scale_transform, limits) -> None: ... - def get_matrix(self) -> np.ndarray | None: ... - -class InvertedPolarTransform(Transform): - input_dims = ... - def __init__(self, axis=..., use_rmin=..., _apply_theta_transforms=...) -> None: ... - def transform_non_affine(self, xy) -> np.ndarray: ... - def inverted(self) -> PolarTransform: ... - -class ThetaFormatter(Formatter): - def __call__(self, x, pos=...): ... - -class _AxisWrapper: - def __init__(self, axis: Axis) -> None: ... - def get_view_interval(self): ... - def set_view_interval(self, vmin: float, vmax: float) -> None: ... - def get_minpos(self): ... - def get_data_interval(self): ... - def set_data_interval(self, vmin: float, vmax: float) -> None: ... - def get_tick_space(self): ... - -class ThetaLocator(Locator): - def __init__(self, base) -> None: ... - def set_axis(self, axis: Axis) -> None: ... - def __call__(self): ... - def refresh(self): ... - def view_limits(self, vmin: float, vmax: float): ... - -class ThetaTick(XTick): - def __init__(self, axes, *args, **kwargs) -> None: ... - def update_position(self, loc) -> None: ... - -class ThetaAxis(Axis): - axis_name: str = ... - _tick_class: Type[ThetaTick] = ThetaTick - def clear(self) -> None: ... - -class RadialLocator(Locator): - def __init__(self, base, axes: Axes = ...) -> None: ... - def set_axis(self, axis: Axis) -> None: ... - def __call__(self): ... - def nonsingular(self, vmin: float, vmax: float) -> tuple[float, float]: ... - def view_limits(self, vmin: float, vmax: float): ... - -class _ThetaShift(ScaledTranslation): - def __init__(self, axes: Axes, pad: float, mode: Literal["min", "max", "rlabel"]) -> None: ... - def get_matrix(self) -> np.ndarray | None: ... - -class RadialTick(YTick): - def __init__(self, *args, **kwargs) -> None: ... - def update_position(self, loc) -> None: ... - -class RadialAxis(Axis): - axis_name: str = ... - _tick_class: Type[RadialTick] = RadialTick - def __init__(self, *args, **kwargs) -> None: ... - def clear(self) -> None: ... - -class _WedgeBbox(Bbox): - def __init__(self, center: Sequence[float], viewLim: Bbox, originLim: Bbox, **kwargs) -> None: ... - def get_points(self) -> np.ndarray: ... - -class PolarAxes(Axes): - name = ... - def __init__(self, *args, **kwargs) -> None: ... - def clear(self) -> None: ... - def get_xaxis_transform(self, which=...) -> Transform: ... - def get_xaxis_text1_transform(self, pad) -> Transform: ... - def get_xaxis_text2_transform(self, pad) -> Transform: ... - def get_yaxis_transform(self, which=...) -> Transform: ... - def get_yaxis_text1_transform(self, pad) -> Transform: ... - def get_yaxis_text2_transform(self, pad) -> Transform: ... - def draw(self, renderer) -> None: ... - def set_thetamax(self, thetamax) -> None: ... - def get_thetamax(self) -> np.ndarray: ... - def set_thetamin(self, thetamin) -> None: ... - def get_thetamin(self) -> np.ndarray: ... - def set_thetalim(self, *args, **kwargs) -> None: ... - def set_theta_offset(self, offset): ... - def get_theta_offset(self) -> np.ndarray: ... - def set_theta_zero_location(self, loc: str, offset: float = 0) -> None: ... - def set_theta_direction(self, direction: int) -> None: ... - def get_theta_direction(self) -> int: ... - def set_rmax(self, rmax: float) -> None: ... - def get_rmax(self) -> float: ... - def set_rmin(self, rmin: float) -> None: ... - def get_rmin(self) -> float: ... - def set_rorigin(self, rorigin: float) -> None: ... - def get_rorigin(self) -> float: ... - def get_rsign(self) -> np.ndarray: ... - def set_rlim(self, bottom=..., top=..., emit=..., auto=..., **kwargs) -> None: ... - def get_rlabel_position(self) -> float: ... - def set_rlabel_position(self, value: float) -> None: ... - def set_yscale(self, *args, **kwargs) -> None: ... - def set_rscale(self, *args, **kwargs) -> None: ... - def set_rticks(self, *args, **kwargs) -> None: ... - def set_thetagrids( - self, angles: tuple[float, ...], labels: tuple[str, ...] | None = ..., fmt: str | None = ..., **kwargs - ) -> tuple[list[Line2D], list[Text]]: ... - def set_rgrids( - self, radii: tuple[float, ...], labels: None | tuple[str, ...] = ..., angle: float = ..., fmt: str | None = ..., **kwargs - ) -> tuple[list[Line2D], list[Text]]: ... - def format_coord(self, theta, r) -> str: ... - def get_data_ratio(self) -> float: ... - def can_zoom(self) -> bool: ... - def can_pan(self) -> bool: ... - def start_pan(self, x: float, y: float, button: MouseButton) -> None: ... - def end_pan(self) -> None: ... - def drag_pan(self, button: MouseButton, key: str | None, x: float, y: float) -> None: ... diff --git a/stubs/matplotlib/pyplot.pyi b/stubs/matplotlib/pyplot.pyi deleted file mode 100644 index 20566799..00000000 --- a/stubs/matplotlib/pyplot.pyi +++ /dev/null @@ -1,856 +0,0 @@ -import datetime -from array import array -from typing import Callable, ContextManager, Literal, Sequence, overload - -import matplotlib -import matplotlib.image -import numpy as np -from matplotlib import rcParams as rcParams, style as style -from matplotlib.contour import QuadContourSet - -from . import rcParams -from ._typing import * -from .artist import Artist -from .axes import Axes as Axes -from .backend_bases import FigureCanvasBase, FigureManagerBase, MouseButton, _Backend -from .collections import BrokenBarHCollection, Collection, LineCollection, PathCollection, PolyCollection, QuadMesh -from .colors import Colormap, Normalize -from .container import BarContainer, ErrorbarContainer, StemContainer -from .figure import Figure, SubFigure -from .image import AxesImage, FigureImage -from .legend import Legend -from .lines import Line2D -from .markers import MarkerStyle -from .patches import FancyArrow, Polygon -from .quiver import Quiver -from .rcsetup import interactive_bk as _interactive_bk -from .scale import ScaleBase -from .streamplot import StreamplotSet -from .table import Table -from .text import Annotation, Text -from .transforms import Bbox, Transform -from .tri.tricontour import TriContourSet -from .widgets import SubplotTool - -def install_repl_displayhook() -> None: ... -def uninstall_repl_displayhook() -> None: ... -def draw_all(force: bool = False) -> None: ... -def set_loglevel(*args, **kwargs) -> None: ... -def findobj(o=..., match=..., include_self: bool = ...) -> list: ... -def switch_backend(newbackend: str) -> None: - class backend_mod(_Backend): ... - -def new_figure_manager(*args, **kwargs) -> FigureManagerBase: ... -def draw_if_interactive(*args, **kwargs): ... -def show(*args, **kwargs): ... -def isinteractive() -> bool: ... - -class _IoffContext: - def __init__(self) -> None: ... - def __enter__(self): ... - def __exit__(self, exc_type, exc_value, traceback): ... - -class _IonContext: - def __init__(self) -> None: ... - def __enter__(self): ... - def __exit__(self, exc_type, exc_value, traceback): ... - -def ioff() -> _IoffContext: ... -def ion() -> _IonContext: ... -def pause(interval) -> None: ... -def rc(group, **kwargs) -> None: ... -def rc_context(rc: dict = ..., fname: str | PathLike = ...) -> ContextManager: ... -def rcdefaults() -> None: ... -def getp(obj: Artist, *args, **kwargs): ... -def get(obj: Artist, *args, **kwargs): ... -def setp(obj: Artist | list, *args, **kwargs): ... -def xkcd(scale: float = ..., length: float = ..., randomness: float = ...) -> _xkcd: ... - -class _xkcd: - def __init__(self, scale: float, length: float, randomness: float) -> None: ... - def __enter__(self) -> _xkcd: ... - def __exit__(self, *args) -> None: ... - -def figure( - num: int | str | Figure | SubFigure | None = None, - figsize: Sequence[float] | None = None, - dpi: float | None = None, - facecolor: Color | None = None, - edgecolor: Color | None = None, - frameon: bool = True, - FigureClass=..., - clear: bool = False, - **kwargs, -) -> Figure: ... -def gcf() -> Figure: ... -def fignum_exists(num) -> bool: ... -def get_fignums() -> list[int]: ... -def get_figlabels(): ... -def get_current_fig_manager() -> FigureManagerBase: ... -def connect(s: str, func: Callable): ... -def disconnect(cid: int): ... -def close(fig: None | int | str | Figure = ...): ... -def clf() -> None: ... -def draw() -> None: ... -def savefig(*args, **kwargs) -> None: ... -def figlegend(*args, **kwargs) -> Legend: ... -def axes(arg: None | tuple = ..., **kwargs) -> Axes: ... -def delaxes(ax: Axes = ...) -> None: ... -def sca(ax: Axes) -> None: ... -def cla() -> None: ... -def subplot(*args, **kwargs) -> Axes: ... -@overload -def subplots( - nrows: int = ..., - ncols: int = ..., - *, - squeeze: Literal[False], - sharex: bool | Literal["none", "all", "row", "col"] = ..., - sharey: bool | Literal["none", "all", "row", "col"] = ..., - subplot_kw: dict = ..., - gridspec_kw: dict = ..., - **fig_kw, -) -> tuple[Figure, np.ndarray]: ... -@overload -def subplots( - nrows: Literal[1] = ..., - ncols: Literal[1] = ..., - *, - sharex: bool | Literal["none", "all", "row", "col"] = ..., - sharey: bool | Literal["none", "all", "row", "col"] = ..., - squeeze: Literal[True] = ..., - subplot_kw: dict = ..., - gridspec_kw: dict = ..., - **fig_kw, -) -> tuple[Figure, Axes]: ... - -## - -@overload -def subplots( - nrows: Literal[1] = ..., - ncols: int = ..., - *, - sharex: bool | Literal["none", "all", "row", "col"] = ..., - sharey: bool | Literal["none", "all", "row", "col"] = ..., - squeeze: Literal[True] = ..., - subplot_kw: dict = ..., - gridspec_kw: dict = ..., - **fig_kw, -) -> tuple[Figure, np.ndarray]: ... -@overload -def subplots( - nrows: int = ..., - ncols: Literal[1] = ..., - *, - sharex: bool | Literal["none", "all", "row", "col"] = ..., - sharey: bool | Literal["none", "all", "row", "col"] = ..., - squeeze: Literal[True] = ..., - subplot_kw: dict = ..., - gridspec_kw: dict = ..., - **fig_kw, -) -> tuple[Figure, np.ndarray]: ... -@overload -def subplots( - *, - nrows: int = ..., - ncols: int = ..., - sharex: bool | Literal["none", "all", "row", "col"] = ..., - sharey: bool | Literal["none", "all", "row", "col"] = ..., - squeeze: Literal[True] = ..., - subplot_kw: dict = ..., - gridspec_kw: dict = ..., - **fig_kw, -) -> tuple[Figure, np.ndarray]: ... -@overload -def subplots( - *, - ncols: int = ..., - sharex: bool | Literal["none", "all", "row", "col"] = ..., - sharey: bool | Literal["none", "all", "row", "col"] = ..., - squeeze: Literal[True] = ..., - subplot_kw: dict = ..., - gridspec_kw: dict = ..., - **fig_kw, -) -> tuple[Figure, np.ndarray]: ... -@overload -def subplots( - nrows: int = ..., - *, - sharex: bool | Literal["none", "all", "row", "col"] = ..., - sharey: bool | Literal["none", "all", "row", "col"] = ..., - squeeze: Literal[True] = ..., - subplot_kw: dict = ..., - gridspec_kw: dict = ..., - **fig_kw, -) -> tuple[Figure, np.ndarray]: ... -@overload -def subplots( - *, - sharex: bool | Literal["none", "all", "row", "col"] = ..., - sharey: bool | Literal["none", "all", "row", "col"] = ..., - squeeze: Literal[True] = ..., - subplot_kw: dict = ..., - gridspec_kw: dict = ..., - **fig_kw, -) -> tuple[Figure, Axes]: ... -@overload -def subplots( - nrows: int = ..., - ncols: int = ..., - *, - sharex: bool | Literal["none", "all", "row", "col"] = ..., - sharey: bool | Literal["none", "all", "row", "col"] = ..., - squeeze: bool = ..., - subplot_kw: dict = ..., - gridspec_kw: dict = ..., - **fig_kw, -) -> tuple[Figure, np.ndarray]: ... -def subplot_mosaic( - mosaic: list | str, - *, - sharex: bool = ..., - sharey: bool = ..., - subplot_kw: dict = ..., - gridspec_kw: dict = ..., - empty_sentinel: object = ..., - **fig_kw, -) -> tuple[Figure, dict[Text, Axes]]: ... -def subplot2grid( - shape: Sequence[int], loc: Sequence[int], rowspan: int = ..., colspan: int = ..., fig: Figure = ..., **kwargs -) -> Axes: ... -def twinx(ax: Axes = ...) -> Axes: ... -def twiny(ax: Axes = ...) -> Axes: ... -def subplot_tool(targetfig: Figure = ...) -> SubplotTool: ... -def box(on: bool | None = ...): ... -def xlim(*args, **kwargs) -> tuple[float, float]: ... -def ylim(*args, **kwargs) -> tuple[float, float]: ... -def xticks(ticks: ArrayLike = ..., labels: ArrayLike = ..., **kwargs) -> tuple[list, list[Text]]: ... -def yticks(ticks: ArrayLike = ..., labels: ArrayLike = ..., **kwargs) -> tuple[list, list[Text]]: ... -def rgrids( - radii: Sequence[float] = ..., labels: Sequence[str] | None = ..., angle: float = ..., fmt: str | None = ..., **kwargs -) -> tuple[list[Line2D], list[Text]]: ... -def thetagrids( - angles: Sequence[float] = ..., labels: Sequence[str] | None = ..., fmt: str | None = ..., **kwargs -) -> tuple[list[Line2D], list[Text]]: ... -def get_plot_commands() -> list: ... -def colorbar(mappable=..., cax: Axes = ..., ax: Axes = ..., **kwargs): ... -def clim(vmin: float | None = ..., vmax: float | None = ...): ... -def set_cmap(cmap: Colormap | str): ... -def imread(fname: str | FileLike, format: str = ...) -> np.ndarray: ... -def imsave(fname: str | PathLike | FileLike, arr: ArrayLike, **kwargs): ... -def matshow(A: ArrayLike, fignum: None | int | Literal[False] = ..., **kwargs) -> AxesImage: ... -def polar(*args, **kwargs): ... -def figimage( - X: ArrayLike, - xo: float = ..., - yo: float = ..., - alpha: None | float = ..., - norm: Normalize = ..., - cmap: str | Colormap = ..., - vmin: float = ..., - vmax: float = ..., - origin: Literal["upper", "lower"] = ..., - resize: bool = ..., - **kwargs, -) -> FigureImage: ... -def figtext(x: float, y: float, s: str, fontdict: dict = ..., **kwargs) -> text.Text: ... -def gca(): ... -def gci(): ... -def ginput( - n: int = ..., - timeout: float = ..., - show_clicks: bool = ..., - mouse_add: MouseButton | None = ..., - mouse_pop: MouseButton | None = ..., - mouse_stop: MouseButton | None = ..., -) -> list[tuple]: ... -def subplots_adjust( - left: float = ..., - bottom: float = ..., - right: float = ..., - top: float = ..., - wspace: float = ..., - hspace: float = ..., -): ... -def suptitle(t: str, **kwargs) -> Text: ... -def tight_layout(*, pad: float = ..., h_pad: float = ..., w_pad: float = ..., rect: Sequence[float] = ...): ... -def waitforbuttonpress(timeout=...): ... -def acorr(x: ArrayLike, *, data=..., **kwargs): ... -def angle_spectrum( - x: Sequence[float], - Fs: float = ..., - Fc: float = ..., - window: Callable | np.ndarray = ..., - pad_to: float = ..., - sides: Literal["default", "onesided", "twosided"] = ..., - *, - data=..., - **kwargs, -): ... -def annotate( - text: str, - xy: Sequence[float], - xytext: Sequence[float] = ..., - xycoords: str | Artist | Transform | Callable = ..., - textcoords: str | Artist | Transform | Callable = ..., - arrowprops: dict = ..., - annotation_clip: bool | None = ..., - **kwargs, -) -> Annotation: ... -def arrow(x: float, y: float, dx: float, dy: float, **kwargs) -> FancyArrow: ... -def autoscale( - enable: bool | None = ..., - axis: Literal["both", "x", "y"] = ..., - tight: bool | None = ..., -): ... -def axhline(y: float = ..., xmin: float = ..., xmax: float = ..., **kwargs) -> Line2D: ... -def axhspan(ymin: float, ymax: float, xmin: float = ..., xmax: float = ..., **kwargs) -> Polygon: ... -def axis(*args, emit: bool = ..., **kwargs): ... -def axline(xy1: Sequence[float], xy2: Sequence[float] = ..., *, slope: float = ..., **kwargs) -> Line2D: ... -def axvline(x: float = ..., ymin: float = ..., ymax: float = ..., **kwargs) -> Line2D: ... -def axvspan(xmin: float, xmax: float, ymin: float = ..., ymax: float = ..., **kwargs) -> Polygon: ... -def bar( - x: float | ArrayLike, - height: float | ArrayLike, - width: float | ArrayLike = ..., - bottom: float | ArrayLike = ..., - *, - align: Literal["center", "edge"] = ..., - data=..., - **kwargs, -) -> BarContainer: ... -def barbs(*args, data=..., **kwargs): ... -def barh( - y: float | ArrayLike, - width: float | ArrayLike, - height: float | ArrayLike = ..., - left: float | ArrayLike = ..., - *, - align: Literal["center", "edge"] = ..., - **kwargs, -) -> BarContainer: ... -def bar_label( - container: BarContainer, - labels: ArrayLike = ..., - *, - fmt: str = ..., - label_type: Literal["edge", "center"] = ..., - padding: float = ..., - **kwargs, -) -> list: ... -def boxplot( - x: ArrayLike, - notch: bool = ..., - sym: str = ..., - vert: bool = ..., - whis: float = ..., - positions: ArrayLike = ..., - widths: float | ArrayLike = ..., - patch_artist: bool = ..., - bootstrap: int = ..., - usermedians=..., - conf_intervals: ArrayLike = ..., - meanline: bool = ..., - showmeans=..., - showcaps=..., - showbox=..., - showfliers=..., - boxprops=..., - labels: Sequence = ..., - flierprops=..., - medianprops=..., - meanprops=..., - capprops=..., - whiskerprops=..., - manage_ticks: bool = ..., - autorange: bool = ..., - zorder: float = ..., - capwidths=..., - *, - data=..., -) -> dict: ... -def broken_barh(xranges, yrange, *, data=..., **kwargs) -> BrokenBarHCollection: ... -def clabel(CS, levels: ArrayLike = ..., **kwargs): ... -def cohere( - x, - y, - NFFT: int = ..., - Fs: float = ..., - Fc: float = ..., - detrend: Literal["none", "mean", "linear"] | Callable = ..., - window: Callable | np.ndarray = ..., - noverlap: float = ..., - pad_to: float = ..., - sides: Literal["default", "onesided", "twosided"] = ..., - scale_by_freq: bool = ..., - *, - data=..., - **kwargs, -): ... -def contour(*args, data=..., **kwargs) -> QuadContourSet: ... -def contourf(*args, data=..., **kwargs) -> QuadContourSet: ... -def csd( - x: Sequence[float], - y: Sequence[float], - NFFT: int = ..., - Fs: float = ..., - Fc: float = ..., - detrend: Literal["none", "mean", "linear"] | Callable = ..., - window: Callable | np.ndarray = ..., - noverlap: float = ..., - pad_to: float = ..., - sides: Literal["default", "onesided", "twosided"] = ..., - scale_by_freq: bool = ..., - return_line: bool = ..., - *, - data=..., - **kwargs, -): ... -def errorbar( - x: float | ArrayLike, - y: float | ArrayLike, - yerr: float | ArrayLike = ..., - xerr: float | ArrayLike = ..., - fmt: str = ..., - ecolor: Color = ..., - elinewidth: float = ..., - capsize: float = ..., - barsabove: bool = ..., - lolims: bool = ..., - uplims: bool = ..., - xlolims: bool = ..., - xuplims: bool = ..., - errorevery: int = ..., - capthick: float = ..., - *, - data=..., - **kwargs, -) -> ErrorbarContainer: ... -def eventplot( - positions: ArrayLike | Sequence[ArrayLike], - orientation: Literal["horizontal", "vertical"] = ..., - lineoffsets: float | ArrayLike = ..., - linelengths: float | ArrayLike = ..., - linewidths: float | ArrayLike = ..., - colors: Color | list[Color] = ..., - linestyles: str | tuple | list = ..., - *, - data=..., - **kwargs, -) -> list: ... -def fill(*args, data=..., **kwargs) -> list[Polygon]: ... -def fill_between( - x, - y1: Scalar, - y2: Scalar = ..., - where: ArrayLike = ..., - interpolate: bool = ..., - step: Literal["pre", "post", "mid"] = ..., - *, - data=..., - **kwargs, -) -> PolyCollection: ... -def fill_betweenx( - y, - x1: Scalar, - x2: Scalar = ..., - where: ArrayLike = ..., - step: Literal["pre", "post", "mid"] = ..., - interpolate: bool = ..., - *, - data=..., - **kwargs, -) -> PolyCollection: ... -def grid( - visible: bool | None = ..., which: Literal["major", "minor", "both"] = ..., axis: Literal["both", "x", "y"] = ..., **kwargs -): ... -def hexbin( - x: ArrayLike, - y: ArrayLike, - C: ArrayLike = ..., - gridsize: int = ..., - bins: Literal["log"] | int | Sequence = ..., - xscale: Literal["linear", "log"] = ..., - yscale: Literal["linear", "log"] = ..., - extent=..., - cmap=..., - norm=..., - vmin=..., - vmax=..., - alpha=..., - linewidths=..., - edgecolors=..., - reduce_C_function=..., - mincnt: int = ..., - marginals: bool = ..., - *, - data=..., - **kwargs, -) -> PolyCollection: ... -def hist( - x, - bins: int | Sequence | str = ..., - range: tuple | None = ..., - density: bool = ..., - weights=..., - cumulative: bool | Literal[-1] = ..., - bottom=..., - histtype: Literal["bar", "barstacked", "step", "stepfilled"] = ..., - align: Literal["left", "mid", "right"] = ..., - orientation: Literal["vertical", "horizontal"] = ..., - rwidth: float | None = ..., - log: bool = ..., - color: Color | None = ..., - label: str | None = ..., - stacked: bool = ..., - *, - data=..., - **kwargs, -): ... -def stairs( - values: ArrayLike, - edges: ArrayLike = ..., - *, - orientation: Literal["vertical", "horizontal"] = ..., - baseline: float | ArrayLike | None = ..., - fill: bool = ..., - data=..., - **kwargs, -): ... -def hist2d( - x, - y, - bins: None | int | ArrayLike = ..., - range=..., - density: bool = ..., - weights=..., - cmin: float = ..., - cmax: float = ..., - *, - data=..., - **kwargs, -): ... -def hlines( - y: float | ArrayLike, - xmin: float | ArrayLike, - xmax: float | ArrayLike, - colors: list[Color] = ..., - linestyles: Literal["solid", "dashed", "dashdot", "dotted"] = ..., - label: str = ..., - *, - data=..., - **kwargs, -) -> LineCollection: ... -def imshow( - X: ArrayLike, - cmap: str | Colormap = ..., - norm: Normalize = ..., - aspect: Literal["equal", "auto"] | float = ..., - interpolation: str = ..., - alpha: float | ArrayLike = ..., - vmin: float = ..., - vmax: float = ..., - origin: Literal["upper", "lower"] = ..., - extent: Sequence[float] = ..., - *, - interpolation_stage: Literal["data", "rgba"] = ..., - filternorm: bool = ..., - filterrad: float = ..., - resample: bool = ..., - url: str = ..., - data=..., - **kwargs, -) -> AxesImage: ... -def legend(*args, **kwargs) -> Legend: ... -def locator_params(axis: Literal["both", "x", "y"] = ..., tight: bool | None = ..., **kwargs): ... -def loglog(*args, **kwargs) -> list: ... -def magnitude_spectrum( - x: Sequence, - Fs: float = ..., - Fc: float = ..., - window: Callable | np.ndarray = ..., - pad_to: float = ..., - sides: Literal["default", "onesided", "twosided"] = ..., - scale: Literal["default", "linear", "dB"] = ..., - *, - data=..., - **kwargs, -): ... -def margins(*margins, x: float = ..., y: float = ..., tight: bool | None = ...): ... -def minorticks_off(): ... -def minorticks_on(): ... -def pcolor( - *args, - shading: Literal["flat", "nearest", "auto"] = ..., - alpha: float = ..., - norm: Normalize = ..., - cmap: str | Colormap = ..., - vmin: float = ..., - vmax: float = ..., - data=..., - **kwargs, -) -> Collection: ... -def pcolormesh( - *args, - alpha: float = ..., - norm: Normalize = ..., - cmap: str | Colormap = ..., - vmin: float = ..., - vmax: float = ..., - shading: Literal["flat", "nearest", "gouraud", "auto"] = ..., - antialiased=..., - data=..., - **kwargs, -) -> QuadMesh: ... -def phase_spectrum( - x: Sequence, - Fs: float = ..., - Fc: float = ..., - window: Callable | np.ndarray = ..., - pad_to: float = ..., - sides: Literal["default", "onesided", "twosided"] = ..., - *, - data=..., - **kwargs, -): ... -def pie( - x, - explode: ArrayLike = ..., - labels: Sequence[str] = ..., - colors: ArrayLike = ..., - autopct: None | str | Callable = ..., - pctdistance: float = ..., - shadow: bool = ..., - labeldistance: float | None = ..., - startangle: float = ..., - radius: float = ..., - counterclock: bool = ..., - wedgeprops: dict = ..., - textprops: dict = ..., - center: tuple[float, float] = ..., - frame: bool = ..., - rotatelabels: bool = ..., - *, - normalize: bool = ..., - data=..., -): ... -def plot(*args, scalex=..., scaley=..., data=..., **kwargs) -> list: ... -def plot_date( - x: ArrayLike, - y: ArrayLike, - fmt: str = ..., - tz: datetime.tzinfo = ..., - xdate: bool = ..., - ydate: bool = ..., - *, - data=..., - **kwargs, -) -> list: ... -def psd( - x: Sequence, - NFFT: int = ..., - Fs: float = ..., - Fc: float = ..., - detrend: Literal["none", "mean", "linear"] | Callable = ..., - window: Callable | np.ndarray = ..., - noverlap: float = ..., - pad_to: float = ..., - sides: Literal["default", "onesided", "twosided"] = ..., - scale_by_freq: bool = ..., - return_line: bool = ..., - *, - data=..., - **kwargs, -): ... -def quiver(*args, data=..., **kwargs) -> Quiver: ... -def quiverkey(Q: Quiver, X: float, Y: float, U: float, label: str, **kwargs): ... -def scatter( - x: float | ArrayLike, - y: float | ArrayLike, - s: float | ArrayLike = ..., - c: ArrayLike | list[Color] | Color = ..., - marker: MarkerStyle = ..., - cmap: str | Colormap = ..., - norm: Normalize = ..., - vmin: float = ..., - vmax: float = ..., - alpha: float = ..., - linewidths: float | ArrayLike = ..., - *, - edgecolors: Color = ..., - plotnonfinite: bool = ..., - data=..., - **kwargs, -) -> PathCollection: ... -def semilogx(*args, **kwargs) -> list: ... -def semilogy(*args, **kwargs) -> list: ... -def specgram( - x: Sequence, - NFFT: int = ..., - Fs: float = ..., - Fc: float = ..., - detrend: Literal["none", "mean", "linear"] | Callable = ..., - window: Callable | np.ndarray = ..., - noverlap: int = ..., - cmap: Colormap = ..., - xextent=..., - pad_to: float = ..., - sides: Literal["default", "onesided", "twosided"] = ..., - scale_by_freq: bool = ..., - mode: Literal["default", "psd", "magnitude", "angle", "phase"] = ..., - scale: Literal["default", "linear", "dB"] = ..., - vmin=..., - vmax=..., - *, - data=..., - **kwargs, -): ... -def spy( - Z, - precision: float | Literal["present"] = ..., - marker=..., - markersize=..., - aspect: Literal["equal", "auto", None] | float = ..., - origin: Literal["upper", "lower"] = ..., - **kwargs, -) -> tuple[AxesImage, Line2D]: ... -def stackplot( - x, - *args, - labels: list[str] = ..., - colors: list[Color] = ..., - baseline: Literal["zero", "sym", "wiggle", "weighted_wiggle"] = ..., - data=..., - **kwargs, -) -> list: ... -def stem( - *args, - linefmt: str = ..., - markerfmt: str = ..., - basefmt: str = ..., - bottom: float = ..., - label: str = ..., - use_line_collection: bool = ..., - orientation: str = ..., - data=..., -) -> StemContainer: ... -def step(x: ArrayLike, y: ArrayLike, *args, where: Literal["pre", "post", "mid"] = ..., data=..., **kwargs) -> list: ... -def streamplot( - x, - y, - u, - v, - density: float = ..., - linewidth: float = ..., - color: Color = ..., - cmap: Colormap = ..., - norm: Normalize = ..., - arrowsize: float = ..., - arrowstyle: str = ..., - minlength: float = ..., - transform=..., - zorder: int = ..., - start_points=..., - maxlength: float = ..., - integration_direction: Literal["forward", "backward", "both"] = ..., - broken_streamlines: bool = ..., - *, - data=..., -) -> StreamplotSet: ... -def table( - cellText=..., - cellColours=..., - cellLoc: Literal["left", "center", "right"] = ..., - colWidths: list[float] = ..., - rowLabels: list[str] = ..., - rowColours: list[Color] = ..., - rowLoc: Literal["left", "center", "right"] = ..., - colLabels: list[str] = ..., - colColours: list[Color] = ..., - colLoc: Literal["left", "center", "right"] = ..., - loc: str = ..., - bbox: Bbox = ..., - edges: Literal["open", "closed", "horizontal", "vertical"] = ..., - **kwargs, -) -> Table: ... -def text(x: float, y: float, s: str, fontdict: dict = ..., **kwargs) -> Text: ... -def tick_params(axis: Literal["x", "y", "both"] = ..., **kwargs): ... -def ticklabel_format( - *, - axis: Literal["x", "y", "both"] = ..., - style: Literal["sci", "scientific", "plain"] = ..., - scilimits=..., - useOffset: bool | float = ..., - useLocale: bool = ..., - useMathText: bool = ..., -): ... -def tricontour(*args, **kwargs) -> TriContourSet: ... -def tricontourf(*args, **kwargs) -> TriContourSet: ... -def tripcolor( - *args, - alpha=..., - norm=..., - cmap=..., - vmin: float = ..., - vmax: float = ..., - shading: Literal["flat", "gouraud"] = ..., - facecolors: ArrayLike = ..., - **kwargs, -): ... -def triplot(*args, **kwargs): ... -def violinplot( - dataset: ArrayLike, - positions: ArrayLike = ..., - vert: bool = ..., - widths: ArrayLike = ..., - showmeans: bool = ..., - showextrema: bool = ..., - showmedians: bool = ..., - quantiles: ArrayLike = ..., - points: int = ..., - bw_method: str | Scalar | Callable = ..., - *, - data=..., -) -> dict: ... -def vlines( - x: float | ArrayLike, - ymin: float | ArrayLike, - ymax: float | ArrayLike, - colors: list[Color] = ..., - linestyles: Literal["solid", "dashed", "dashdot", "dotted"] = ..., - label: str = ..., - *, - data=..., - **kwargs, -) -> LineCollection: ... -def xcorr( - x, y, normed: bool = ..., detrend: Callable = ..., usevlines: bool = ..., maxlags: int = ..., *, data=..., **kwargs -): ... -def sci(im): ... -def title( - label: str, fontdict: dict = ..., loc: Literal["center", "left", "right"] = ..., pad: float = ..., *, y: float = ..., **kwargs -) -> Text: ... -def xlabel(xlabel: str, fontdict=..., labelpad: float = ..., *, loc: Literal["left", "center", "right"] = ..., **kwargs): ... -def ylabel(ylabel: str, fontdict=..., labelpad: float = ..., *, loc: Literal["bottom", "center", "top"] = ..., **kwargs): ... -def xscale(value: Literal["linear", "log", "symlog", "logit"] | ScaleBase, **kwargs): ... -def yscale(value: Literal["linear", "log", "symlog", "logit"] | ScaleBase, **kwargs): ... -def autumn(): ... -def bone(): ... -def cool(): ... -def copper(): ... -def flag(): ... -def gray(): ... -def hot(): ... -def hsv(): ... -def jet(): ... -def pink(): ... -def prism(): ... -def spring(): ... -def summer(): ... -def winter(): ... -def magma(): ... -def inferno(): ... -def plasma(): ... -def viridis(): ... -def nipy_spectral(): ... diff --git a/stubs/matplotlib/quiver.pyi b/stubs/matplotlib/quiver.pyi deleted file mode 100644 index ca3c55da..00000000 --- a/stubs/matplotlib/quiver.pyi +++ /dev/null @@ -1,82 +0,0 @@ -from typing import Literal - -from ._typing import * -from .artist import Artist, allow_rasterization -from .axes import Axes -from .backend_bases import Event, MouseEvent, RendererBase -from .collections import PolyCollection -from .figure import Figure - -class QuiverKey(Artist): - halign = ... - valign = ... - pivot = ... - def __init__( - self, - Q: Quiver, - X: float, - Y: float, - U: float, - label: str, - *, - angle: float = 0, - coordinates: Literal["axes", "figure", "data", "inches"] = "axes", - color: Color = ..., - labelsep: float = 0.1, - labelpos: Literal["N", "S", "E", "W"] = ..., - labelcolor: Color = ..., - fontproperties: dict = ..., - **kwargs, - ) -> None: ... - @property - def labelsep(self): ... - @allow_rasterization - def draw(self, renderer: RendererBase): ... - def set_figure(self, fig: Figure): ... - def contains(self, mouseevent: MouseEvent) -> bool: ... - -class Quiver(PolyCollection): - def __init__( - self, - a: Axes, - *args, - scale: float = ..., - headwidth: float = ..., - headlength: float = ..., - headaxislength: float = ..., - minshaft: float = ..., - minlength: float = ..., - units=..., - scale_units=..., - angles=..., - width: float = ..., - color: Color = ..., - pivot=..., - **kwargs, - ) -> None: ... - def get_datalim(self, transData): ... - @allow_rasterization - def draw(self, renderer: RendererBase): ... - def set_UVC(self, U, V, C=...): ... - - quiver_doc = ... - -class Barbs(PolyCollection): - def __init__( - self, - ax: Axes, - *args, - pivot=..., - length: float = ..., - barbcolor: Color = ..., - flagcolor: Color = ..., - sizes=..., - fill_empty=..., - barb_increments=..., - rounding=..., - flip_barb=..., - **kwargs, - ) -> None: ... - def set_UVC(self, U, V, C=...): ... - def set_offsets(self, xy): ... - barbs_doc = ... diff --git a/stubs/matplotlib/rcsetup.pyi b/stubs/matplotlib/rcsetup.pyi deleted file mode 100644 index d8add6ca..00000000 --- a/stubs/matplotlib/rcsetup.pyi +++ /dev/null @@ -1,76 +0,0 @@ -import ast -from typing import Sequence - -from cycler import Cycler - -interactive_bk = ... -non_interactive_bk = ... -all_backends = ... - -class ValidateInStrings: - def __init__( - self, key: str, valid: Sequence[str] | _ignorecase, ignorecase: bool = ..., *, _deprecated_since=... - ) -> None: ... - def __call__(self, s: str) -> str: ... - -def validate_any(s): ... - -validate_anylist = ... - -def validate_bool(b) -> bool: ... -def validate_axisbelow(s) -> bool | str: ... -def validate_dpi(s) -> float | str: ... - -validate_string = ... -validate_string_or_None = ... -validate_stringlist = ... -validate_int = ... -validate_int_or_None = ... -validate_float = ... -validate_float_or_None = ... -validate_floatlist = ... - -def validate_fonttype(s) -> int: ... -def validate_backend(s) -> str: ... -def validate_color_or_inherit(s) -> str: ... -def validate_color_or_auto(s) -> str: ... -def validate_color_for_prop_cycle(s) -> str: ... -def validate_color(s) -> str: ... - -validate_colorlist = ... - -def validate_aspect(s) -> str: ... -def validate_fontsize_None(s) -> None: ... -def validate_fontsize(s) -> float | str: ... - -validate_fontsizelist = ... - -def validate_fontweight(s) -> str: ... -def validate_fontstretch(s) -> str: ... -def validate_font_properties(s) -> str: ... -def validate_whiskers(s) -> float: ... -def validate_ps_distiller(s) -> None: ... - -validate_fillstyle = ... -validate_fillstylelist = ... - -def validate_markevery(s): ... - -validate_markeverylist = ... - -def validate_bbox(s) -> None: ... -def validate_sketch(s) -> None | tuple[float, ...]: ... -def validate_hatch(s): ... - -validate_hatchlist = ... -validate_dashlist = ... - -def cycler(*args, **kwargs) -> Cycler: ... - -class _DunderChecker(ast.NodeVisitor): - def visit_Attribute(self, node): ... - -def validate_cycler(s) -> Cycler: ... -def validate_hist_bins(s) -> int: ... - -class _ignorecase(list): ... diff --git a/stubs/matplotlib/sankey.pyi b/stubs/matplotlib/sankey.pyi deleted file mode 100644 index fd6102da..00000000 --- a/stubs/matplotlib/sankey.pyi +++ /dev/null @@ -1,39 +0,0 @@ -from types import SimpleNamespace -from typing import Sequence - -from .axes import Axes - -RIGHT = ... -UP = ... -DOWN = ... - -class Sankey: - def __init__( - self, - ax: Axes | None = ..., - scale: float = ..., - unit: str = ..., - format: str = ..., - gap: float = ..., - radius: float = ..., - shoulder: float = ..., - offset: float = ..., - head_angle: int = ..., - margin: float = ..., - tolerance: float = ..., - **kwargs, - ) -> None: ... - def add( - self, - patchlabel: str = ..., - flows: Sequence[float] = ..., - orientations: Sequence[int] = ..., - labels: Sequence[str | None] = ..., - trunklength: float = ..., - pathlengths: Sequence[float] = ..., - prior: int = ..., - connect: Sequence[int] = ..., - rotation: float = ..., - **kwargs, - ) -> Sankey: ... - def finish(self) -> list[SimpleNamespace]: ... diff --git a/stubs/matplotlib/scale.pyi b/stubs/matplotlib/scale.pyi deleted file mode 100644 index 812b68d2..00000000 --- a/stubs/matplotlib/scale.pyi +++ /dev/null @@ -1,133 +0,0 @@ -from typing import Any, Callable, Literal, Sequence - -from ._typing import * -from .axis import Axis -from .transforms import Transform - -class ScaleBase: - def __init__(self, axis: Axis) -> None: ... - def get_transform(self) -> Transform: ... - def set_default_locators_and_formatters(self, axis: Axis): ... - def limit_range_for_scale(self, vmin: float, vmax: float, minpos: float): ... - -class LinearScale(ScaleBase): - name = ... - def __init__(self, axis: Axis) -> None: ... - def set_default_locators_and_formatters(self, axis: Axis): ... - def get_transform(self) -> Transform: ... - -class FuncTransform(Transform): - input_dims = ... - def __init__(self, forward: Callable, inverse: Callable) -> None: ... - def transform_non_affine(self, values: ArrayLike) -> list: ... - def inverted(self): ... - -class FuncScale(ScaleBase): - name = ... - def __init__(self, axis: Axis, functions: Sequence[Callable]) -> None: ... - def get_transform(self) -> FuncTransform: ... - def set_default_locators_and_formatters(self, axis): ... - -class LogTransform(Transform): - input_dims = ... - def __init__(self, base, nonpositive: Literal["clip", "mask"] = "clip") -> None: ... - def __str__(self) -> str: ... - def transform_non_affine(self, a) -> list: ... - def inverted(self): ... - -class InvertedLogTransform(Transform): - input_dims = ... - def __init__(self, base) -> None: ... - def __str__(self) -> str: ... - def transform_non_affine(self, a) -> list: ... - def inverted(self): ... - -class LogScale(ScaleBase): - name = ... - def __init__( - self, axis: Axis, *, base: float = 10, subs=Sequence[int], nonpositive: Literal["clip", "mask"] = "clip" - ) -> None: ... - base = ... - def set_default_locators_and_formatters(self, axis: Axis): ... - def get_transform(self) -> LogTransform: ... - def limit_range_for_scale(self, vmin: float, vmax: float, minpos: float): ... - -class FuncScaleLog(LogScale): - name = ... - def __init__(self, axis: Axis, functions: Sequence[Callable], base: float = 10) -> None: ... - @property - def base(self): ... - def get_transform(self) -> Transform: ... - -class SymmetricalLogTransform(Transform): - input_dims = ... - def __init__(self, base, linthresh, linscale) -> None: ... - def transform_non_affine(self, a) -> list: ... - def inverted(self): ... - -class InvertedSymmetricalLogTransform(Transform): - input_dims = ... - def __init__(self, base, linthresh, linscale) -> None: ... - def transform_non_affine(self, a) -> list: ... - def inverted(self): ... - -class SymmetricalLogScale(ScaleBase): - name = ... - def __init__( - self, axis: Axis, *, base: float = 10, linthresh: float = 2, subs: Sequence[int] = ..., linscale: float = ... - ) -> None: ... - - base = ... - linthresh = ... - linscale = ... - def set_default_locators_and_formatters(self, axis: Axis): ... - def get_transform(self) -> SymmetricalLogTransform: ... - -class AsinhTransform(Transform): - input_dims = ... - def __init__(self, linear_width) -> None: ... - def transform_non_affine(self, a) -> list: ... - def inverted(self): ... - -class InvertedAsinhTransform(Transform): - input_dims = ... - def __init__(self, linear_width) -> None: ... - def transform_non_affine(self, a) -> list: ... - def inverted(self): ... - -class AsinhScale(ScaleBase): - name = ... - auto_tick_multipliers = ... - def __init__(self, axis: Axis, *, linear_width: float = 1, base: float = 10, subs: Sequence[int] = ..., **kwargs) -> None: ... - linear_width = ... - def get_transform(self): ... - def set_default_locators_and_formatters(self, axis): ... - -class LogitTransform(Transform): - input_dims = ... - def __init__(self, nonpositive: Literal["mask", "clip"] = ...) -> None: ... - def transform_non_affine(self, a): ... - def inverted(self): ... - def __str__(self) -> str: ... - -class LogisticTransform(Transform): - input_dims = ... - def __init__(self, nonpositive: Literal["mask", "clip"] = ...) -> None: ... - def transform_non_affine(self, a): ... - def inverted(self): ... - def __str__(self) -> str: ... - -class LogitScale(ScaleBase): - name = ... - def __init__( - self, axis: Axis, nonpositive: Literal["mask", "clip"] = ..., *, one_half: str = ..., use_overline=... - ) -> None: ... - def get_transform(self) -> LogitTransform: ... - def set_default_locators_and_formatters(self, axis: Axis): ... - def limit_range_for_scale(self, vmin: float, vmax: float, minpos: float): ... - -def get_scale_names(): ... -def scale_factory( - scale: Literal["asinh", "function", "functionlog", "linear", "log", "logit", "symlog"], axis: Axis, **kwargs -): ... -def register_scale(scale_class): ... diff --git a/stubs/matplotlib/spines.pyi b/stubs/matplotlib/spines.pyi deleted file mode 100644 index 0b15f581..00000000 --- a/stubs/matplotlib/spines.pyi +++ /dev/null @@ -1,59 +0,0 @@ -from collections import OrderedDict -from collections.abc import MutableMapping -from functools import partial -from typing import Sequence - -from ._typing import * -from .artist import allow_rasterization -from .axes import Axes -from .axis import Axis, XAxis, YAxis -from .backend_bases import RendererBase -from .patches import Patch -from .path import Path -from .transforms import Transform - -class Spine(Patch): - def __str__(self) -> str: ... - def __init__(self, axes: Axes, spine_type: str, path: Path, **kwargs) -> None: ... - def set_patch_arc(self, center: Sequence[float], radius: float, theta1: float, theta2: float) -> None: ... - def set_patch_circle(self, center: Sequence[float], radius: float) -> None: ... - def set_patch_line(self): ... - def get_patch_transform(self): ... - def get_window_extent(self, renderer: RendererBase = ...): ... - def get_path(self): ... - def register_axis(self, axis: Axis) -> None: ... - def clear(self) -> None: ... - @allow_rasterization - def draw(self, renderer: RendererBase): ... - def set_position(self, position: tuple[str, float]) -> None: ... - def get_position(self) -> tuple[str, float]: ... - def get_spine_transform(self) -> Transform: ... - def set_bounds(self, low: float | None = ..., high: float | None = ...) -> None: ... - def get_bounds(self): ... - @classmethod - def linear_spine(cls, axes, spine_type, **kwargs) -> Spine: ... - @classmethod - def arc_spine( - cls, axes, spine_type, center: Sequence[float], radius: float, theta1: float, theta2: float, **kwargs - ) -> Spine: ... - @classmethod - def circular_spine(cls, axes, center, radius, **kwargs): ... - def set_color(self, c: Color) -> None: ... - -class SpinesProxy: - def __init__(self, spine_dict: dict[str, Spine]) -> None: ... - def __getattr__(self, name: str) -> partial: ... - def __dir__(self): ... - -class Spines(MutableMapping): - def __init__(self, **kwargs) -> None: ... - @classmethod - def from_dict(cls, d: OrderedDict | dict[str, Spine]) -> "Spines": ... - def __getstate__(self): ... - def __setstate__(self, state): ... - def __getattr__(self, name: str) -> Spine: ... - def __getitem__(self, key: list[str] | slice | str) -> Spine: ... - def __setitem__(self, key: str, value: Spine) -> None: ... - def __delitem__(self, key): ... - def __iter__(self): ... - def __len__(self) -> int: ... diff --git a/stubs/matplotlib/stackplot.pyi b/stubs/matplotlib/stackplot.pyi deleted file mode 100644 index 39d78f21..00000000 --- a/stubs/matplotlib/stackplot.pyi +++ /dev/null @@ -1,16 +0,0 @@ -from typing import Literal, Sequence - -from ._typing import * -from .collections import PolyCollection - -__all__ = ["stackplot"] - -def stackplot( - axes, - x: ArrayLike, - *args, - labels: Sequence[str] = ..., - colors: Sequence[Color] = ..., - baseline: Literal["zero", "sym", "wiggle", "weighted_wiggle"] = ..., - **kwargs, -) -> list[PolyCollection]: ... diff --git a/stubs/matplotlib/streamplot.pyi b/stubs/matplotlib/streamplot.pyi deleted file mode 100644 index 16848cd1..00000000 --- a/stubs/matplotlib/streamplot.pyi +++ /dev/null @@ -1,62 +0,0 @@ -from typing import Literal, Sequence - -from ._typing import * -from .axes import Axes -from .colors import Colormap, Normalize - -__all__ = ["streamplot"] - -def streamplot( - axes: Axes, - x: ArrayLike, - y: ArrayLike, - u: ArrayLike, - v: ArrayLike, - density: float = ..., - linewidth: float = ..., - color: Color = ..., - cmap: Colormap = ..., - norm: Normalize = ..., - arrowsize: float = ..., - arrowstyle: str = ..., - minlength: float = ..., - transform=..., - zorder: int = ..., - start_points: ArrayLike = ..., - maxlength: float = ..., - integration_direction: Literal["forward", "backward", "both"] = ..., - broken_streamlines: bool = ..., -) -> StreamplotSet: ... - -class StreamplotSet: - def __init__(self, lines, arrows) -> None: ... - -class DomainMap: - def __init__(self, grid: Grid, mask: StreamMask) -> None: ... - def grid2mask(self, xi, yi): ... - def mask2grid(self, xm, ym): ... - def data2grid(self, xd, yd): ... - def grid2data(self, xg, yg): ... - def start_trajectory(self, xg, yg, broken_streamlines=...): ... - def reset_start_point(self, xg, yg): ... - def update_trajectory(self, xg, yg, broken_streamlines=...): ... - def undo_trajectory(self) -> None: ... - -class Grid: - def __init__(self, x, y) -> None: ... - @property - def shape(self) -> tuple[int, int]: ... - def within_grid(self, xi, yi): ... - -class StreamMask: - def __init__(self, density: float | Sequence[float]) -> None: ... - def __getitem__(self, args): ... - -class InvalidIndexError(Exception): ... -class TerminateTrajectory(Exception): ... - -def get_integrator(u, v, dmap, minlength, maxlength, integration_direction): ... - -class OutOfBounds(IndexError): ... - -def interpgrid(a, xi, yi): ... diff --git a/stubs/matplotlib/streamploy.pyi b/stubs/matplotlib/streamploy.pyi deleted file mode 100644 index 932bbb43..00000000 --- a/stubs/matplotlib/streamploy.pyi +++ /dev/null @@ -1,6 +0,0 @@ -from typing import Any - -class StreamplotSet: - def __getattr__(self, name: str) -> Any: ... # incomplete - -def __getattr__(name: str) -> Any: ... # incomplete diff --git a/stubs/matplotlib/style/__init__.pyi b/stubs/matplotlib/style/__init__.pyi deleted file mode 100644 index 7918cad6..00000000 --- a/stubs/matplotlib/style/__init__.pyi +++ /dev/null @@ -1,14 +0,0 @@ -# COMPLETE - -from pathlib import Path -from typing import Any, Dict, List, Mapping, Union - -_Style = Union[str, Path, Mapping[str, Any]] -_StyleOrList = Union[_Style, List[_Style]] - -def context(style: _StyleOrList, after_reset: bool = ...) -> None: ... -def reload_library() -> None: ... -def use(style: _StyleOrList) -> None: ... - -library: Dict[str, Any] -available: List[str] diff --git a/stubs/matplotlib/style/core.pyi b/stubs/matplotlib/style/core.pyi deleted file mode 100644 index bec1f709..00000000 --- a/stubs/matplotlib/style/core.pyi +++ /dev/null @@ -1,28 +0,0 @@ -import contextlib -from typing import Generator - -__all__ = ["use", "context", "available", "library", "reload_library"] - -class __getattr__: - STYLE_FILE_PATTERN = ... - -BASE_LIBRARY_PATH: str = ... -USER_LIBRARY_PATHS: list[str] = ... -STYLE_EXTENSION: str = ... -STYLE_BLACKLIST: set[str] = ... - -def use(style: str) -> None: ... -@contextlib.contextmanager -def context(style: str, after_reset: bool = ...) -> Generator: ... -def load_base_library() -> dict: ... -def iter_user_libraries() -> Generator: ... -def update_user_library(library): ... -def read_style_directory( - style_dir: str, -) -> dict: ... -def update_nested_dict(main_dict: dict, new_dict: dict): ... - -library = ... -available: list = ... - -def reload_library() -> None: ... diff --git a/stubs/matplotlib/table.pyi b/stubs/matplotlib/table.pyi deleted file mode 100644 index 492fb01b..00000000 --- a/stubs/matplotlib/table.pyi +++ /dev/null @@ -1,91 +0,0 @@ -from typing import Literal, Sequence - -from ._typing import * -from .artist import Artist, allow_rasterization -from .axes import Axes -from .backend_bases import MouseEvent, RendererBase -from .figure import Figure -from .font_manager import FontProperties -from .patches import Rectangle -from .path import Path -from .text import Text -from .transforms import Bbox, Transform - -class Cell(Rectangle): - PAD = ... - - def __init__( - self, - xy: Sequence[float], - width: float, - height: float, - edgecolor: Color = ..., - facecolor: Color = ..., - fill: bool = ..., - text: str = ..., - loc: Literal["left", "center", "right"] = "right", - fontproperties: FontProperties = ..., - *, - visible_edges: str = "closed", - ) -> None: ... - def set_transform(self, trans: Transform): ... - def set_figure(self, fig: Figure) -> None: ... - def get_text(self) -> Text: ... - def set_fontsize(self, size: float) -> None: ... - def get_fontsize(self) -> float: ... - def auto_set_font_size(self, renderer: RendererBase) -> float: ... - @allow_rasterization - def draw(self, renderer): - RendererBase: ... - - def get_text_bounds(self, renderer: RendererBase): ... - def get_required_width(self, renderer: RendererBase): ... - def set_text_props(self, **kwargs) -> None: ... - @property - def visible_edges(self) -> str: ... - @visible_edges.setter - def visible_edges(self, value: str): ... - def get_path(self) -> Path: ... - -CustomCell = Cell - -class Table(Artist): - codes = ... - FONTSIZE = ... - AXESPAD = ... - def __init__(self, ax: Axes, loc: str = ..., bbox: Bbox = ..., **kwargs) -> None: ... - def add_cell(self, row: int, col: int, *args, **kwargs) -> Cell: ... - def __setitem__(self, position: Sequence[int], cell: Cell) -> None: ... - def __getitem__(self, position) -> Cell: ... - @property - def edges(self): ... - @edges.setter - def edges(self, value): ... - @allow_rasterization - def draw(self, renderer: RendererBase): ... - def contains(self, mouseevent: MouseEvent): ... - def get_children(self) -> list[Artist]: ... - def get_window_extent(self, renderer: RendererBase = ...): ... - def auto_set_column_width(self, col: int) -> None: ... - def auto_set_font_size(self, value: float = ...): ... - def scale(self, xscale: float, yscale: float): ... - def set_fontsize(self, size: float): ... - def get_celld(self) -> dict[Sequence[int], Cell]: ... - -def table( - ax, - cellText: ArrayLike = ..., - cellColours: ArrayLike = ..., - cellLoc: Literal["left", "center", "right"] = "right", - colWidths: Sequence[float] = ..., - rowLabels: Sequence[str] = ..., - rowColours: Sequence[Color] = ..., - rowLoc: Literal["left", "center", "right"] = "left", - colLabels: Sequence[str] = ..., - colColours: Sequence[Color] = ..., - colLoc: Literal["left", "center", "right"] = "left", - loc: str = ..., - bbox: Bbox = ..., - edges: str | Literal["open", "closed", "horizontal", "vertical"] = ..., - **kwargs, -) -> Table: ... diff --git a/stubs/matplotlib/testing/__init__.pyi b/stubs/matplotlib/testing/__init__.pyi deleted file mode 100644 index 964e6fa3..00000000 --- a/stubs/matplotlib/testing/__init__.pyi +++ /dev/null @@ -1,3 +0,0 @@ -from typing import Any - -def __getattr__(name: str) -> Any: ... # incomplete diff --git a/stubs/matplotlib/texmanager.pyi b/stubs/matplotlib/texmanager.pyi deleted file mode 100644 index ab68e940..00000000 --- a/stubs/matplotlib/texmanager.pyi +++ /dev/null @@ -1,32 +0,0 @@ -import functools - -from .backend_bases import RendererBase - -class TexManager: - texcache = ... - - grey_arrayd = ... - font_family = ... - font_families = ... - font_info = ... - @functools.lru_cache() - def __new__(cls) -> TexManager: ... - def get_font_config(self): ... - @classmethod - def get_basefile(cls, tex: str, fontsize: float, dpi: None = ...) -> str: ... - @classmethod - def get_font_preamble(cls): ... - @classmethod - def get_custom_preamble(cls) -> str: ... - @classmethod - def make_tex(cls, tex: str, fontsize: float) -> str: ... - @classmethod - def make_dvi(cls, tex: str, fontsize: float): ... - @classmethod - def make_png(cls, tex: str, fontsize: float, dpi: float): ... - @classmethod - def get_grey(cls, tex: str, fontsize: float = ..., dpi: float = ...): ... - @classmethod - def get_rgba(cls, tex: str, fontsize: float = ..., dpi: float = ..., rgb=...): ... - @classmethod - def get_text_width_height_descent(cls, tex: str, fontsize: float, renderer: RendererBase = ...): ... diff --git a/stubs/matplotlib/text.pyi b/stubs/matplotlib/text.pyi deleted file mode 100644 index a12a2266..00000000 --- a/stubs/matplotlib/text.pyi +++ /dev/null @@ -1,210 +0,0 @@ -import pathlib -from pathlib import PosixPath -from typing import Any, Callable, Literal, Sequence - -from matplotlib.path import Path - -from ._typing import * -from .artist import Artist, allow_rasterization -from .backend_bases import MouseEvent, RendererBase -from .figure import Figure -from .font_manager import FontProperties -from .offsetbox import DraggableAnnotation -from .patches import FancyBboxPatch -from .transforms import Bbox, Transform - -def get_rotation(rotation: float | Literal[None, "horizontal", "vertical"]) -> float: ... - -class Text(Artist): - zorder = ... - def __repr__(self): ... - def __init__( - self, - x: float = ..., - y: float = ..., - text: str = ..., - color: Color = ..., - verticalalignment: str = ..., - horizontalalignment: str = ..., - multialignment: str = ..., - fontproperties: FontProperties = ..., - rotation: float | str = ..., - linespacing: float = ..., - rotation_mode: str = ..., - usetex: bool = ..., - wrap: bool = ..., - transform_rotates_text: bool = ..., - *, - parse_math=..., - **kwargs, - ) -> None: ... - def update(self, kwargs: dict[str, Any]) -> None: ... - def __getstate__(self): ... - def contains(self, mouseevent: MouseEvent) -> tuple[bool, dict]: ... - def get_rotation(self) -> float: ... - def get_transform_rotates_text(self) -> bool: ... - def set_rotation_mode(self, m: None | Literal["default", "anchor"]) -> None: ... - def get_rotation_mode(self) -> None | str: ... - def update_from(self, other: Text) -> None: ... - def set_bbox(self, rectprops: dict[str, Any]) -> None: ... - def get_bbox_patch(self) -> None | FancyBboxPatch: ... - def update_bbox_position_size(self, renderer: RendererBase) -> None: ... - def set_clip_box(self, clipbox) -> None: ... - def set_clip_path(self, path: Path, transform: Transform = ...) -> None: ... - def set_clip_on(self, b: bool) -> None: ... - def get_wrap(self) -> bool: ... - def set_wrap(self, wrap: bool) -> None: ... - @allow_rasterization - def draw(self, renderer): ... - def get_color( - self, - ) -> Color: ... - def get_fontproperties(self) -> FontProperties: ... - def get_fontfamily(self) -> list[str]: ... - def get_fontname(self) -> str: ... - def get_fontstyle(self) -> str: ... - def get_fontsize(self) -> float: ... - def get_fontvariant(self) -> str: ... - def get_fontweight(self) -> str: ... - def get_stretch(self) -> str: ... - def get_horizontalalignment(self) -> str: ... - def get_unitless_position(self) -> tuple[float, float]: ... - def get_position( - self, - ) -> tuple[float, float]: ... - def get_prop_tup(self, renderer: RendererBase = ...): ... - def get_text(self) -> str: ... - def get_verticalalignment(self) -> str: ... - def get_window_extent( - self, - renderer: RendererBase = ..., - dpi: float = ..., - ): ... - def set_backgroundcolor(self, color: Color) -> None: ... - def set_color(self, color: Color) -> None: ... - def set_horizontalalignment(self, align: Literal["left", "right", "center"]) -> None: ... - def set_multialignment(self, align: Literal["left", "right", "center"]) -> None: ... - def set_linespacing(self, spacing): ... - def set_fontfamily( - self, - fontname: str | Literal["serif", "sans-serif", "cursive", "fantasy", "monospace"], - ) -> None: ... - def set_fontvariant(self, variant: Literal["normal", "small-caps"]) -> None: ... - def set_fontstyle(self, fontstyle: Literal["normal", "italic", "oblique"]) -> None: ... - def set_fontsize( - self, - fontsize: float | Literal["xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large"], - ) -> None: ... - def get_math_fontfamily(self) -> str: ... - def set_math_fontfamily(self, fontfamily: str) -> None: ... - def set_fontweight( - self, - weight: ( - float - | Literal[ - "ultralight", - "light", - "normal", - "regular", - "book", - "medium", - "roman", - "semibold", - "demibold", - "demi", - "bold", - "heavy", - "extra bold", - "black", - ] - ), - ) -> None: ... - def set_fontstretch( - self, - stretch: ( - float - | Literal[ - "ultra-condensed", - "extra-condensed", - "condensed", - "semi-condensed", - "normal", - "semi-expanded", - "expanded", - "extra-expanded", - "ultra-expanded", - ] - ), - ): ... - def set_position(self, xy: Sequence[float]) -> None: ... - def set_x(self, x: float) -> None: ... - def set_y(self, y: float) -> None: ... - def set_rotation(self, s: float | Literal["vertical", "horizontal"]) -> None: ... - def set_transform_rotates_text(self, t: bool): ... - def set_verticalalignment(self, align: Literal["bottom", "baseline", "center", "center_baseline", "top"]) -> None: ... - def set_text(self, s) -> None: ... - def set_fontproperties(self, fp: str | pathlib.Path | PosixPath | FontProperties) -> None: ... - def set_usetex(self, usetex: bool) -> None: ... - def get_usetex(self) -> bool: ... - def set_parse_math(self, parse_math: bool) -> None: ... - def get_parse_math(self) -> bool: ... - def set_fontname( - self, - fontname: str | Literal["serif", "sans-serif", "cursive", "fantasy", "monospace"], - ) -> None: ... - -class OffsetFrom: - def __init__( - self, - artist: Annotation, - ref_coord: Sequence[float], - unit: Literal["points", "pixels"] = "points", - ) -> None: ... - def set_unit(self, unit: str) -> None: ... - def get_unit(self) -> str: ... - def __call__(self, renderer: RendererBase) -> Transform: ... - -class _AnnotationBase: - def __init__( - self, - xy: Sequence[float], - xycoords: str | Artist | Transform | Callable | Sequence[float] = ..., - annotation_clip: bool = ..., - ) -> None: ... - def set_annotation_clip(self, b: bool | None) -> None: ... - def get_annotation_clip(self) -> bool | None: ... - def draggable(self, state: bool | None = ..., use_blit: bool = ...) -> None | DraggableAnnotation: ... - -class Annotation(Text, _AnnotationBase): - def __str__(self) -> str: ... - def __init__( - self, - text: str, - xy: Sequence[float], - xytext: Sequence[float] = ..., - xycoords: str | Artist | Transform | Callable | Sequence[float] = "data", - textcoords: str | Artist | Transform | Callable | Sequence[float] = ..., - arrowprops: dict = ..., - annotation_clip: bool | None = ..., - **kwargs, - ) -> None: ... - def contains(self, event): ... - @property - def xycoords(self) -> str | Artist | Transform | Callable | Sequence[float]: ... - @xycoords.setter - def xycoords(self, xycoords: str | Artist | Transform | Callable | Sequence[float]): ... - @property - def xyann(self): ... - @xyann.setter - def xyann(self, xytext): ... - def get_anncoords( - self, - ) -> str | Artist | Transform | Callable | Sequence[float]: ... - def set_anncoords(self, coords: str | Artist | Transform | Callable | Sequence[float]): ... - anncoords = ... - def set_figure(self, fig: Figure) -> None: ... - def update_positions(self, renderer: RendererBase) -> None: ... - @allow_rasterization - def draw(self, renderer: RendererBase): ... - def get_window_extent(self, renderer: RendererBase = ...): ... - def get_tightbbox(self, renderer: RendererBase = ...) -> Bbox: ... diff --git a/stubs/matplotlib/textmanager.pyi b/stubs/matplotlib/textmanager.pyi deleted file mode 100644 index 964e6fa3..00000000 --- a/stubs/matplotlib/textmanager.pyi +++ /dev/null @@ -1,3 +0,0 @@ -from typing import Any - -def __getattr__(name: str) -> Any: ... # incomplete diff --git a/stubs/matplotlib/textpath.pyi b/stubs/matplotlib/textpath.pyi deleted file mode 100644 index 1a8448c0..00000000 --- a/stubs/matplotlib/textpath.pyi +++ /dev/null @@ -1,36 +0,0 @@ -from typing import Literal, Sequence - -from matplotlib.texmanager import TexManager - -from .font_manager import FontProperties -from .path import Path - -class TextToPath: - FONT_SCALE = ... - DPI = ... - def __init__(self) -> None: ... - def get_text_width_height_descent(self, s: str, prop: FontProperties, ismath: bool | Literal["TeX"]): ... - def get_text_path(self, prop: FontProperties, s: str, ismath: bool | Literal["TeX"] = ...): ... - def get_glyphs_with_font(self, font: FontProperties, s: str, glyph_map=..., return_new_glyphs_only=...): ... - def get_glyphs_mathtext(self, prop: FontProperties, s: str, glyph_map=..., return_new_glyphs_only=...): ... - def get_texmanager(self) -> TexManager: ... - def get_glyphs_tex(self, prop: FontProperties, s: str, glyph_map=..., return_new_glyphs_only=...): ... - -text_to_path = ... - -class TextPath(Path): - def __init__( - self, - xy: Sequence[float], - s: str, - size=..., - prop: FontProperties = ..., - _interpolation_steps: int = ..., - usetex: bool = False, - ) -> None: ... - def set_size(self, size: float): ... - def get_size(self) -> float: ... - @property - def vertices(self) -> Path: ... - @property - def codes(self): ... diff --git a/stubs/matplotlib/ticker.pyi b/stubs/matplotlib/ticker.pyi deleted file mode 100644 index 2ad53b7a..00000000 --- a/stubs/matplotlib/ticker.pyi +++ /dev/null @@ -1,320 +0,0 @@ -from functools import partial -from typing import Any, Callable, Literal, Sequence - -from ._typing import * -from .axis import Axis -from .scale import SymmetricalLogTransform - -__all__ = ( - "TickHelper", - "Formatter", - "FixedFormatter", - "NullFormatter", - "FuncFormatter", - "FormatStrFormatter", - "StrMethodFormatter", - "ScalarFormatter", - "LogFormatter", - "LogFormatterExponent", - "LogFormatterMathtext", - "LogFormatterSciNotation", - "LogitFormatter", - "EngFormatter", - "PercentFormatter", - "Locator", - "IndexLocator", - "FixedLocator", - "NullLocator", - "LinearLocator", - "LogLocator", - "AutoLocator", - "MultipleLocator", - "MaxNLocator", - "AutoMinorLocator", - "SymmetricalLogLocator", - "AsinhLocator", - "LogitLocator", -) - -class _DummyAxis: - dataLim = ... - viewLim = ... - def __init__(self, minpos: int = ...) -> None: ... - def get_view_interval(self): ... - def set_view_interval(self, vmin: float, vmax: float): ... - def get_minpos(self): ... - def get_data_interval(self): ... - def set_data_interval(self, vmin: float, vmax: float): ... - def get_tick_space(self): ... - -class TickHelper: - axis = ... - def set_axis(self, axis: Axis) -> None: ... - def create_dummy_axis(self, **kwargs) -> None: ... - def set_view_interval(self, vmin: float, vmax: float): ... - def set_data_interval(self, vmin: float, vmax: float): ... - def set_bounds(self, vmin: float, vmax: float): ... - -class Formatter(TickHelper): - locs = ... - def __call__(self, x, pos=...): ... - def format_ticks(self, values: Sequence[float]) -> list[str]: ... - def format_data(self, value) -> str: ... - def format_data_short(self, value) -> str: ... - def get_offset(self) -> str: ... - def set_locs(self, locs: ArrayLike) -> None: ... - @staticmethod - def fix_minus(s: str) -> str: ... - -class NullFormatter(Formatter): - def __call__(self, x: float, pos: int = ...): ... - -class FixedFormatter(Formatter): - def __init__(self, seq: Sequence[str]) -> None: ... - def __call__(self, x: float, pos: int = ...): ... - def get_offset(self) -> str: ... - def set_offset_string(self, ofs: str): ... - -class FuncFormatter(Formatter): - def __init__(self, func: Callable | partial) -> None: ... - def __call__(self, x: float, pos: int = ...): ... - def get_offset(self) -> str: ... - def set_offset_string(self, ofs: str): ... - -class FormatStrFormatter(Formatter): - def __init__(self, fmt: str) -> None: ... - def __call__(self, x: float, pos: int = ...): ... - -class StrMethodFormatter(Formatter): - def __init__(self, fmt: str) -> None: ... - def __call__(self, x: float, pos: int = ...): ... - -class ScalarFormatter(Formatter): - def __init__( - self, - useOffset: bool | float = ..., - useMathText: bool | None = ..., - useLocale: bool | None = ..., - ) -> None: ... - def get_useOffset(self): ... - def set_useOffset(self, val: bool | float) -> None: ... - useOffset = ... - def get_useLocale(self) -> bool | None: ... - def set_useLocale(self, val: bool | None): ... - useLocale = ... - def get_useMathText(self) -> bool | None: ... - def set_useMathText(self, val: bool | None) -> None: ... - useMathText = ... - def __call__(self, x: float, pos: int = ...) -> str: ... - def set_scientific(self, bool) -> None: ... - def set_powerlimits(self, lims: Sequence[int]): ... - def format_data_short(self, value) -> str: ... - def format_data(self, value) -> str: ... - def get_offset(self) -> str: ... - def set_locs(self, locs: Sequence[float]) -> None: ... - -class LogFormatter(Formatter): - def __init__( - self, - base: Sequence[float] = ..., - labelOnlyBase: bool = False, - minor_thresholds: Sequence[float] = ..., - linthresh: None | float = None, - ) -> None: ... - def base(self, base): ... - def label_minor(self, labelOnlyBase: bool): ... - def set_locs(self, locs=...): ... - def __call__(self, x: float, pos: int = ...): ... - def format_data(self, value) -> str: ... - def format_data_short(self, value) -> str: ... - -class LogFormatterExponent(LogFormatter): ... - -class LogFormatterMathtext(LogFormatter): - def __call__(self, x: float, pos: int = ...): ... - -class LogFormatterSciNotation(LogFormatterMathtext): ... - -class LogitFormatter(Formatter): - def __init__( - self, - *, - use_overline: bool = False, - one_half: str = "\\frac{1}{2}", - minor: bool = False, - minor_threshold: int = 25, - minor_number: int = 6, - ) -> None: ... - def use_overline(self, use_overline: bool = False): ... - def set_one_half(self, one_half: str = "\\frac{1}{2}"): ... - def set_minor_threshold(self, minor_threshold: int): ... - def set_minor_number(self, minor_number: int): ... - def set_locs(self, locs): ... - def __call__(self, x: float, pos: int = ...): ... - def format_data_short(self, value) -> str: ... - -class EngFormatter(Formatter): - ENG_PREFIXES = ... - def __init__( - self, unit: str = "", places: int | None = None, sep: str = " ", *, usetex: bool = ..., useMathText: bool = ... - ) -> None: ... - def get_usetex(self) -> bool: ... - def set_usetex(self, val: bool) -> None: ... - - usetex = ... - def get_useMathText(self) -> bool: ... - def set_useMathText(self, val: bool) -> None: ... - - useMathText = ... - def __call__(self, x: float, pos: int = ...): ... - def format_eng(self, num) -> str: ... - -class PercentFormatter(Formatter): - def __init__( - self, - xmax: float = ..., - decimals: None | int = ..., - symbol: str | None = ..., - is_latex: bool = ..., - ) -> None: ... - def __call__(self, x: float, pos: int = ...): ... - def format_pct(self, x, display_range) -> str: ... - def convert_to_pct(self, x): ... - @property - def symbol(self) -> str: ... - @symbol.setter - def symbol(self, symbol: str): ... - -class Locator(TickHelper): - MAXTICKS = ... - def tick_values(self, vmin: float, vmax: float): ... - def set_params(self, **kwargs): ... - def __call__(self): ... - def raise_if_exceeds(self, locs): ... - def nonsingular(self, v0: float, v1: float) -> tuple[float, float]: ... - def view_limits(self, vmin: float, vmax: float): ... - -class IndexLocator(Locator): - def __init__(self, base: float, offset: float) -> None: ... - def set_params(self, base: float = ..., offset: float = ...): ... - def __call__(self): ... - def tick_values(self, vmin: float, vmax: float): ... - -class FixedLocator(Locator): - def __init__(self, locs, nbins: int | None = ...) -> None: ... - def set_params(self, nbins: int | None = ...): ... - def __call__(self): ... - def tick_values(self, vmin: float, vmax: float): ... - -class NullLocator(Locator): - def __call__(self) -> list: ... - def tick_values(self, vmin: float, vmax: float) -> list: ... - -class LinearLocator(Locator): - def __init__(self, numticks: int = ..., presets: dict = ...) -> None: ... - @property - def numticks(self): ... - @numticks.setter - def numticks(self, numticks: int): ... - def set_params(self, numticks: int = ..., presets: dict = ...): ... - def __call__(self): ... - def tick_values(self, vmin: float, vmax: float): ... - def view_limits(self, vmin: float, vmax: float): ... - -class MultipleLocator(Locator): - def __init__(self, base: float = ...) -> None: ... - def set_params(self, base: float): ... - def __call__(self): ... - def tick_values(self, vmin: float, vmax: float): ... - def view_limits(self, dmin: float, dmax: float): ... - -def scale_range(vmin: float, vmax: float, n: int = ..., threshold: int = ...) -> tuple[float, int]: ... - -class _Edge_integer: - def __init__(self, step: float, offset: float) -> None: ... - def closeto(self, ms, edge): ... - def le(self, x: float) -> float: ... - def ge(self, x: float) -> float: ... - -class MaxNLocator(Locator): - default_params = ... - def __init__(self, nbins: int | Literal["auto"] = 10, **kwargs) -> None: ... - def set_params(self, **kwargs) -> None: ... - def __call__(self): ... - def tick_values(self, vmin: float, vmax: float): ... - def view_limits(self, dmin: float, dmax: float) -> tuple[float, float]: ... - -def is_decade(x, base=..., *, rtol=...): ... -def is_close_to_int(x, *, atol=...): ... - -class LogLocator(Locator): - def __init__( - self, - base: float = ..., - subs: None | str | Sequence[float] = ..., - numdecs: int = ..., - numticks: None | int = ..., - ) -> None: ... - def set_params( - self, - base: float = ..., - subs: None | str | Sequence[float] = ..., - numdecs: int = ..., - numtick: None | int = ..., - ): ... - def base(self, base: float) -> None: ... - def subs(self, subs: None | str | Sequence[float]) -> None: ... - def __call__(self): ... - def tick_values(self, vmin: float, vmax: float): ... - def view_limits(self, vmin: float, vmax: float): ... - def nonsingular(self, vmin: float, vmax: float) -> tuple[float, float]: ... - -class SymmetricalLogLocator(Locator): - def __init__( - self, - transform: SymmetricalLogTransform = ..., - subs: Sequence[float] = ..., - linthresh: float = ..., - base: float = ..., - ) -> None: ... - def set_params(self, subs: Sequence[float] = ..., numticks: int | None = ...): ... - def __call__(self): ... - def tick_values(self, vmin: float, vmax: float): ... - def view_limits(self, vmin: float, vmax: float): ... - -class AsinhLocator(Locator): - def __init__( - self, - linear_width: float, - numticks: int = 11, - symthresh: float = 0.2, - base: int = 10, - subs: Sequence[int] = ..., - ) -> None: ... - def set_params( - self, - numticks: int = ..., - symthresh: float = ..., - base: int = ..., - subs: Sequence[int] = ..., - ): ... - def __call__(self): ... - def tick_values(self, vmin: float, vmax: float): ... - -class LogitLocator(MaxNLocator): - def __init__(self, minor: bool = ..., *, nbins: int | Literal["auto"] = ...) -> None: ... - def set_params(self, minor: None = ..., **kwargs) -> None: ... - @property - def minor(self): ... - @minor.setter - def minor(self, value): ... - def tick_values(self, vmin: float, vmax: float): ... - def nonsingular(self, vmin: float, vmax: float) -> tuple[float, float]: ... - -class AutoLocator(MaxNLocator): - def __init__(self) -> None: ... - -class AutoMinorLocator(Locator): - def __init__(self, n: int | None = ...) -> None: ... - def __call__(self) -> list: ... - def tick_values(self, vmin: float, vmax: float): ... diff --git a/stubs/matplotlib/tight_layout.pyi b/stubs/matplotlib/tight_layout.pyi deleted file mode 100644 index 964e6fa3..00000000 --- a/stubs/matplotlib/tight_layout.pyi +++ /dev/null @@ -1,3 +0,0 @@ -from typing import Any - -def __getattr__(name: str) -> Any: ... # incomplete diff --git a/stubs/matplotlib/transforms.pyi b/stubs/matplotlib/transforms.pyi deleted file mode 100644 index 1abc8ab4..00000000 --- a/stubs/matplotlib/transforms.pyi +++ /dev/null @@ -1,405 +0,0 @@ -from typing import Literal, Sequence - -import numpy as np -from matplotlib._typing import * -from matplotlib.figure import Figure -from matplotlib.patches import Patch -from matplotlib.path import Path - -DEBUG = ... - -class TransformNode: - INVALID_NON_AFFINE = ... - INVALID_AFFINE = ... - INVALID = ... - is_affine = ... - is_bbox = ... - pass_through = ... - def __init__(self, shorthand_name: str = ...) -> None: ... - if DEBUG: - def __str__(self) -> str: ... - - def __getstate__(self): ... - def __setstate__(self, data_dict): ... - def __copy__(self): ... - def invalidate(self): ... - def set_children(self, *children): ... - def frozen(self): ... - -class BboxBase(TransformNode): - is_bbox = ... - is_affine = ... - if DEBUG: - ... - - def frozen(self): ... - def __array__(self, *args, **kwargs): ... - @property - def x0(self) -> float: ... - @property - def y0(self) -> float: ... - @property - def x1(self) -> float: ... - @property - def y1(self) -> float: ... - @property - def p0(self) -> tuple[float, float]: ... - @property - def p1(self) -> tuple[float, float]: ... - @property - def xmin(self) -> float: ... - @property - def ymin(self) -> float: ... - @property - def xmax(self) -> float: ... - @property - def ymax(self) -> float: ... - @property - def min(self) -> tuple[float, float]: ... - @property - def max(self) -> tuple[float, float]: ... - @property - def intervalx(self) -> tuple[float, float]: ... - @property - def intervaly(self) -> tuple[float, float]: ... - @property - def width(self) -> float: ... - @property - def height(self) -> float: ... - @property - def size(self) -> tuple[float, float]: ... - @property - def bounds(self) -> tuple[float, float, float, float]: ... - @property - def extents(self) -> tuple[float, float, float, float]: ... - def get_points(self): ... - def containsx(self, x) -> bool: ... - def containsy(self, y) -> bool: ... - def contains(self, x, y) -> bool: ... - def overlaps(self, other: BboxBase) -> bool: ... - def fully_containsx(self, x: float) -> bool: ... - def fully_containsy(self, y: float) -> bool: ... - def fully_contains(self, x: float, y: float) -> bool: ... - def fully_overlaps(self, other: BboxBase) -> bool: ... - def transformed(self, transform: Transform): ... - coefs = ... - def anchored( - self, - c: Sequence[float] | Literal["C", "SW", "S", "SE", "E", "NE", "N", "NW", "W"], - container: Bbox = ..., - ): ... - def shrunk(self, mx: float, my: float) -> Bbox: ... - def shrunk_to_aspect(self, box_aspect: float, container=..., fig_aspect: float = ...) -> Bbox: ... - def splitx(self, *args) -> list[Bbox]: ... - def splity(self, *args) -> list[Bbox]: ... - def count_contains(self, vertices) -> int: ... - def count_overlaps(self, bboxes: Sequence[Bbox]) -> int: ... - def expanded(self, sw: float, sh: float) -> Bbox: ... - def padded(self, p: float) -> Bbox: ... - def translated(self, tx: float, ty: float) -> Bbox: ... - def corners( - self, - ) -> tuple[ - tuple[float, float], - tuple[float, float], - tuple[float, float], - tuple[float, float], - ]: ... - def rotated(self, radians: float) -> Bbox: ... - @staticmethod - def union(bboxes: Sequence[Bbox]) -> Bbox: ... - @staticmethod - def intersection(bbox1: Bbox, bbox2: Bbox) -> None | Bbox: ... - -class Bbox(BboxBase): - def __init__(self, points: np.ndarray, **kwargs) -> None: ... - def invalidate(self): ... - def frozen(self): ... - @staticmethod - def unit() -> Bbox: ... - @staticmethod - def null() -> Bbox: ... - @staticmethod - def from_bounds(x0: float, y0: float, width: float, height: float) -> Bbox: ... - @staticmethod - def from_extents(*args, minpos: float | None = ...): ... - def __format__(self, fmt: str): ... - def __str__(self) -> str: ... - def __repr__(self) -> str: ... - def ignore(self, value: bool): ... - def update_from_path( - self, - path: Path, - ignore: bool | None = ..., - updatex: bool = True, - updatey: bool = True, - ): ... - def update_from_data_x(self, x: np.ndarray, ignore: bool | None = ...): ... - def update_from_data_y(self, y: np.ndarray, ignore: bool | None = ...): ... - def update_from_data_xy( - self, - xy: np.ndarray, - ignore: bool | None = ..., - updatex: bool = True, - updatey: bool = True, - ): ... - @BboxBase.x0.setter - def x0(self, val: float): ... - @BboxBase.y0.setter - def y0(self, val: float): ... - @BboxBase.x1.setter - def x1(self, val: float): ... - @BboxBase.y1.setter - def y1(self, val: float): ... - @BboxBase.p0.setter - def p0(self, val: float): ... - @BboxBase.p1.setter - def p1(self, val: float): ... - @BboxBase.intervalx.setter - def intervalx(self, interval): ... - @BboxBase.intervaly.setter - def intervaly(self, interval): ... - @BboxBase.bounds.setter - def bounds(self, bounds): ... - @property - def minpos(self) -> float: ... - @property - def minposx(self) -> float: ... - @property - def minposy(self) -> float: ... - def get_points(self) -> tuple[tuple[float, float], tuple[float, float]]: ... - def set_points(self, points) -> tuple[tuple[float, float], tuple[float, float]]: ... - def set(self, other: Bbox): ... - def mutated(self) -> bool: ... - def mutatedx(self) -> bool: ... - def mutatedy(self) -> bool: ... - -class TransformedBbox(BboxBase): - def __init__(self, bbox: Bbox, transform: Transform, **kwargs) -> None: ... - def get_points(self): ... - -class LockableBbox(BboxBase): - def __init__( - self, bbox: Bbox, x0: float | None = ..., y0: float | None = ..., x1: float | None = ..., y1: float | None = ..., **kwargs - ) -> None: ... - def get_points(self): ... - @property - def locked_x0(self) -> float | None: ... - @locked_x0.setter - def locked_x0(self, x0: float | None): ... - @property - def locked_y0(self) -> float | None: ... - @locked_y0.setter - def locked_y0(self, y0: float | None): ... - @property - def locked_x1(self) -> float | None: ... - @locked_x1.setter - def locked_x1(self, x1: float | None): ... - @property - def locked_y1(self) -> float | None: ... - @locked_y1.setter - def locked_y1(self, y1: float | None): ... - -class Transform(TransformNode): - input_dims = ... - output_dims = ... - is_separable = ... - has_inverse = ... - def __init_subclass__(cls): ... - def __add__(self, other: Transform) -> Transform: ... - @property - def depth(self) -> int: ... - def contains_branch(self, other: Transform): ... - def contains_branch_seperately(self, other_transform: Transform): ... - def __sub__(self, other: Transform) -> Transform: ... - def __array__(self, *args, **kwargs): ... - def transform(self, values: ArrayLike) -> np.ndarray: ... - def transform_affine(self, values: ArrayLike) -> np.ndarray: ... - def transform_non_affine(self, values: ArrayLike) -> np.ndarray: ... - def transform_bbox(self, bbox: Bbox): ... - def get_affine(self): ... - def get_matrix(self): ... - def transform_point(self, point): ... - def transform_path(self, path: Path) -> Path: ... - def transform_path_affine(self, path: Path) -> Path: ... - def transform_path_non_affine(self, path: Path) -> Path: ... - def transform_angles( - self, - angles: ArrayLike, - pts: ArrayLike, - radians: bool = ..., - pushoff: float = ..., - ) -> np.ndarray: ... - def inverted(self) -> Transform: ... - -class TransformWrapper(Transform): - pass_through = ... - def __init__(self, child: Transform) -> None: ... - def __eq__(self, other: Transform) -> bool: ... - def frozen(self): ... - def set(self, child: Transform): ... - is_affine = ... - is_separable = ... - has_inverse = ... - -class AffineBase(Transform): - is_affine = ... - def __init__(self, *args, **kwargs) -> None: ... - def __array__(self, *args, **kwargs): ... - def __eq__(self, other) -> bool: ... - def transform(self, values: ArrayLike) -> np.ndarray: ... - def transform_affine(self, values: ArrayLike) -> np.ndarray: ... - def transform_non_affine(self, points: ArrayLike) -> np.ndarray: ... - def transform_path(self, path: Path) -> Path: ... - def transform_path_affine(self, path: Path) -> Path: ... - def transform_path_non_affine(self, path: Path) -> Path: ... - def get_affine(self): ... - -class Affine2DBase(AffineBase): - input_dims = ... - output_dims = ... - def frozen(self): ... - @property - def is_separable(self) -> bool: ... - def to_values(self) -> tuple[float, float, float, float, float, float]: ... - def transform_affine(self, points: ArrayLike) -> np.ndarray: ... - def inverted(self) -> Transform: ... - -class Affine2D(Affine2DBase): - def __init__(self, matrix: ArrayLike = ..., **kwargs) -> None: ... - def __str__(self) -> str: ... - @staticmethod - def from_values(a: float, b: float, c: float, d: float, e: float, f: float): ... - def get_matrix(self) -> np.ndarray: ... - def set_matrix(self, mtx: np.ndarray): ... - def set(self, other: Transform): ... - @staticmethod - def identity() -> Affine2D: ... - def clear(self) -> None: ... - def rotate(self, theta: float) -> Affine2D: ... - def rotate_deg(self, degrees: float) -> Affine2D: ... - def rotate_around(self, x: float, y: float, theta: float) -> Affine2D: ... - def rotate_deg_around(self, x: float, y: float, degrees: float) -> Affine2D: ... - def translate(self, tx: float, ty: float) -> Affine2D: ... - def scale(self, sx: float, sy: float = ...) -> Affine2D: ... - def skew(self, xShear: float, yShear: float) -> Affine2D: ... - def skew_deg(self, xShear: float, yShear: float) -> Affine2D: ... - -class IdentityTransform(Affine2DBase): - _mtx = np.identity(3) - def frozen(self): ... - def get_matrix(self): ... - def transform(self, points: ArrayLike) -> np.ndarray: ... - def transform_affine(self, points: ArrayLike) -> np.ndarray: ... - def transform_non_affine(self, points: ArrayLike) -> np.ndarray: ... - def transform_path(self, path: Path) -> Path: ... - def transform_path_affine(self, path: Path) -> Path: ... - def transform_path_non_affine(self, path: Path) -> Path: ... - def get_affine(self): ... - def inverted(self) -> Transform: ... - -class _BlendedMixin: - def __eq__(self, other) -> bool: ... - def contains_branch_seperately(self, transform: Transform) -> bool: ... - -class BlendedGenericTransform(_BlendedMixin, Transform): - input_dims = ... - output_dims = ... - is_separable = ... - pass_through = ... - def __init__(self, x_transform: Transform, y_transform: Transform, **kwargs) -> None: ... - @property - def depth(self): ... - def contains_branch(self, other: Transform) -> bool: ... - - is_affine = ... - has_inverse = ... - def frozen(self): ... - def transform_non_affine(self, points: ArrayLike) -> np.ndarray: ... - def inverted(self) -> Transform: ... - def get_affine(self): ... - -class BlendedAffine2D(_BlendedMixin, Affine2DBase): - is_separable = ... - def __init__(self, x_transform: Transform, y_transform: Transform, **kwargs) -> None: ... - def get_matrix(self): ... - -def blended_transform_factory(x_transform: Transform, y_transform: Transform) -> Transform: ... - -class CompositeGenericTransform(Transform): - pass_through = ... - def __init__(self, a: Transform, b: Transform, **kwargs) -> None: ... - def frozen(self): ... - def __eq__(self, other) -> bool: ... - - depth = ... - is_affine = ... - is_separable = ... - has_inverse = ... - - def transform_affine(self, points: ArrayLike) -> np.ndarray: ... - def transform_non_affine(self, points: ArrayLike) -> np.ndarray: ... - def transform_path_non_affine(self, path: Path) -> Path: ... - def get_affine(self): ... - def inverted(self) -> Transform: ... - -class CompositeAffine2D(Affine2DBase): - def __init__(self, a: Transform, b: Transform, **kwargs) -> None: ... - @property - def depth(self): ... - def get_matrix(self): ... - -def composite_transform_factory(a: Transform, b: Transform) -> Transform: ... - -class BboxTransform(Affine2DBase): - is_separable = ... - def __init__(self, boxin, boxout, **kwargs) -> None: ... - def get_matrix(self): ... - -class BboxTransformTo(Affine2DBase): - is_separable = ... - def __init__(self, boxout, **kwargs) -> None: ... - def get_matrix(self): ... - -class BboxTransformToMaxOnly(BboxTransformTo): - def get_matrix(self): ... - -class BboxTransformFrom(Affine2DBase): - is_separable = ... - def __init__(self, boxin, **kwargs) -> None: ... - def get_matrix(self): ... - -class ScaledTranslation(Affine2DBase): - def __init__(self, xt: float, yt: float, scale_trans, **kwargs) -> None: ... - def get_matrix(self): ... - -class AffineDeltaTransform(Affine2DBase): - def __init__(self, transform: Transform, **kwargs) -> None: ... - def get_matrix(self): ... - -class TransformedPath(TransformNode): - def __init__(self, path, transform: Transform) -> None: ... - def get_transformed_points_and_affine(self) -> Path: ... - def get_transformed_path_and_affine(self) -> Path: ... - def get_fully_transformed_path(self) -> Path: ... - def get_affine(self): ... - -class TransformedPatchPath(TransformedPath): - def __init__(self, patch: Patch) -> None: ... - -def nonsingular( - vmin: float, - vmax: float, - expander: float = ..., - tiny: float = ..., - increasing: bool = ..., -): ... -def interval_contains(interval: Sequence[float], val: float) -> bool: ... -def interval_contains_open(interval: Sequence[float], val: float) -> bool: ... -def offset_copy( - trans: Transform, - fig: Figure | None = None, - x: float = 0, - y: float = 0, - units: Literal["inches", "points", "dots"] = "inches", -) -> Transform: ... diff --git a/stubs/matplotlib/tri/__init__.pyi b/stubs/matplotlib/tri/__init__.pyi deleted file mode 100644 index 964e6fa3..00000000 --- a/stubs/matplotlib/tri/__init__.pyi +++ /dev/null @@ -1,3 +0,0 @@ -from typing import Any - -def __getattr__(name: str) -> Any: ... # incomplete diff --git a/stubs/matplotlib/tri/triangulation.pyi b/stubs/matplotlib/tri/triangulation.pyi deleted file mode 100644 index d80c5183..00000000 --- a/stubs/matplotlib/tri/triangulation.pyi +++ /dev/null @@ -1,26 +0,0 @@ -from typing import Any - -import numpy as np -from matplotlib._typing import * - -from .trifinder import TrapezoidMapTriFinder - -class Triangulation: - def __init__( - self, - x: ArrayLike, - y: ArrayLike, - triangles: ArrayLike = ..., - mask: ArrayLike = ..., - ) -> None: ... - def calculate_plane_coefficients(self, z: ArrayLike) -> np.ndarray: ... - @property - def edges(self) -> np.ndarray: ... - def get_cpp_triangulation(self) -> object: ... - def get_masked_triangles(self) -> np.ndarray: ... - @staticmethod - def get_from_args_and_kwargs(*args, **kwargs) -> tuple[Triangulation, list, dict[str, Any]]: ... - def get_trifinder(self) -> TrapezoidMapTriFinder: ... - @property - def neighbors(self) -> np.ndarray: ... - def set_mask(self, mask: None) -> None: ... diff --git a/stubs/matplotlib/tri/tricontour.pyi b/stubs/matplotlib/tri/tricontour.pyi deleted file mode 100644 index 4c970adb..00000000 --- a/stubs/matplotlib/tri/tricontour.pyi +++ /dev/null @@ -1,8 +0,0 @@ -from matplotlib.axes import Axes -from matplotlib.contour import ContourSet - -class TriContourSet(ContourSet): - def __init__(self, ax: Axes, *args, **kwargs) -> None: ... - -def tricontour(ax: Axes, *args, **kwargs) -> TriContourSet: ... -def tricontourf(ax: Axes, *args, **kwargs) -> TriContourSet: ... diff --git a/stubs/matplotlib/tri/trifinder.pyi b/stubs/matplotlib/tri/trifinder.pyi deleted file mode 100644 index bb16e44f..00000000 --- a/stubs/matplotlib/tri/trifinder.pyi +++ /dev/null @@ -1,11 +0,0 @@ -import numpy as np -from matplotlib._typing import * - -from .triangulation import Triangulation - -class TriFinder: - def __init__(self, triangulation: Triangulation) -> None: ... - -class TrapezoidMapTriFinder(TriFinder): - def __init__(self, triangulation: Triangulation) -> None: ... - def __call__(self, x: ArrayLike, y: ArrayLike) -> np.ndarray: ... diff --git a/stubs/matplotlib/tri/triinterpolate.pyi b/stubs/matplotlib/tri/triinterpolate.pyi deleted file mode 100644 index e95f9d53..00000000 --- a/stubs/matplotlib/tri/triinterpolate.pyi +++ /dev/null @@ -1,90 +0,0 @@ -from typing import Literal, overload - -import numpy as np -from matplotlib._typing import * - -from .triangulation import Triangulation -from .trifinder import TriFinder - -__all__ = ("TriInterpolator", "LinearTriInterpolator", "CubicTriInterpolator") - -class TriInterpolator: - def __init__(self, triangulation: Triangulation, z: ArrayLike, trifinder: TriFinder = ...) -> None: ... - -class LinearTriInterpolator(TriInterpolator): - def __init__( - self, - triangulation: Triangulation, - z: ArrayLike, - trifinder: TriFinder = ..., - ) -> None: ... - def __call__(self, x: ArrayLike, y: ArrayLike) -> np.ndarray: ... - def gradient(self, x: ArrayLike, y: ArrayLike) -> list: ... - -class CubicTriInterpolator(TriInterpolator): - def __init__( - self, - triangulation: Triangulation, - z: ArrayLike, - kind: Literal["min_E", "geom", "user"] = ..., - trifinder: TriFinder = ..., - dz: tuple = ..., - ) -> None: ... - def __call__(self, x: ArrayLike, y: ArrayLike) -> np.ndarray: ... - def gradient(self, x: ArrayLike, y: ArrayLike) -> list: ... - -class _ReducedHCT_Element: - M: np.ndarray = ... - M0: np.ndarray = ... - M1: np.ndarray = ... - M2: np.ndarray = ... - rotate_dV: np.ndarray = ... - rotate_d2V: np.ndarray = ... - n_gauss = ... - gauss_pts: np.ndarray = ... - gauss_w: np.ndarray = ... - E: np.ndarray = ... - J0_to_J1: np.ndarray = ... - J0_to_J2: np.ndarray = ... - - def get_function_values(self, alpha: np.ndarray, ecc: np.ndarray, dofs: np.ndarray) -> np.ndarray: ... - def get_function_derivatives(self, alpha: np.ndarray, J: np.ndarray, ecc: np.ndarray, dofs: np.ndarray) -> np.ndarray: ... - def get_function_hessians(self, alpha: np.ndarray, J: np.ndarray, ecc: np.ndarray, dofs: np.ndarray) -> np.ndarray: ... - def get_d2Sidksij2(self, alpha: np.ndarray, ecc: np.ndarray): ... - def get_bending_matrices(self, J: np.ndarray, ecc: np.ndarray): ... - @overload - def get_Hrot_from_J(self, J: np.ndarray, return_area: Literal[True]) -> tuple[np.ndarray, np.ndarray]: ... - @overload - def get_Hrot_from_J(self, J: np.ndarray, return_area=...) -> np.ndarray: ... - def get_Kff_and_Ff( - self, J: np.ndarray, ecc: np.ndarray, triangles: np.ndarray, Uc: np.ndarray - ) -> tuple[np.ndarray, np.ndarray, np.ndarray, np.ndarray]: ... - -class _DOF_estimator: - def __init__(self, interpolator, **kwargs) -> None: ... - def compute_dz(self, **kwargs): ... - def compute_dof_from_df(self) -> np.ndarray: ... - @staticmethod - def get_dof_vec(tri_z: np.ndarray, tri_dz: np.ndarray, J: np.ndarray) -> np.ndarray: ... - -class _DOF_estimator_user(_DOF_estimator): - def compute_dz(self, dz): ... - -class _DOF_estimator_geom(_DOF_estimator): - def compute_dz(self) -> np.ndarray: ... - def compute_geom_weights(self) -> np.ndarray: ... - def compute_geom_grads(self) -> np.ndarray: ... - -class _DOF_estimator_min_E(_DOF_estimator_geom): - def __init__(self, Interpolator) -> None: ... - def compute_dz(self) -> np.ndarray: ... - -class _Sparse_Matrix_coo: - def __init__(self, vals: np.ndarray, rows: np.ndarray, cols: np.ndarray, shape: tuple) -> None: ... - def dot(self, V) -> np.ndarray: ... - def compress_csc(self) -> None: ... - def compress_csr(self) -> None: ... - def to_dense(self) -> np.ndarray: ... - def __str__(self) -> str: ... - @property - def diag(self) -> np.ndarray: ... diff --git a/stubs/matplotlib/tri/tripcolor.pyi b/stubs/matplotlib/tri/tripcolor.pyi deleted file mode 100644 index b81323c6..00000000 --- a/stubs/matplotlib/tri/tripcolor.pyi +++ /dev/null @@ -1,17 +0,0 @@ -from typing import Literal - -from matplotlib._typing import * -from matplotlib.axes import Axes - -def tripcolor( - ax: Axes, - *args, - alpha=..., - norm=..., - cmap=..., - vmin=..., - vmax=..., - shading: Literal["flat", "gouraud"] = "flat", - facecolors: ArrayLike = ..., - **kwargs, -): ... diff --git a/stubs/matplotlib/tri/triplot.pyi b/stubs/matplotlib/tri/triplot.pyi deleted file mode 100644 index 51484be3..00000000 --- a/stubs/matplotlib/tri/triplot.pyi +++ /dev/null @@ -1,4 +0,0 @@ -from matplotlib.axes import Axes -from matplotlib.lines import Line2D - -def triplot(ax: Axes, *args, **kwargs) -> tuple[Line2D, Line2D]: ... diff --git a/stubs/matplotlib/tri/trirefine.pyi b/stubs/matplotlib/tri/trirefine.pyi deleted file mode 100644 index 49a6cb42..00000000 --- a/stubs/matplotlib/tri/trirefine.pyi +++ /dev/null @@ -1,18 +0,0 @@ -import numpy as np -from matplotlib._typing import * - -from .triangulation import Triangulation -from .triinterpolate import TriInterpolator - -class TriRefiner: - def __init__(self, triangulation: Triangulation) -> None: ... - -class UniformTriRefiner(TriRefiner): - def __init__(self, triangulation: Triangulation) -> None: ... - def refine_triangulation(self, return_tri_index: bool = False, subdiv: int = 3) -> tuple[Triangulation, np.ndarray]: ... - def refine_field( - self, - z: ArrayLike, - triinterpolator: TriInterpolator = ..., - subdiv: int = 3, - ) -> tuple[Triangulation, np.ndarray]: ... diff --git a/stubs/matplotlib/tri/tritools.pyi b/stubs/matplotlib/tri/tritools.pyi deleted file mode 100644 index 7658e2ba..00000000 --- a/stubs/matplotlib/tri/tritools.pyi +++ /dev/null @@ -1,10 +0,0 @@ -import numpy as np - -from .triangulation import Triangulation - -class TriAnalyzer: - def __init__(self, triangulation: Triangulation) -> None: ... - @property - def scale_factors(self) -> tuple[float, float]: ... - def circle_ratios(self, rescale: bool = True): ... - def get_flat_tri_mask(self, min_circle_ratio: float = 0.01, rescale: bool = True) -> np.ndarray: ... diff --git a/stubs/matplotlib/type1font.pyi b/stubs/matplotlib/type1font.pyi deleted file mode 100644 index 964e6fa3..00000000 --- a/stubs/matplotlib/type1font.pyi +++ /dev/null @@ -1,3 +0,0 @@ -from typing import Any - -def __getattr__(name: str) -> Any: ... # incomplete diff --git a/stubs/matplotlib/units.pyi b/stubs/matplotlib/units.pyi deleted file mode 100644 index 1b85a305..00000000 --- a/stubs/matplotlib/units.pyi +++ /dev/null @@ -1,38 +0,0 @@ -from datetime import date -from typing import Iterable, Sequence - -from ._typing import * -from .axis import Axis -from .ticker import Formatter, Locator - -class ConversionError(TypeError): ... - -class AxisInfo: - def __init__( - self, - majloc: Locator = ..., - minloc: Locator = ..., - majfmt: Formatter = ..., - minfmt: Formatter = ..., - label: str | None = ..., - default_limits: Sequence[date] = ..., - ) -> None: ... - -class ConversionInterface: - @staticmethod - def axisinfo(unit, axis: Axis) -> AxisInfo: ... - @staticmethod - def default_units(x, axis: Axis): ... - @staticmethod - def convert(obj, unit, axis: Axis): ... - @staticmethod - def is_numlike(x: str) -> bool: ... - -class DecimalConverter(ConversionInterface): - @staticmethod - def convert(value: Decimal | Iterable, unit, axis: Axis): ... - -class Registry(dict): - def get_converter(self, x) -> ConversionInterface | None: ... - -registry: dict = ... diff --git a/stubs/matplotlib/widgets.pyi b/stubs/matplotlib/widgets.pyi deleted file mode 100644 index 5eac14b0..00000000 --- a/stubs/matplotlib/widgets.pyi +++ /dev/null @@ -1,409 +0,0 @@ -import copy -from contextlib import ExitStack -from numbers import Integral, Number -from typing import Any, Callable, Dict, List, Literal, Mapping, Optional, Sequence, Tuple, Union - -import matplotlib as mpl -import numpy as np -from matplotlib.axes._axes import Axes -from matplotlib.backend_bases import MouseButton -from matplotlib.figure import Figure -from matplotlib.lines import Line2D -from matplotlib.patches import Ellipse, Rectangle -from matplotlib.transforms import Affine2D -from numpy import float64, ndarray -from numpy.typing import ArrayLike - -from . import _api, _docstring, backend_tools, cbook, colors, ticker, transforms -from .lines import Line2D -from .patches import Circle, Ellipse, Polygon, Rectangle -from .transforms import Affine2D, TransformedPatchPath - -class LockDraw: - def __init__(self) -> None: ... - def __call__(self, o: "Lasso") -> None: ... - def release(self, o: "Lasso") -> None: ... - def available(self, o: "Lasso") -> bool: ... - def isowner(self, o: "Lasso") -> bool: ... - def locked(self) -> bool: ... - -class Widget: - drawon: bool = ... - eventson: bool = ... - _active: bool = ... - - def set_active(self, active: bool): ... - def get_active(self) -> bool: ... - active = ... - def ignore(self, event: Event) -> bool: ... - -class AxesWidget(Widget): - def __init__(self, ax: Axes) -> None: ... - def connect_event(self, event: str, callback: Callable) -> None: ... - def disconnect_events(self) -> None: ... - -class Button(AxesWidget): - def __init__( - self, - ax: Axes, - label: str, - image: ArrayLike | Image | None = None, - color: Color = "0.85", - hovercolor: Color = "0.95", - ) -> None: ... - def on_clicked(self, func: Callable) -> int: ... - def disconnect(self, cid): ... - -class SliderBase(AxesWidget): - def __init__( - self, - ax: Axes, - orientation: Literal["horizontal", "vertical"], - closedmin: bool, - closedmax: bool, - valmin: float, - valmax: float, - valfmt: str | None, - dragging: bool, - valstep: float | ArrayLike | None, - ) -> None: ... - def disconnect(self, cid: int): ... - def reset(self): ... - -class Slider(SliderBase): - val: float - - def __init__( - self, - ax: Axes, - label: str, - valmin: float, - valmax: float, - valinit: float = 0.5, - valfmt: str | None = None, - closedmin: bool = True, - closedmax: bool = True, - slidermin: Slider | None = None, - slidermax: Slider | None = None, - dragging: bool = True, - valstep: float | ArrayLike | None = None, - orientation: Literal["horizontal", "vertical"] = "horizontal", - *, - initcolor: Color = "r", - track_color: Color = "lightgrey", - handle_style: Mapping | None = None, - **kwargs, - ) -> None: ... - def set_val(self, val: float) -> None: ... - def on_changed(self, func: Callable) -> int: ... - -class RangeSlider(SliderBase): - val: tuple[float, ...] - - def __init__( - self, - ax: Axes, - label: str, - valmin: float, - valmax: float, - valinit: tuple[float, ...] | None = None, - valfmt: str | None = None, - closedmin: bool = True, - closedmax: bool = True, - dragging: bool = True, - valstep: float | None = None, - orientation: Literal["horizontal", "vertical"] = "horizontal", - track_color: Color = "lightgrey", - handle_style: Mapping | None = None, - **kwargs, - ) -> None: ... - def set_min(self, min: float): ... - def set_max(self, max: float): ... - def set_val(self, val: Sequence[float]): ... - def on_changed(self, func: Callable) -> int: ... - -class CheckButtons(AxesWidget): - def __init__(self, ax: Axes, labels: Sequence[str], actives: Sequence[bool] = ...) -> None: ... - def set_active(self, index: int): ... - def get_status(self) -> tuple[bool, ...]: ... - def on_clicked(self, func: Callable) -> int: ... - def disconnect(self, cid) -> None: ... - -class TextBox(AxesWidget): - DIST_FROM_LEFT = ... - def __init__( - self, - ax: Axes, - label: str, - initial: str = "", - color: Color = ".95", - hovercolor: Color = "1", - label_pad: float = 0.01, - textalignment: Literal["left", "center", "right"] = "left", - ) -> None: ... - @property - def text(self) -> str: ... - def set_val(self, val: str) -> None: ... - def begin_typing(self, x): ... - def stop_typing(self) -> None: ... - def position_cursor(self, x: float): ... - def on_text_change(self, func: Callable): ... - def on_submit(self, func: Callable) -> int: ... - def disconnect(self, cid): ... - -class RadioButtons(AxesWidget): - ax: Axes - activecolor: Color - labels: list[Text] - circles: list[Circle] - value_selected: str - - def __init__( - self, - ax: Axes, - labels: Sequence[Text], - active: int = 0, - activecolor: Color = "blue", - ) -> None: ... - def set_active(self, index: int): ... - def on_clicked(self, func: Callable) -> int: ... - def disconnect(self, cid): ... - -class SubplotTool(Widget): - def __init__(self, targetfig: Figure, toolfig: Figure) -> None: ... - -class Cursor(AxesWidget): - def __init__(self, ax: Axes, horizOn: bool = True, vertOn: bool = True, useblit: bool = False, **lineprops) -> None: ... - def clear(self, event: DrawEvent) -> None: ... - def onmove(self, event: Event): ... - -class MultiCursor(Widget): - def __init__( - self, - canvas: FigureCanvasBase, - axes: Sequence[Axes], - useblit: bool = True, - horizOn: bool = False, - vertOn: bool = True, - **lineprops, - ) -> None: ... - def connect(self) -> None: ... - def disconnect(self): ... - def clear(self, event: DrawEvent) -> None: ... - def onmove(self, event: Event): ... - -class _SelectorWidget(AxesWidget): - def __init__( - self, - ax: Axes, - onselect: Callable, - useblit: bool = False, - button=None, - state_modifier_keys=None, - use_data_coordinates=False, - ): ... - - eventpress = ... - eventrelease = ... - state = ... - state_modifier_keys = ... - def set_active(self, active): ... - def update_background(self, event: DrawEvent) -> None: ... - def connect_default_events(self) -> None: ... - def ignore(self, event: Event): ... - def update(self) -> bool: ... - def press(self, event: Event): ... - def release(self, event: Event): ... - def onmove(self, event: Event): ... - def on_scroll(self, event: Event): ... - def on_key_press(self, event: KeyEvent) -> None: ... - def on_key_release(self, event: Event): ... - def set_visible(self, visible: bool) -> None: ... - def clear(self): ... - @property - def artists( - self, - ) -> tuple[Artist, ...]: ... - def set_props(self, **props): ... - def set_handle_props(self, **handle_props): ... - def add_state(self, state: str): ... - def remove_state(self, state: str): ... - -class SpanSelector(_SelectorWidget): - def __init__( - self, - ax: Axes, - onselect: Callable, - direction: Literal["horizontal", "vertical"], - minspan: float = 0, - useblit: bool = False, - props: Mapping | None = None, - onmove_callback: Callable[[float, float]] | None = None, - interactive: bool = False, - button: MouseButton | Sequence[MouseButton] | None = None, - handle_props: Mapping | None = None, - grab_range: float = 10, - state_modifier_keys: Mapping | None = None, - drag_from_anywhere: bool = False, - ignore_event_outside: bool = False, - snap_values: ArrayLike | None = None, - ): ... - - rect = ... - rectprops = ... - active_handle = ... - pressv = ... - span_stays = ... - prev = ... - def new_axes(self, ax: Axes): ... - def connect_default_events(self) -> None: ... - @property - def direction(self): ... - @direction.setter - def direction(self, direction): ... - @property - def extents(self): ... - @extents.setter - def extents(self, extents): ... - -class ToolLineHandles: - def __init__( - self, - ax: Axes, - positions: ArrayLike, - direction: Literal["horizontal", "vertical"], - line_props: Mapping | None = None, - useblit: bool = True, - ) -> None: ... - @property - def artists(self) -> tuple[Line2D, Line2D]: ... - @property - def positions(self): ... - @property - def direction(self) -> str: ... - def set_data(self, positions: tuple): ... - def set_visible(self, value): ... - def set_animated(self, value): ... - def remove(self): ... - def closest(self, x: float, y: float) -> tuple[int, float]: ... - -class ToolHandles: - def __init__( - self, - ax: Axes, - x: ArrayLike, - y: ArrayLike, - marker: str = "o", - marker_props: Mapping | None = None, - useblit: bool = True, - ) -> None: ... - @property - def x(self): ... - @property - def y(self): ... - @property - def artists(self) -> tuple[Line2D]: ... - def set_data( - self, - pts: tuple[float, float, float], - y: tuple[float, float, float] | None = None, - ) -> None: ... - def set_visible(self, val): ... - def set_animated(self, val): ... - def closest(self, x: float, y: float) -> tuple[int, float]: ... - -class RectangleSelector(_SelectorWidget): - def __init__( - self, - ax: Axes, - onselect: Callable, - drawtype="box", - minspanx: float = 0, - minspany: float = 0, - useblit: bool = False, - lineprops=None, - props: Mapping | None = None, - spancoords: Literal["data", "pixels"] = "data", - button: MouseButton | Sequence[MouseButton] | None = None, - grab_range: float = 10, - handle_props: Mapping | None = None, - interactive: bool = False, - state_modifier_keys: Mapping | None = None, - drag_from_anywhere: bool = False, - ignore_event_outside: bool = False, - use_data_coordinates: bool = False, - ): ... - - to_draw = ... - drawtype = ... - active_handle = ... - interactive = ... - maxdist = ... - @property - def corners(self) -> tuple[ndarray, ndarray]: ... - @property - def edge_centers(self) -> tuple[ndarray, ndarray]: ... - @property - def center(self) -> tuple[float, float]: ... - @property - def extents(self): ... - @extents.setter - def extents(self, extents): ... - @property - def rotation(self) -> float: ... - @rotation.setter - def rotation(self, value: float): ... - - draw_shape = ... - @property - def geometry(self) -> np.ndarray: ... - -class EllipseSelector(RectangleSelector): - draw_shape = ... - -class LassoSelector(_SelectorWidget): - def __init__( - self, - ax: Axes, - onselect: Callable | None = None, - useblit: bool = True, - props: Mapping | None = None, - button: MouseButton | Sequence[MouseButton] | None = None, - ): ... - @_api.deprecated("3.5", alternative="press") - def onpress(self, event): ... - def onrelease(self, event): ... - -class PolygonSelector(_SelectorWidget): - def __init__( - self, - ax: Axes, - onselect: Callable, - useblit: bool = False, - props: Mapping | None = None, - handle_props: Mapping | None = None, - grab_range: float = 10, - *, - draw_bounding_box: bool = False, - box_handle_props: Mapping | None = None, - box_props: Mapping | None = None, - ): ... - - line = ... - vertex_select_radius = ... - def onmove(self, event: Event): ... - @property - def verts(self): ... - @verts.setter - def verts(self, xys): ... - -class Lasso(AxesWidget): - def __init__( - self, - ax: Axes, - xy: tuple[float, float], - callback: Callable | None = None, - useblit: bool = True, - ) -> None: ... - def onrelease(self, event: MouseEvent) -> None: ... - def onmove(self, event: MouseEvent) -> None: ...