mgwr.utils.truncate_colormap

mgwr.utils.truncate_colormap(cmap, minval=0.0, maxval=1.0, n=100)[source]

Function to truncate a colormap by selecting a subset of the original colormap’s values

Parameters:
cmap : Mmatplotlib colormap to be altered
minval : Minimum value of the original colormap to include in the truncated colormap
maxval : Maximum value of the original colormap to include in the truncated colormap
n : Number of intervals between the min and max values for the gradient of the truncated colormap
Returns:
new_cmap : A new colormap that has been shifted.