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

Nested legend #2755

merged 3 commits into from Jun 4, 2018


None yet
3 participants
Copy link

philippjfr commented Jun 1, 2018

This PR ensures that nested Nd(Overlays) generate a legend. Previously nesting Overlays inside an NdOverlay would mean two things:

  1. The styling group_counter would be reset inside the nested OverlayPlot meaning that color cycles would not work.
  2. The topmost legend plot would not find matplotlib artists nested further down and the bokeh version would not pass its dimensions down to the individual elementplots meaning that no legend would be generated.
%%opts Spread (alpha=0.1) Path [show_legend=True]

d = {}
for i in range(1, 5):
    xs = np.linspace(0, 1)
    ys = xs**2 / i + 5 * i
    d[i] = hv.Path((xs, ys), kdims=['X', 'Y']) * hv.Spread((xs, ys, 2))

screen shot 2018-06-01 at 1 27 20 pm



jbednar approved these changes Jun 1, 2018

Copy link

jbednar left a comment

Looks great!

@philippjfr philippjfr force-pushed the nested_legend branch from d62b002 to 80c81bd Jun 1, 2018


This comment has been minimized.

Copy link

jlstevens commented Jun 1, 2018

Looks good to me as well. Happy to merge once the tests are green.

Philipp Rudiger Philipp Rudiger

This comment has been minimized.

Copy link
Contributor Author

philippjfr commented Jun 4, 2018

Ready to merge now.

@jlstevens jlstevens merged commit 11b1389 into master Jun 4, 2018

4 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
continuous-integration/travis-ci/push The Travis CI build passed
coverage/coveralls Coverage decreased (-0.002%) to 82.834%
s3-reference-data-cache Tests passing no test data changes required.

@philippjfr philippjfr deleted the nested_legend branch Jul 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.