Make Bokeh objects always appear in overlay order
See original GitHub issueThe HoloViews *
syntax for constructing overlays has a clear left-to-right interpretation. In an expression like e1 * e2 * e3
, e1
is normally drawn first, then overlaid with e2
, then with e3
on top.
However, at least with the Bokeh backend, this order is not always respected. E.g. GeoViews map tiles always appear underneath any plotted data, which sometimes is what you want (for a tile layer showing geographic context), but is often not what you want (for a tile layer showing geographic place names, which should not usually be obscured by data points).
I propose that we eliminate any cases where displayable items appear at any order other than that specified in the overlay expression, unless the user has explicitly manipulated a special parameter (e.g. modifying the “level” parameter of a Bokeh object to bump it up or down in draw order). Specifically, from what @philippjfr has described, it seems like the WMTS element in GeoViews should be declared to appear at glyph level by default, to match other HoloViews objects so that sorting will be determined by overlay order. But I’ve raised the issue here rather than in GeoViews because it applies to all displayable items in both HoloViews and GeoViews; in my opinion if any of them (even Annotations) appear at some different order than specifed in the overlay, it’s a bug in HoloViews according to the semantics of Overlay.
Does that sound correct to everyone?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:44 (36 by maintainers)
Top GitHub Comments
Appears what I said is not quite true, I noticed Bars are generally on top of other elements. That should be fixed.
That one is pretty bizarre, don’t know how that would even happen.