如何在Python Bokeh生成的html文件中添加文本 [英] How to add text to html files generated by Python Bokeh

查看:499
本文介绍了如何在Python Bokeh生成的html文件中添加文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何为bokeh生成的图添加文本到HTML文件.我看不到任何用于在文件上专门编写文本的API.您所能做的就是绘图.

How do I add text to the HTML files for plots that are generated by bokeh. I don't see any API for specifically writing text on the files. All you can do is make plots.

推荐答案

有很多方法可以将散景图嵌入到其他文档中.对于静态文档,您可以让Bokeh创建其标准默认文档,也可以使其使用您提供的模板.您也可以只生成divscript标记,然后将它们嵌入到自己的静态页面或Web应用程序中(视需要而定).以上任何内容也可以在文档中,Sidecar .js文件中包含数据,或从Bokeh服务器加载.所有这些选项在嵌入的用户指南部分中都有说明:

There are alot of ways to embed Bokeh plots in other documents. For static documents, you can have Bokeh create its standard default document, or you can have it use a template you provide. You can also generate just the div and script tags and then embed those in your own static pages or web-apps however you like. Any of the above can also either have the data in the document, in a sidecar .js file, or loaded from a Bokeh server. All these options are described in the user guide section on embedding:

http://docs.bokeh.org/en/latest/docs/user_guide/embed.html

以及参考指南中的

https://docs.bokeh.org/en/latest/docs/reference/resources.html

请告诉我们是否有更多或更好的信息可以在此添加.

Please let us know if there is more or better information we could add there.

这篇关于如何在Python Bokeh生成的html文件中添加文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆