NdOverlay with more than 25 plots ignore styling

ALL software version info

pandas: 2.1.3
holoviews: 1.17.1
bokeh: 3.2.2
python: 3.12.0

Description of expected behavior and the observed behavior

I’m creating an overlay plot with NdOverlay where I can give each plot a separate color, style or size. However, when I’m adding more than 25 plots to the NdOverlay, the styling of the different plots is gone and every plot gets the same color, style and size.

Example

In the following example you can change the variable “numberOfPlots” from 26 to 25. At 25 the different colors will be shown in the plot, but at 26 all the points will have the same color.

import colorcet as cc
import holoviews as hv
import pandas as pd
import itertools

numberOfPlots=26
pIter = itertools.cycle(cc.palette['glasbey_category10'])
overlayPlots = {}
y = [1,2]
count = 0
for _ in range(numberOfPlots):
       df = pd.DataFrame({'x':[1,2], 'y':[yi+count for yi in y]})
       p = hv.Scatter(df, 'x', 'y')
       p.opts(color=next(pIter))
       overlayPlots[count] = p
       count = count + 1

poverlay = hv.NdOverlay(overlayPlots, kdims='hue')
poverlay

Screenshots or screencasts of the bug in action

A ndoverlay with 24 plots:
24_plots

A ndoverlay with 26 plots:
26_plots

Maybe batched=False?
Bachelors Degrees By Gender — HoloViews v1.18.3

This worked!!!
Thanks a lot for the fast suggestion.

I didn’t immediately find a good explanation of “batched”. What exactly is it doing?

I think too many curves slow down rendering, so it groups them as one to vectorize drawing them(? I think; could be really wrong). I just remember using it once from experience.

Can you submit an issue to HoloViews requesting better docs on batched?

I asked for a description of the “batched” option and if there is none I’ll submit an issue.
Thanks again.

Right, feel free to submit an issue.