holoviews icon indicating copy to clipboard operation
holoviews copied to clipboard

Add support for subcoordinate_group drawn from NdOverlay dimensions

Open philippjfr opened this issue 4 weeks ago • 0 comments

Instead of drawing the subcoordinate grouping from the Element.group you can now specify a multi-dimensional NdOverlay and draw the group from one of the dimensions, e.g.:

import numpy as np
import holoviews as hv

hv.extension('bokeh')

data = {
    ('EEG', f'EEG {i}'): hv.Curve(
        np.random.randn(100).cumsum()+i
    ).opts(subcoordinate_y=True)
    for i in range(3)
}
data.update({
    ('MEG', f'MEG {i}'): hv.Curve(
        -np.random.randn(100).cumsum()+i
    ).opts(subcoordinate_y=True)
    for i in range(3)
})

hv.NdOverlay(data, ['Group', 'Channel']).opts(
    responsive=True, height=400, subcoordinate_group='Group'
)

Screenshot 2024-06-07 at 17 38 52

philippjfr avatar Jun 07 '24 15:06 philippjfr