14

有谁知道是否有办法用python 包或任何其他 python 库制作circos 风格的情节?matplotlib它们不必像示例那样漂亮。

4

3 回答 3

5

据我所知,没有直接的功能。如果我要创建这个功能,我会使用极坐标图作为起点,然后我会创建一个转换,将沿圆轴的数据位置转换为极坐标。

于 2012-02-28T15:00:32.403 回答
3

Yann's idea is great.And more, circos is developed by Perl with GD and other modules, and then output SVG (or png). Python can also do this if you want to create new wheel :)

As I know if you wanna circos style images (circular style) by matplotlib, you'd better write raw python code directly :

  1. learn basic SVG grammar
  2. use python to generate the basic layout
  3. design your image elements
  4. computing and transforming your data coordinates; you'd better think it in polar coordinates (I did the same things but without open source.)
  5. output your elements.

If you like, join circos's google group to discuss: http://groups.google.com/group/circos-data-visualization

于 2012-03-12T06:55:38.993 回答
1

似乎 Biopython 的模块 GenomeDiagram 具有类似的功能,虽然它是为绘制基因组数据而设计的,但不是任何数据,如 circos,输出不会那么好。

于 2013-11-19T18:37:30.653 回答