Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 django 应用程序中使用 matplotlib 库来创建图表。
我正在尝试借助thread将 matplotlib 库的画布对象渲染为 django 模板。
有没有办法在 django 模板中只渲染画布对象?
还有另一种方法可以做到这一点。我在本地媒体目录中使用 matplotlib 库的“figure.savefig”函数保存了图形,并使用 django 模板加载了图形。生成图形的视图将图形位置和名称传递给 django 模板。