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
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
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!