Register_cmap() how to?

I actually tried as in file matplotlib/ as follows:

def register_cmap(name=None, cmap=None, *, override_builtin=False):
    Add a colormap to the set recognized by :func:`get_cmap`.

    Register a new colormap to be accessed by name ::

        LinearSegmentedColormap('swirly', data, lut)

in my case:

turbo_camp=LinearSegmentedColormap.from_list(name='turbo', colors=turbo_colormap_data)

but failed with the following message:

Exception has occurred: ValueError
Trying to re-register the builtin cmap 'turbo'.
  File "....../", line 87, in <module>

Any suggestions?


Turbo is already a colormap. If you want to change it, name your colormap turbo2 or similar.