The issue is that in the code below I expect holoviews.save() to generate a .png file but creates a .html file instead
I use holoviews.save() to generate .png files for all sorts of other plots, but it seems like it doesn’t like this type of element. Additionally, this works just fine on my windows machine but not the Linux one which is a bit odd.
import holoviews
import holoviews.operation.datashader
import datashader.utils
import numpy
holoviews.extension('bokeh')
renderer = holoviews.renderer('bokeh').instance(mode='server')
# Create a holoviews.Image
ls = numpy.linspace(0, 10, 200)
xx, yy = numpy.meshgrid(ls, ls)
bounds=(-1,-1,1,1)
img = holoviews.Image(numpy.sin(xx)*numpy.cos(yy), bounds=bounds)
x_size = 1024
y_size = 768
ds_img = holoviews.operation.datashader.rasterize(img, width=x_size, height=y_size, precompute=True)
ds_img = ds_img.opts(width=x_size, height=y_size, cmap='viridis', logz=False, invert_yaxis=True)
# Ideally this will create 'ds_img.png' but instead generates a file: 'ds_img.html'
holoviews.save(ds_img, 'ds_img.png')
# This also doesnt work and fails with an exception. It was something I tried from reading another bug report
# datashader.utils.export_image(ds_img, filename='ds_img_ds.png')