Skip to content

Add legend to plot with only 1 curve #4196

@SandervandenOord

Description

@SandervandenOord

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

Metadata

Metadata

Assignees

Labels

tag: hvplotIssue also been asked in hvplottype: enhancementMinor feature or improvement to an existing feature

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions