I am trying to save a plot that includes svg elements.
When I specify the relative svg path, the image will show on the plot, but not in the png that I save.
When I specify the absolute svg path, the image will not show on the plot, but do so when I save it.
The minimal example would be:
from bokeh.plotting import figure
from bokeh.io.export import get_screenshot_as_png
from bokeh.io import show
image_url = …
p = figure(x_range=(0,1), y_range=(0,1))
p.image_url([img_url], x=0.5, y=0.5, w=1, h=1, anchor=‘center’)
show(p)
img = get_screenshot_as_png(p)
img.save(‘img.png’)
“”“same with export_png(p, png.png)”""
This is happening both when working in a notebook or using a server app.
How can I get the svg elements to both show on the plot and on the saved image?