if discrete:
c, labels = pd.factorize(c)
if cmap is None and len(np.unique(c)) <= 10:
c = mpl.cm.tab10(np.linspace(0, 1, 10))[c]
cmap = None
else:
cmap = "tab20"
After Change
if cmap is None and len(np.unique(c)) <= 10:
cmap = mpl.colors.ListedColormap(
mpl.cm.tab10.colors[:len(np.unique(c))])
elif cmap is None:
cmap = "tab20"
else:
labels = None
if cmap is None: