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
cmapMmatplotlib colormap to be altered
minvalMinimum value of the original colormap to include in the truncated colormap
maxvalMaximum value of the original colormap to include in the truncated colormap
nNumber of intervals between the min and max values for the gradient of the truncated colormap
Returns
new_cmapA new colormap that has been shifted.