cm.pyi 939 B

123456789101112131415161718192021222324
  1. from collections.abc import Iterator, Mapping
  2. from matplotlib import colors
  3. from matplotlib.colorizer import _ScalarMappable
  4. class ColormapRegistry(Mapping[str, colors.Colormap]):
  5. def __init__(self, cmaps: Mapping[str, colors.Colormap]) -> None: ...
  6. def __getitem__(self, item: str) -> colors.Colormap: ...
  7. def __iter__(self) -> Iterator[str]: ...
  8. def __len__(self) -> int: ...
  9. def __call__(self) -> list[str]: ...
  10. def register(
  11. self, cmap: colors.Colormap, *, name: str | None = ..., force: bool = ...
  12. ) -> None: ...
  13. def unregister(self, name: str) -> None: ...
  14. def get_cmap(self, cmap: str | colors.Colormap) -> colors.Colormap: ...
  15. _colormaps: ColormapRegistry = ...
  16. _multivar_colormaps: ColormapRegistry = ...
  17. _bivar_colormaps: ColormapRegistry = ...
  18. def get_cmap(name: str | colors.Colormap | None = ..., lut: int | None = ...) -> colors.Colormap: ...
  19. ScalarMappable = _ScalarMappable