Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Legend entries with hv.Area #2118

Closed
PeterDSteinberg opened this issue Nov 12, 2017 · 2 comments
Closed

Legend entries with hv.Area #2118

PeterDSteinberg opened this issue Nov 12, 2017 · 2 comments

Comments

@PeterDSteinberg
Copy link

Currently it is not apparent how to add legend entries for hv.Area items

I created the figure below with 3 hv.Curve items that show up in legend but the 2 hv.Area items are plotted without legend labels.
screen shot 2017-11-12 at 8 40 09 am

mx = ds.data.flow.values.max()
s = lambda c: c.opts(style={'Area': {'fill_alpha': 0.3}})
f,t,c,i,w = (hv.Curve(ds.data.flow, label='Flow (GPM)'),
           hv.Curve(ds.data.temp, label='Temperature (F)'),
           hv.Curve(ds.data.cond, label='Conductivity (uS/cm)'),
           s(hv.Area(ds.data.is_illicit * mx * 0.4, label='Has Illicit Discharge (1=Yes)')),
           s(hv.Area(ds.data.did_warning * mx * 0.6, label='Created a warning (1=yes)')))

Note from @philippjfr on solving this:

The Areas are drawn using bokeh's Band glyph which does not currently support legend entries. Would you mind filing an issue with holoviews about this and then I'll try to follow up with bokeh to see if there's something we can do about that?

@philippjfr
Copy link
Member

This should now be fixed by #2225.

@philippjfr philippjfr modified the milestones: v1.10, 1.9.3 Feb 10, 2018
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants