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:
A ndoverlay with 26 plots: