MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / clim

Function clim

lib/matplotlib/pyplot.py:2686–2704  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

2684
2685
2686def 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
2707def get_cmap(name: Colormap | str | None = None, lut: int | None = None) -> Colormap:

Callers

nothing calls this directly

Calls 2

gciFunction · 0.85
set_climMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…