Removing the legend from NdOverlay also removes the colors

I am creating a layout with multiple NdOverlays plots where each NdOverlay shows multiple colored graphs. (see example below)
When I use the option “show_legends=0” to only show 1 legend in the full layout, I see that all the plots that don’t have a legend anymore also don’t have any different colors anymore.

df = pd.DataFrame({'x': [1,2,3], 'y': [2,3,4],})
p1a = hv.Scatter(df, kdims='x', vdims=['y']).opts(color='red', size=8)
df = pd.DataFrame({'x': [1,2,3], 'y': [5,6,7],})
p2a = hv.Scatter(df, kdims='x', vdims=['y']).opts(color='green', size=8)
pa = hv.NdOverlay({'red':p1a, 'green':p2a}, 'plots').opts(legend_position='right')
df = pd.DataFrame({'x': [1,2,3], 'y': [1,1.5,2],})
p1b = hv.Scatter(df, kdims='x', vdims=['y']).opts(color='red', size=8)
df = pd.DataFrame({'x': [1,2,3], 'y': [3,4,5],})
p2b = hv.Scatter(df, kdims='x', vdims=['y']).opts(color='green', size=8)
pb = hv.NdOverlay({'red':p1b, 'green':p2b}, 'plots').opts(legend_position='right')
p = pa+pb
p.opts(show_legends=0)

A plot with multiple legends:
image

A plot with a single legend:
image

I was wondering whether I’m doing something wrong?

Notice: when I just set the “show_legend” to false for all (except for 1) plot, I do get a normal plot.

Seems like a bug; can you submit an issue on HoloViews? Thanks!

Done.

Awesome thanks!

As a workaround, you can use an Overlay (*) instead of an NdOverlay to keep the colors.