-
-
Notifications
You must be signed in to change notification settings - Fork 404
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
Allow to link to an Overlay
#5881
Conversation
Codecov Report
@@ Coverage Diff @@
## main #5881 +/- ##
=======================================
Coverage 88.35% 88.35%
=======================================
Files 310 310
Lines 63983 64013 +30
=======================================
+ Hits 56529 56560 +31
+ Misses 7454 7453 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Compositors are a really, really old mechanism in HoloViews and were originally designed to take in an Overlay and run some operation to collapse multiple layers into a single layer (this was primarily used for combining two Image layers into a single RGB layer). Later we repurposed this as a general mechanism to allow operations to be applied as part of the plotting code. You can register a Compositor to match on one or more layers of a plot (this is done using
Agreed, unfortunately I have no good suggestions on what needs to be tested. When I made the changes in #5840 I did notice a few tests starting to fail with my changes, and it's a good sign that isn't happening in this PR.
Agreed that sounds nice. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy to see this merged. If we could think of more tests that would be nice but as mentioned above I have no good way of figuring out what tests would make sense to add.
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. |
Partly extracted from d690a2e in #5840
The goal of this PR is to allow linking (with a
RangeToolLink
) to anOverlay
, the example in mind being a minimap targeting a plot with subcoordinates (subcoordinates being implemented as anOverlay
).Overriding
.clone
at theOverlay
level is done to be more specific instead of what was done in #5840 at theLabelledData
level.Overriding
clone
is only required to gettest_range_tool_link_callback_single_axis_overlay_target_image_source
to pass, i.e.test_range_tool_link_callback_single_axis_overlay_target
runs fine without it. While the two tests look very much alike, the former uses anImage
as a source. I saw that there's aCompositor
registered for theImage
element, which makes the code run through a pretty hairy path when creating a simpleImage
(.map
,.collapse_element
) and leads to the creation of internal/intermediate overlays.I would be happy to:
Compositor
logic explain what is going on there :)RangeToolLink
to a simple overlay of curves, with either anImage
or aCurve
as source.As for documenting these changes, I haven't found any place to update where links were described as limited to elements. There are two gallery examples that demonstrate how to use the
RangeToolLink
, it seems to me it wouldn't improve them so much to show how to link to an overlay. My suggestion instead would be to show that this can be done adding an EEG example to the gallery (in or after #5840).closes #4472