question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make Bokeh objects always appear in overlay order

See original GitHub issue

The 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:open
  • Created 6 years ago
  • Reactions:2
  • Comments:44 (36 by maintainers)

github_iconTop GitHub Comments

2reactions
philippjfrcommented, Jan 4, 2018

Appears what I said is not quite true, I noticed Bars are generally on top of other elements. That should be fixed.

1reaction
philippjfrcommented, Apr 11, 2022

That one is pretty bizarre, don’t know how that would even happen.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Make Bokeh objects always appear in overlay order #1968
I propose that we eliminate any cases where displayable items appear at any order other than that specified in the overlay expression, unless ......
Read more >
How to control the z-order of glyphs in Bokeh?
I have glyphs that intentionally overlap, and I need to specify that one of them is on top. I believe I can get...
Read more >
Configuring plot tools — Bokeh 2.4.3 Documentation
Configuring plot tools#. Bokeh comes with a number of interactive tools that you can use to report information, to change plot parameters such...
Read more >
Interactive Data Visualization with Bokeh - Trenton McKinney
1.1.3 A scatter plot with different shapes¶. By calling multiple glyph functions on the same figure object, we can overlay multiple data sets...
Read more >
Customizing Plots — HoloViews v1.15.3
While different plotting extensions like bokeh, matplotlib and plotly offer ... a legend automatically appears to differentiate elements in the overlay.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found