Hi all!
I am trying to plot a raster above a base image in python using plotly 5.15.0 and datashader 0.16.0. Everything looks fine in the first moment, but when I zoom into the html, then the raster pixels are displayed somehow fuzzy.
My workflow is:
- Create a PIL using datashader and
transfer_functions.shade().to_pil()
- plotting a Placeholder scatter_maxbox
fig = px.scatter_mapbox(...)
- adding the PIL by using mapbox_layers:
fig.update_layout(mapbox_style="carto-positron",
mapbox_layers =[
{
"sourcetype": "image",
"source": img_out,
"coordinates": bbox,
"opacity":1,
"type": "raster",
}]
- saving the html with
fig.write_html(f"./plots/{plot_name}.html")
Here is an example of a zoommed pixel displaying the fuzziness. I would expect that there is a sharp rectangle but instead it is a fuzzy circle/point.
Does anyone has experience with this issue?