Exporting figures from Bokeh as svg or pdf?

前端 未结 3 1034
再見小時候
再見小時候 2021-01-01 11:13

Is it possible to output individual figures from Bokeh as pdf or svg images? I feel like I\'m missing something obvious, but I\'ve checked the online help pages and gone thr

3条回答
  •  长发绾君心
    2021-01-01 11:35

    In the meantime... as a workaround, until we get a native support, you can use phantom.js to convert the HTML output into a pdf file. We use it in our example testing directory to convert HTML generated plots into png images, but you could also get pdf images:

    • https://github.com/ContinuumIO/bokeh/blob/master/examples/test#L217

    And more info here:

    • http://phantomjs.org/screen-capture.html

提交回复
热议问题