Skip to content

Update hvPlot default categorical colormap to use glasbey_hv #1447

@Azaya89

Description

@Azaya89

Is your feature request related to a problem? Please describe.

This is not a problem per se, but rather an observation which was raised on the discord channel: the default categorical colormaps in HoloViews and hvPlot do not match.

Describe the solution you’d like

I propose changing the default categorical colormap in hvPlot to glasbey_hv, which is currently used in HoloViews. My reasoning is as follows:

hvPlot is often promoted as a high-level, more user-friendly alternative to HoloViews. For users moving from HoloViews to hvPlot, it would be beneficial to maintain certain features that enhance the user experience. By using the same default categorical colormap, we can create a more seamless transition and avoid the need for users to manually adjust the colormap to preserve their familiar visual settings.

Describe alternatives you’ve considered

1.	Continuing to use the current default colormap in hvPlot.
2.	Manually importing the `glasbey_hv` colormap from colorcet to maintain consistency across HoloViews and hvPlot.

Additional context

Here's a visual representation of the differences:

import pandas as pd

data = {'x': range(10),
 'y': range(10),
 'cat': ['cat1', 'cat2', 'cat3', 'cat4', 'cat5',
         'cat6', 'cat7', 'cat8', 'cat9', 'cat10']}
df = pd.DataFrame(data)

# Using hvplot
import hvplot.pandas # noqa

df.hvplot.points('x', 'y', by='cat')

hvplot_color

# using holoviews
import holoviews as hv
from holoviews.operation.datashader import datashade
import datashader as ds
hv.extension('bokeh')

plot = hv.Points(df, ["x", "y"], ['cat'])
datashade(plot, aggregator=ds.by("cat"))

holoviews_color

Metadata

Metadata

Assignees

No one assigned

    Labels

    [OLD] type: discussionOld labels for Discussion-type issues. Convert new Issues of this type to GitHub Discussions.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions