RangeXY stream not working when overlaying

Hi there,

I’m trying to get the RangeXY from a datashaded set of points. This works fine (i.e. I get a range values out):

However when I try to overlay a GeoViews tile source, the RangeXY stream returns no values:

Not sure if this is a bug, but thought I’d mention here in case I’m doing something wrong. Thanks!

This doesn’t appear to be particular to GeoViews:

Here is the code as text if useful:

import pandas as pd
import hvplot.pandas
import geoviews as gv
from holoviews.streams import RangeXY

df = pd.DataFrame({
    "x": [1,2,3],
    "y": [1,2,3]
})
raster_plot = df.hvplot.points(x="x", y="y", datashade=True, geo=True)

range_xy_stream = RangeXY(source=raster_plot)
raster_plot

and

raster_plot = df.hvplot.points(x="x", y="y", datashade=True, geo=True) * gv.tile_sources.Wikipedia

and

raster_plot = df.hvplot.points(x="x", y="y", datashade=True, geo=True) * df.hvplot.points(x="x", y="y", rasterize=True, geo=True)

So it is indeed currently not possible to attach a RangeXY stream to an overlay. For now though, can’t you just get a handle on the plot, attach the stream and then overlay the tile source?

1 Like

Thanks very much for the advice @philippjfr, great idea! This works beautifully:

raster_plot = df.hvplot.points(x="x", y="y", datashade=True, geo=True)

range_xy_stream = RangeXY(source=raster_plot)
raster_plot * gv.tile_sources.Wikipedia