hvplot
hvplot copied to clipboard
Specifying color adds _color entry hover-over
Description of expected behavior and the observed behavior
Specifying colors via .hvplot.scatter adds a _color field to hover over, and this seems unintentional.
Complete, minimal, self-contained example code that reproduces the issue
import vega_datasets
import hvplot.pandas
iris = vega_datasets.data.iris()
iris.hvplot.scatter(
x="sepalWidth",
y="sepalLength",
hover_cols=["species"],
color=iris["species"].map(
{"setosa": "red", "virginica": "blue", "versicolor": "green"}
),
)
Screenshots or screencasts of the bug in action
Version info
hvplot 0.5.2 pandas 0.25.3 bokeh 1.4.0 python 3.7
Definitely unintentional, note that you can use HoloViews dim mapping to achieve the same thing:
import holoviews as hv
color=hv.dim("species").categorize(
{"setosa": "red", "virginica": "blue", "versicolor": "green"}
)
I can reproduce.
I can reproduce this, and possibly tackle it but I have to ask: what is the intention here? Is it to remove the _color field entirely from the hover options or to make sure it doesn't appear as a private namespace but rather as color?