Set the color limits of the current image. If either *vmin* or *vmax* is None, the image min/max respectively will be used for color scaling. If you want to set the clim of multiple images, use `~.ScalarMappable.set_clim` on every image, for example:: for im in gca().ge
(vmin: float | None = None, vmax: float | None = None)
| 2684 | |
| 2685 | |
| 2686 | def clim(vmin: float | None = None, vmax: float | None = None) -> None: |
| 2687 | """ |
| 2688 | Set the color limits of the current image. |
| 2689 | |
| 2690 | If either *vmin* or *vmax* is None, the image min/max respectively |
| 2691 | will be used for color scaling. |
| 2692 | |
| 2693 | If you want to set the clim of multiple images, use |
| 2694 | `~.ScalarMappable.set_clim` on every image, for example:: |
| 2695 | |
| 2696 | for im in gca().get_images(): |
| 2697 | im.set_clim(0, 0.5) |
| 2698 | |
| 2699 | """ |
| 2700 | im = gci() |
| 2701 | if im is None: |
| 2702 | raise RuntimeError('You must first define an image, e.g., with imshow') |
| 2703 | |
| 2704 | im.set_clim(vmin, vmax) |
| 2705 | |
| 2706 | |
| 2707 | def get_cmap(name: Colormap | str | None = None, lut: int | None = None) -> Colormap: |