Reputation: 2350
I would like to embed a Bokeh plot (from IPython notebook) into my blog as an svg file. Is there currently a way to save the plots as svg's?
I tried to look in the documentation, but it's a little unclear.
Upvotes: 7
Views: 3357
Reputation: 6528
This is now possible! From the doc:
from bokeh.io import export_svgs
# option 1
plot.output_backend = "svg"
# option 2
export_svgs(plot, filename="plot.svg")
Additional dependencies need to be installed. At the time of writing: selenium
and a web driver (geckodriver
or Chromium).
Upvotes: 6