How to convert discrete colormap to contiguous one in matplotlib? I need something like this:
import matplotlib.colors as colors
cm_d = colormap = colors.ListedColormap(["#ffffff", "#ffcdcd", "#ff989b", "#ff6669", "#ff1818", "#d20000", "#a30002", "#720001", "#500002", "#670061", "#5e1a8b", "#3d0064", "#555555", "#343434", "#000000"])
cm_c = do_some_magic(cm_d)