-
-
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
Support overlay on Layouts #2596
Comments
This might be ok in cases like this where you are overlaying a simple element but we are more uncertain of how to distribute containers, e.g Generally we never intended to support |
I'm pretty sure that Layout Layout So I vote for L |
Seems fine. I'd be happy to support Layout * Element/Overlay/HoloMap/DynamicMap but nothing else. |
We have discussed the elementwise zipping semantics for |
Is there an issue documenting the L |
That doesn't sound very well defined to me, what happens if they are not the same length? Supporting just the very specific condition when they match in length seems weird to me. Some of that discussion is here: #2075 but some of it wasn't captured I'm guessing. I'm fairly strongly against the zipping suggestion since it's a pretty unpredictable thing to do. |
I'm not seeing what the unpredictability is here, if it raises an exception when they are not the same length. Seems very straightforward to me. Again, I don't know how useful it is, but it does seem straightforward. |
This is what I mean about us not knowing what we feel about it! That is why we should tackle the case we do agree makes sense first allowing us to decide how to handle |
Sure it's straightforward in itself but it's also hard to discover and raises all kinds of expectations about what might and might not be supported. A user who tries it and gets an exception will assume it's not supported while a user who tries it and it does work will start expecting it to always work. For all the other types the semantics of |
I guess I disagree with that approach in itself, then. I think that if we support the cases that are straightforward, then that will cover what normal people will do, and they don't need to even ever dream that there are non-straightforward cases. Whereas if we fail to allow what is very clearly meaningful, many people will try it and have no idea why it doesn't work, then move on slightly bewildered. Basically, people really don't care what happens for some case they aren't trying, so if it works for the cases they do try, then they are happy. Why should the fact that some cases are not straightforward have any bearing on the ones that are? |
The mere fact that we are having this discussion is a case in point -- I expected L |
I'm still at a strong -1 for allowing overlays of two Layouts, the zipping semantics is only one possibility you could imagine, while all other supported overlay operations are all very clearly defined. Indeed those semantics differ substantially to the behavior of NdLayouts which are matched on their keys: There is no other overlay operation in holoviews that has zipping semantics so this is an entirely new concept to introduce. In all my years of using holoviews I have also never once thought to try doing this and to be quite honest overlaying by position rather than by matching on some key also scares me too much to ever consider using it. It's simply way too easy to get the ordering wrong and end up with something you didn't intend.
My objection isn't about it being straightforward or not, indeed a lot of the overlay semantics are by far more complex and less straightforward, my objection is that it does not match other semantics and that it's much more implicit than anything else. When you can match on keys like NdLayouts or GridSpaces do, you can be sure you are doing the semantically "correct" thing. When you zip two lists you are using implicit information, i.e. the length and ordering of lists, to do that matching which has no guarantee at all of being correct and lots of potential to be incorrect, particularly when the lists are long and you can't easily visually confirm that the two lists are in the order you intend. I intend to merge my PR to support Element/Overlay/HoloMap/DynamicMap overlays and then close this issue. |
I have no strong commitment to ETA: Oh, now that your PR appears I see that it's about overlays onto layouts, i.e., that you are now supporting broadcasting, just not zipping. In that case I agree, this issue can be closed when #3234 is merged. Thanks! |
Which I've implemented in the PR referenced above. |
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. |
Is there a deep reason why overlaying an annotation onto a Layout doesn't work?
Of course, I can overlay it on each of the items in the layout, but can't the overlay operation simply iterate through the items in the layout and overlay the annotation on each one? That's what happens for NdLayouts and GridSpaces, so I'm not sure why it doesn't work here. Sure, there can be times that doing so will lead to an error, but I don't think those times should stop it working when it makes sense as it does here.
The text was updated successfully, but these errors were encountered: