Cannot use apply.opts on 'logz', and any change resets axes (panning)

Hello, first message here, thank you for keeping this community alive, it’s an amazing source of information :slight_smile:

I am trying to update the color scale of a heatmap using panel widgets, linking them to plot option with ‘apply.opts’.

A range slider is supposed to control the colormap limits clim and I would like to control whether the color scale is logarithmic with a checkbox.

import numpy as np
import pandas as pd
import holoviews as hv

# Create values
sweep_values = np.linspace(start=val_min, 

# Single column heatmap

# Create a range slider to define colors boundaries
range_slider = pn.widgets.RangeSlider(name='Scale boundaries', 
                                      value=(val_min, val_max), 

# And a checkbox to control whether colorscale is logarithmic
logscale_checkbox = pn.widgets.Checkbox(name="Logarithmic scale", value=False)

# Link widgets params to corresponding options in plot
hm=hm.apply.opts(clim=range_slider, logz=logscale_checkbox)

# Show off
pn.Row(hm, range_slider, logscale_checkbox)

The range slider does its job, but as soon as I use it, the position of axes is reset (after modifying them manually with the panning tool).
Is this the expected behavior ? I would like the panning position to be kept unchanged when updating the colorscale.

The checkbox triggers a plot update (I notice because axes are reset), but the logz option is not applied dynamically (works if applied statically before plotting).

Maybe ‘apply.opts’ it is not the best option, please let me know if there is a better way…
To be honest I am confused about the best options to use for linking objects: pn.bind, apply.opts, streams, datalink, subscribe, watch, js_on_events… (I listed 13 of them).

Thank you for your help !

Session info:

holoviews           1.15.4
numpy               1.23.5
pandas              1.5.3
panel               0.14.3

Quick update, it seems that the ‘reset axes on slider change’ behavior is not seen when I change Y axis from categorical to numeric:

# Single column heatmap