-
-
Notifications
You must be signed in to change notification settings - Fork 403
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
Add link_selections function for automated linked selections #3951
Conversation
Fabulous! Can we have all of those things? :-) It is hard to choose! |
4ff9ae8
to
9d4f42c
Compare
Very, very neat. |
Cool!! |
nice |
c99958a
to
92382bf
Compare
All of the dependent PRs have been merged, so I squashed and rebased this PR on master. Review/feedback appreciated! |
Started reviewing but it looks to me like something went wrong during a merge or rebase and a number of preceding PRs are being reverted by this one. |
Once that's fixed I'm fine with merging this. I'd like to see a user guide on using linked selections along with a few reference and gallery examples but that can happen in later PRs. |
92382bf
to
317b5fb
Compare
Thanks for catching that @philippjfr, I think it's straightened out now and I won't force push on this PR again in case you want to leave comments inline. Thanks for taking a look! |
Oh, that explains the seemingly unrelated changes! The diffs make much more sense now! |
There appears to be some Python 2 issue. |
Yeah, those errors are a bit confusing. I'll build a local Python 2 environment and see what I can figure out. |
6343a89
to
a85b056
Compare
Very excited about this! Going to merge now. |
* Add link_selections support * Fix python2 issue
Great! Thanks for tracking down the python 2 issue! |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Overview
This PR adds a
holoviews.selection.link_selections
function that is an initial implementation of the automatic linked selection approach proposed in #3842.This function can be used to transform HoloViews objects into new objects with linked selections enabled.
Dependencies
This PR depends on the following open PRs, and will be rebased once these are merged.
Example notebook
For examples, see the notebook at https://anaconda.org/jonmmease/link_selections_pr/notebook.
Please play around with this notebook to get a feel for the workflow and capabilities and report back on how things look @jbednar @philippjfr @jlstevens.
Highlights
Linked
Points
plots with Bokeh backend:Linked
Points
,Histogram
,Scatter3d
, andTable
layout with Plotly backend:Linked
Violin
,Points
andBivariate
overlay, andDistribution
layout with Bokeh backend:Selections on datashaded elements
Linked plots across notebook output cells, and updating selection color after display:
Extensions
There is a lot more functionality that can be built on this foundation. Here are some directions:
link_selections
function only stores the latest selection. But the_base_link_selections
base class is more general, and other subclasses can be added for cross filtering, and glue-style multi-color brushing.Bounds
element to display the selected region after a selection is completed. I think this will largely be a requirement for the cross-filter mode, otherwise it would be hard to make sense of the union of the selected regions across plots.element.where
operation (Add element.where method support dim expressions #3933).dim
expressions andhistogram
operation to make selection with datashader + histogram elements with Dask DataFrames scale well.link_selections
and traverse them to findHoloViews
panes. This way a Panel layout with HoloViews panes that use different backends could be linked together.BoundsPoly
stream that is analogous toBoundsXY
but for a polygon rather than a box. Use this to support defining selection regions using lasso selection.Let me know which of these you think are capabilities that we really should have for the initial release. Thanks!