Legend for overlay of BoxWhisker plots

I am overlaying a bunch of boxwhisker plots. I would like to use the group column as a label for a box-plot in a legend:

import holoviews as hv
import pandas as pd

df = pd.DataFrame([
    ['A', 1, 1.1],
    ['A', 1, 1.2],
    ['A', 1, 1.3],
    ['A', 1, 1.2],
    ['A', 2, 2.2],
    ['A', 2, 1.2],
    ['A', 2, 3.2],
    ['A', 2, 4.2],
    ['B', 1, 1.6],
    ['B', 1, 1.7],
    ['B', 1, 1.8],
    ['B', 1, 1.7],
    ['B', 2, 3.2],
    ['B', 2, 5.2],
    ['B', 2, 4.2],
    ['B', 2, 2.2],
], columns=['group','col','val'])

olays = []
for group in df['group'].unique():
    box = hv.BoxWhisker(
        df.loc[df['group'] == group], 
        kdims=['col'], 
        vdims=['val'], 
        label=group
    ).opts(
        show_grid=True,
        show_legend=True,
        height=500, 
        width=500,
    )            
    olays.append(box)
plot = hv.Overlay(olays).opts(show_legend=True)
plot

As you can see, the col column is used as label instead of the label attribute. How can I get the A and B labels into the legend? Thank you very much for you effort! Cheers.

FYI: when I tried olays={} with keys being group and values hv.BoxWhisker and hv.NdOverlay instead of usual overlay, the problem persists.

Is this the preferred channel for these types of questions?

Hello,

Did you found a solution? I’m trying the same thing and cannot use the build in multiple categorical axis (multiple kdims)