使用python的svg图 [英] svg diagrams using python
问题描述
我正在寻找一个库来在python中生成svg图(我从sql数据库中获取数据).我已经找到 python-gd ,但是它没有太多文档,最近一次更新是在2005年,所以我想知道是否还有其他适合此目的的库.
我主要是在考虑简单的折线图,例如解决方案
在寻找简单的线条图形时,此.
此示例图像仅显示其部分功能.使用 launchpad 可用的主干版本,您将能够添加图例框并添加轴标题.>
此外,使用主干版本,还可以生成:
- 点线图(我认为您需要的点图)
- 散点图
- 饼图/甜甜圈图
- 水平/垂直条形图
- 甘特图
I am looking for a library to generate svg diagrams in python (I fetch data from a sql database). I have found python-gd, but it has not much documentation and last update was in 2005 so I wonder if there are any other libraries that are good for this purpose.
I am mostly thinking about simple line graphs, something like this:
As you're looking for simple line graphics, probably, CairoPlot will fit your needs as it can generate svg output files out of the box. Take a look at this.
This example image shows only a few of its capabilities. Using the trunk version available at launchpad you'll be able to add a legend box and add axis titles.
Besides that, using the trunk version, it's possible to generate:
- DotLine charts (the ones I believe you need)
- Scatter charts
- Pie/Donut charts
- Horizontal/Vertical Bar charts
- Gantt charts
这篇关于使用python的svg图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!