arctichoke.plot.cbar_limits
Functions
|
Limit the colorbar range without changing the colors. |
Module Contents
- arctichoke.plot.cbar_limits.set_cbar_lims(hv_overlay: holoviews.core.overlay.Overlay, holoviews.element.raster.QuadMesh, cmin: int, float, cmax: int, float, verbose: bool = False, **kwargs)
Limit the colorbar range without changing the colors.
Set the limits of the colorbar in the given overlay object such that the displayed range of the colorbar is within those limits but the colors to which every value corresponds remains the same as the original. This is done by completely replacing the original colorbar with a new one where the range has been limited.
- Parameters:
hv_overlay (holoviews.core.overlay.Overlay, holoviews.element.raster.QuadMesh) – The overlay object for which to construct the limited colorbar.
cmin (int, float) – The minimum display value for the colormap.
cmax (int, float) – The maximum display value for the colormap.
verbose (bool, optional) – Whether to verbosely output information as the function executes. Default is False.
**kwargs – Keyword arguments to pass to bokeh.models.LinearColorMapper() and bokeh.models.ColorBar().
- Returns:
fig – The figure containing the original plot and the new, limited colorbar.
- Return type:
bokeh.plotting._figure.figure
Examples
>>> from arctichoke.plot.cbar_limits import set_cbar_lims