_secondary_axes.pyi 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. from matplotlib.axes._base import _AxesBase
  2. from matplotlib.axis import Tick
  3. from matplotlib.transforms import Transform
  4. from collections.abc import Callable, Iterable
  5. from typing import Literal
  6. from numpy.typing import ArrayLike
  7. from matplotlib.typing import ColorType
  8. class SecondaryAxis(_AxesBase):
  9. def __init__(
  10. self,
  11. parent: _AxesBase,
  12. orientation: Literal["x", "y"],
  13. location: Literal["top", "bottom", "right", "left"] | float,
  14. functions: tuple[
  15. Callable[[ArrayLike], ArrayLike], Callable[[ArrayLike], ArrayLike]
  16. ]
  17. | Transform,
  18. transform: Transform | None = ...,
  19. **kwargs
  20. ) -> None: ...
  21. def set_alignment(
  22. self, align: Literal["top", "bottom", "right", "left"]
  23. ) -> None: ...
  24. def set_location(
  25. self,
  26. location: Literal["top", "bottom", "right", "left"] | float,
  27. transform: Transform | None = ...
  28. ) -> None: ...
  29. def set_ticks(
  30. self,
  31. ticks: ArrayLike,
  32. labels: Iterable[str] | None = ...,
  33. *,
  34. minor: bool = ...,
  35. **kwargs
  36. ) -> list[Tick]: ...
  37. def set_functions(
  38. self,
  39. functions: tuple[Callable[[ArrayLike], ArrayLike], Callable[[ArrayLike], ArrayLike]] | Transform,
  40. ) -> None: ...
  41. def set_aspect(self, *args, **kwargs) -> None: ...
  42. def set_color(self, color: ColorType) -> None: ...