Bokeh:如何将文件另存为 svg?

问题描述 投票:0回答:1

我想将散景图(来自 IPython 笔记本)作为 svg 文件嵌入到我的博客中。目前有没有办法将绘图保存为 svg?

我尝试查看文档,但有点不清楚。

python bokeh
1个回答
5
投票

这现在成为可能!来自doc

from bokeh.io import export_svgs

# option 1
plot.output_backend = "svg"

# option 2
export_svgs(plot, filename="plot.svg")
© www.soinside.com 2019 - 2024. All rights reserved.