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.

hvplot.image(rasterize=True) not working with holoviews>=1.13.4

See original GitHub issue

After upgrading holoviews from 1.13.3 to 1.13.4 hvplot.xarray.image(rasterize=True, dynamic=True) no longer works. displayed image resolution is not updated upon zooming into an image plot

ALL software version info

(linux or macos) conda create -n holoviews python=3.7 holoviews xarray rasterio hvplot datashader jupyter

holoviews                 1.13.4             pyh9f0ad1d_0    conda-forge
bokeh                     2.2.2            py37hc8dfbb8_0    conda-forge
hvplot                    0.6.0              pyh9f0ad1d_0    conda-forge
datashader                0.11.1             pyh9f0ad1d_0    conda-forge

Description of expected behavior and the observed behavior

Zooming into a subregion of an image with raster with rasterize=True, dynamic=True should update displayed resolution

Complete, minimal, self-contained example code that reproduces the issue

This uses an example image from AWS public data

import os
import xarray as xr
import hvplot.xarray
os.environ['GDAL_DISABLE_READDIR_ON_OPEN']='EMPTY_DIR'
os.environ['AWS_NO_SIGN_REQUEST']='YES'
href = 's3://sentinel-s1-rtc-indigo/tiles/RTC/1/IW/10/T/ET/2020/S1B_20200106_10TET_ASC/Gamma0_VV.tif'
da = xr.open_rasterio(href)
da.hvplot.image(rasterize=True, dynamic=True, clim=(0,0.4), aspect='equal', frame_width=600, cmap='gray')

Stack traceback and/or browser JavaScript console output

No tracebacks, not sure how to output console messages.

downgrading to holoviews 1.13.3 things work as expected. cc @rsignell-usgs

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
philippjfrcommented, Oct 21, 2020

Fixed in https://github.com/holoviz/holoviews/pull/4654, will release 1.13.5 tomorrow.

2reactions
jbednarcommented, Oct 21, 2020

Good question. If you have any influence, try to get @jsignell to come back to the project so that things will run more smoothly. 😃 Meanwhile, I can’t comment on what this particular issue indicates about stability, since I can’t see what the problem could be.

I don’t have rasterio in my usual environment but this problem appears to be reproducible with one of the stock examples:

import xarray as xr
import hvplot.xarray

air = xr.tutorial.open_dataset('air_temperature').load().air
air2d = air.sel(time='2013-06-01 12:00')
air2d.hvplot.image(width=400, rasterize=True)

Here the image updates with either rasterize or datashade for hv=1.13.3, but for hv=1.13.4 or hv=1.14.0a2, it only updates for datashade=True, not rasterize=True. The same happens for rasterize(air2d.hvplot.image(width=400)), so I’ve moved it from hvPlot to HoloViews, where I’m assuming the problem originates (and also since it depends on the hv version and not the hvPlot version).

I didn’t see any relevant warnings or errors on the console. @philippjfr ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

hvplot.image(rasterize=True) not working with holoviews ...
After upgrading holoviews from 1.13.3 to 1.13.4 hvplot.xarray.image(rasterize=True, dynamic=True) no longer works. displayed image ...
Read more >
Geographic Data — hvPlot 0.8.2 documentation
import xarray as xr import hvplot.pandas # noqa import hvplot.xarray # noqa ... to project the data before rasterizing it, e.g. to address...
Read more >
Customization — hvPlot 0.8.2 documentation
The hvPlot API is closely modeled on the pandas plot API but also diverges ... Responsive mode will only work if at least...
Read more >
hvPlot — hvPlot 0.8.2 documentation
A familiar and high-level API for data exploration and visualization. hvPlot diagram .hvplot() is a powerful and interactive Pandas-like .plot() API ...
Read more >
Fix range of colormap for hvplot.image with rasterize=True
Hi all, I'm trying to display some discrete raster data. The values are 0 - 9, and represent the land use classification for...
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