sankey.pyi 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. from matplotlib.axes import Axes
  2. from collections.abc import Callable, Iterable
  3. from typing import Any
  4. import numpy as np
  5. __license__: str
  6. __credits__: list[str]
  7. __author__: str
  8. __version__: str
  9. RIGHT: int
  10. UP: int
  11. DOWN: int
  12. # TODO typing units
  13. class Sankey:
  14. diagrams: list[Any]
  15. ax: Axes
  16. unit: Any
  17. format: str | Callable[[float], str]
  18. scale: float
  19. gap: float
  20. radius: float
  21. shoulder: float
  22. offset: float
  23. margin: float
  24. pitch: float
  25. tolerance: float
  26. extent: np.ndarray
  27. def __init__(
  28. self,
  29. ax: Axes | None = ...,
  30. scale: float = ...,
  31. unit: Any = ...,
  32. format: str | Callable[[float], str] = ...,
  33. gap: float = ...,
  34. radius: float = ...,
  35. shoulder: float = ...,
  36. offset: float = ...,
  37. head_angle: float = ...,
  38. margin: float = ...,
  39. tolerance: float = ...,
  40. **kwargs
  41. ) -> None: ...
  42. def add(
  43. self,
  44. patchlabel: str = ...,
  45. flows: Iterable[float] | None = ...,
  46. orientations: Iterable[int] | None = ...,
  47. labels: str | Iterable[str | None] = ...,
  48. trunklength: float = ...,
  49. pathlengths: float | Iterable[float] = ...,
  50. prior: int | None = ...,
  51. connect: tuple[int, int] = ...,
  52. rotation: float = ...,
  53. **kwargs
  54. # Replace return with Self when py3.9 is dropped
  55. ) -> Sankey: ...
  56. def finish(self) -> list[Any]: ...