Axes remain linked even if I use different dimensions names

Hello,
I am trying to compose an hv.NdLayout such that

  1. only subplots with axes in common have the linked zoom
  2. all the subplots show the same label to the user

To do this I am using hv.Dimension using same labels and different names, but all the plots reamin linked. In this example instead the linked zoom should couple the 2 groups of subplots:

  • the first 2 having y1 as dimension name
  • the last 2 having y2 as dimension name
  • strecthing y1 axis (with the mouse wheel) should not strecth y2 axis

Here the code

df = pd.DataFrame({
    'x': [1, 2, 3], 'y1': [2, 4, 6],
})
df['coord'] = 1
df2 = pd.DataFrame({
    'x': [1, 2, 3], 'y1': [2, 4, 6],
})
df3 = pd.DataFrame({
    'x': [1, 2, 3], 'y2': [2, 4, 6],
})
df4 = pd.DataFrame({
    'x': [1, 2, 3], 'y2': [2, 4, 6],
})
df3['x'] += 1
df4['y2'] += 1
points = hv.Points(df, kdims=['x', hv.Dimension('y1', label='y')])
points2 = hv.Points(df2, kdims=['x', hv.Dimension('y1', label='y')])
points3 = hv.Points(df3, kdims=['x', hv.Dimension('y2', label='y')])
points4 = hv.Points(df4, kdims=['x', hv.Dimension('y2', label='y')])


ly = hv.NdLayout({str(i):v for i, v in enumerate([points,points2,points3, points4])})
ly

am I using hv.Dimension in the wrong way ?

.opts(shared_axes=False) I believe

Hi thanks !
In this way all the subplots will be unlinked. Instead, I would like to group linked subplots by their dimension names. The problem is that using the same label all the subplots reamin linked. Instead If I don’t use the same labels (see below) it works as expected. Maybe it is a bug ?

df = pd.DataFrame({
    'x': [1, 2, 3], 'y1': [2, 4, 6],
})
df['coord'] = 1
df2 = pd.DataFrame({
    'x': [1, 2, 3], 'y1': [2, 4, 6],
})
df3 = pd.DataFrame({
    'x': [1, 2, 3], 'y2': [2, 4, 6],
})
df4 = pd.DataFrame({
    'x': [1, 2, 3], 'y2': [2, 4, 6],
})
df3['x'] += 1
df4['y2'] += 1
points = hv.Points(df, kdims=['x', hv.Dimension('y1', label='y')])

points = hv.Points(df, kdims=['x',   'y1']) # if I not use hv.Dimension assigning the same labels, it works
points2 = hv.Points(df2, kdims=['x', 'y1'])
points3 = hv.Points(df3, kdims=['x', 'y2'])
points4 = hv.Points(df4, kdims=['x', 'y2'])


ly = hv.NdLayout({str(i):v for i, v in enumerate([points,points2,points3, points4])})
ly

​​

If they’re the same label y, they’ll be linked. If you simply want to relabel, use .opts(ylabel='y')