Set the color limits of the current image. To apply clim to all axes images do:: clim(0, 0.5) 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, for example::
(vmin=None, vmax=None)
| 2103 | |
| 2104 | |
| 2105 | def clim(vmin=None, vmax=None): |
| 2106 | """ |
| 2107 | Set the color limits of the current image. |
| 2108 | |
| 2109 | To apply clim to all axes images do:: |
| 2110 | |
| 2111 | clim(0, 0.5) |
| 2112 | |
| 2113 | If either *vmin* or *vmax* is None, the image min/max respectively |
| 2114 | will be used for color scaling. |
| 2115 | |
| 2116 | If you want to set the clim of multiple images, |
| 2117 | use, for example:: |
| 2118 | |
| 2119 | for im in gca().get_images(): |
| 2120 | im.set_clim(0, 0.05) |
| 2121 | |
| 2122 | """ |
| 2123 | im = gci() |
| 2124 | if im is None: |
| 2125 | raise RuntimeError('You must first define an image, e.g., with imshow') |
| 2126 | |
| 2127 | im.set_clim(vmin, vmax) |
| 2128 | |
| 2129 | |
| 2130 | def set_cmap(cmap): |