hvplot icon indicating copy to clipboard operation
hvplot copied to clipboard

Changing the legend title

Open gioarma opened this issue 5 years ago • 5 comments

Problem

When I have a DataFrame df with 2 or more columns and plot it with df.hvplot() I get a legend for all my columns and the title of the legend is 'Variable'.

Solution I'd like

I would like to have the possibility to set the legend title, or to disable it, because most of the times 'Variable' is not the best way to describe the elements in the legend.

I tried to look into the holoviews opts, but I didn't find something like legend_title or similar, which I think would be the best solution.

Did I miss something? Is there already a way to do this?

gioarma avatar Mar 30 '20 10:03 gioarma

There is indeed setting the group_label will change that title.

philippjfr avatar May 01 '20 15:05 philippjfr

Yes, thanks! This should definitely be written in the user guide

gioarma avatar May 01 '20 15:05 gioarma

Is it possible to hide this 'Variable' group_label ? Packages like mathplotlib, bokeh and hollowview don't show a group label by defaut. Is there a reason to display it when it's not even specified in the options ?

florentbr avatar Nov 21 '21 09:11 florentbr

I think I agree; the label "Variable" doesn't seem to add anything to what a user can already see is a legend.

jbednar avatar Nov 21 '21 14:11 jbednar

I completely agree, I would remove as well the default legend title "Variable"

gioarma avatar Nov 21 '21 19:11 gioarma