Problem setting default global colormap

I’m using hvplot with xarray in JupyterLab to plot 2d DataArrays. I have been trying to set some global parameters using the following commands in the first cell of the notebook

import hvplot.xarray
from holoviews import opts
customrainbow = [ '#000000', '#040003', '#090007', '#0d000a', '#12000e', ... ]
opts.defaults(opts.Image(aspect="square", cmap=customrainbow, toolbar="above"))

and in the next cell of the notebook I plot a DataArray called array using

array.hvplot()

When I plot the DataArray, the two settings aspect=“square” and toolbar=“above” are correctly applied, but the cmap option is not (it is always what I believe to be bokeh “blues”). I have tried changing to various other default colormaps instead of my custom colormap with the same result. If I put the cmap directly inside the plot command as

array.hvplot(cmap=customrainbow)

everything works fine. Does anyone have any idea why this might be happening? Is there a problem with my code, or could this be a bug? Thanks!

Package versions:
hvplot-0.5.2
holoviews-1.13.2
xarray-0.15.1
jupyterlab-1.2.6

hvPlot defines it’s own custom cmaps to more closely match the defaults of the plotting APIs its emulating (i.e. pandas and xarray defaults) and also to automatically switch between numeric and categorical colormaps. There should however be a documented way of controlling hvPlot defaults more easily.

Thanks for the information. Is there any way to do what I’m trying to do, or is it necessary at the moment to keep specifying my custom color map in every call to hvplot()?

Does anyone know anything more about this? I know it’s not the most important issue, but it would be useful not to have to specify the custom colormap every time hvplot is called.