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.

Broken dynamic eq_hist Bokeh Datashader plots with colorbars

See original GitHub issue

At first I thought this was a Bokeh issue, but I haven’t been able to reproduce it in a static export or by following Bokeh examples, so I’m filing it here on HoloViews. Specifically, a Datashader plot with eq_hist and colorbars works fine if it’s not dynamic:

import dask.dataframe as dd, holoviews as hv
from holoviews.operation.datashader import rasterize, dynspread
import bokeh, datashader as ds
hv.extension("bokeh")

df = dd.read_parquet('data/nyc_taxi_wide.parq').compute()
pts = hv.Points(df, ['dropoff_x', 'dropoff_y'])
opts = hv.opts.Image(cnorm='eq_hist', colorbar=True, width=700)
ds.__version__, hv.__version__, bokeh.__version__

image

image

but it fails if dynamic=True:

image

Here the immediate symptom is that the colorbar labels are gone, but more seriously as soon as the user pans or drags, the plot flickers briefly into a massively zoomed in bit of the plot, roughly like:

image

then disappears altogether:

image

After the plot disappears, the JS console shows:

image

It works fine if there is no colorbar or if cnorm='log', so it seems like it’s something to do with showing an eq_hist colorbar dynamically. I see the same behavior with bokeh 2.3.0, 2.3.1, and 2.3.2.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
mattpapcommented, Jun 17, 2021

I will submit a PR and target this for 2.3.3 together with layout regression fixes.

2reactions
philippjfrcommented, Jun 17, 2021

@mattpap Here’s the notebook I promised https://anaconda.org/philippjfr/broken_colorbar_labels/notebook

Click the button and you’ll be able to reproduce the error and hopefully debug it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dynamic colorbars for image and contourf - HoloViews
I am new to holoviz world, and am trying to create a plot using hvplot/holoviews. I want to make a 2D plot with...
Read more >
python 3.x - Colorbar for datashader aggregation in plotly
At the moment I'm using Plotly to make the plot interactive as for some reason the holoviews/bokeh method is quite broken. This is...
Read more >
Make a colorbar for datashaded images? · Issue #2102
I understand that a colorbar for a datashaded image can't be ... However, I find that the the color scaling of datashader seems...
Read more >
bokeh Changelog - pyup.io
11623 [BUG] Placement of toolbar location is broken for gridplots ... 10493 Accurate color bar ticking with eqhist mapping
Read more >
With Holoviews, your data visualizes itself. | PythonRepo
Stop plotting your data - annotate your data and let it visualize itself. ... with the Bokeh backend (this is a screenshot of...
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