python - Jinja 渲染 matplotlib 图?

标签 python matplotlib jinja2

我正在考虑结合 matplotlib 和 jinja2 来生成 html 页面。

我现在所做的只是将之前由 matplotlib 生成的图像作为我的 html 页面中的引用。结果真的是静态的。

我看过类似 here 的相关问题或 here ,但与 matplotlib/jinja 集成无关(最终我想要交互性,但它对我来说似乎不够简单)。

除了我所做的,还有其他选择吗?

最佳答案

来自 v1.x 的 Ipython notebook 使用 jinja2

您可以在笔记本中创建内联图像,然后使用 nbconvert 将其转换为静态 html。您可以提供自定义 css,也可以自定义输出 html 以隐藏代码单元格、单元格编号……

关于python - Jinja 渲染 matplotlib 图?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18999091/

相关文章:

python - 如何访问 Jinja2 模板中引用对象的属性 (Google App Engine)

python - pandas 否定运算符的替代方案

Python:对 True/False 向量的运算

python - 如何从我们的应用程序在 google appengine 中使用的数据存储中删除行?

python - 将数据帧行附加到其他数据帧的特定值 - python

python-3.x - 如何用networkx绘制平面图?

python - 将 POST 和 GET 发送到同一函数时出现 flask 错误,

python - 使用 pytest parametrize fixture 运行我得到 `self` is not defined

python - Matplotlib basemap 海岸坐标

python - Matplotlib/Genfromtxt : Multiple plots against time, 跳过 .csv 中缺失的数据点