layout_engine.pyi 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. from matplotlib.figure import Figure
  2. from typing import Any
  3. class LayoutEngine:
  4. def __init__(self, **kwargs: Any) -> None: ...
  5. def set(self) -> None: ...
  6. @property
  7. def colorbar_gridspec(self) -> bool: ...
  8. @property
  9. def adjust_compatible(self) -> bool: ...
  10. def get(self) -> dict[str, Any]: ...
  11. def execute(self, fig: Figure) -> None: ...
  12. class PlaceHolderLayoutEngine(LayoutEngine):
  13. def __init__(
  14. self, adjust_compatible: bool, colorbar_gridspec: bool, **kwargs: Any
  15. ) -> None: ...
  16. def execute(self, fig: Figure) -> None: ...
  17. class TightLayoutEngine(LayoutEngine):
  18. def __init__(
  19. self,
  20. *,
  21. pad: float = ...,
  22. h_pad: float | None = ...,
  23. w_pad: float | None = ...,
  24. rect: tuple[float, float, float, float] = ...,
  25. **kwargs: Any
  26. ) -> None: ...
  27. def execute(self, fig: Figure) -> None: ...
  28. def set(
  29. self,
  30. *,
  31. pad: float | None = ...,
  32. w_pad: float | None = ...,
  33. h_pad: float | None = ...,
  34. rect: tuple[float, float, float, float] | None = ...
  35. ) -> None: ...
  36. class ConstrainedLayoutEngine(LayoutEngine):
  37. def __init__(
  38. self,
  39. *,
  40. h_pad: float | None = ...,
  41. w_pad: float | None = ...,
  42. hspace: float | None = ...,
  43. wspace: float | None = ...,
  44. rect: tuple[float, float, float, float] = ...,
  45. compress: bool = ...,
  46. **kwargs: Any
  47. ) -> None: ...
  48. def execute(self, fig: Figure) -> Any: ...
  49. def set(
  50. self,
  51. *,
  52. h_pad: float | None = ...,
  53. w_pad: float | None = ...,
  54. hspace: float | None = ...,
  55. wspace: float | None = ...,
  56. rect: tuple[float, float, float, float] | None = ...
  57. ) -> None: ...