holoviews icon indicating copy to clipboard operation
holoviews copied to clipboard

Add legend to plot with only 1 curve

Open SandervandenOord opened this issue 5 years ago • 3 comments

Currently it is not possible to add a legend to a plot with only 1 curve. It would be nice if you could do that.

At the moment there's only a workaround such as creating an overlay with the same curve:

curve1 = hv.Curve([3, 4, 5], name='just one line')
curve1 * curve1

Would be nice if adding a legend to a plot would be more intuitive. image

See also: https://stackoverflow.com/questions/55490184/legend-does-not-appear-in-holoviews-for-only-1-line https://discourse.holoviz.org/t/how-to-get-a-legend-for-just-one-line-curve/121

Version using: Holoviews 1.13

SandervandenOord avatar Jan 20 '20 10:01 SandervandenOord