Hello,
I am trying to compose an hv.NdLayout such that
- only subplots with axes in common have the linked zoom
- 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
y1as dimension name - the last 2 having
y2as dimension name - strecthing
y1axis (with the mouse wheel) should not strecthy2axis
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 ?