tools.colorRampPalette
- tools.colorRampPalette(low, high, diverging=False, medium=None, n=None)[source]
Python implementation of R’s colorRampPalette.
- Parameters:
low (str) – colour key for low value.
high (str) – colour key for high value.
diverging (bool, optional) – diverging palette or not
medium (str, optional) – colour key for middle value.
n (int, optional) – number or colours to return in spectrum.
- Returns:
ListedColormap instance with colour gradient.
- Return type:
ListedColormap