Closed Laolga closed 1 year ago
Thanks for your question; you can try to register your custom cmap using the following:
c = LinearSegmentedColormap.from_list('my_cmap', [(0, 'blue'), (0.5, 'yellow'), (1, 'red')])
plt.register_cmap(cmap=c)
# After registering, my_cmap is the name of your custom cmap
# then you can use cmap='my_cmap' as the parameter in anno_scatterplot
Or similar to ListedColormap
c = ListedColormap(
colors,
'my_cmap')
plt.register_cmap(cmap=c)
I hI hope this answer helps.
Hi! Is it possible to make the scatterplot with custom colors? I tried to give my color list as
colors
, but that argument accepts only single color, tried providing my color list asListedColormap(list_of_colors)
, butcmap
accepts only strings as an argument. Is there any way?