How can I make voronoi treemaps? [closed]

2020-05-24 16:44发布

I want to make voronoi treemaps for statistics data, like alt text newsgraphy

Do you know how I can do that in Perl, PHP, Ruby, or Python?

7条回答
兄弟一词,经得起流年.
2楼-- · 2020-05-24 17:07

The latest version (2.0) of Macrofocus TreeMap has the Voronoi algorithm as an option, among others.

查看更多
该账号已被封号
3楼-- · 2020-05-24 17:10
戒情不戒烟
4楼-- · 2020-05-24 17:14

James Tauber is writing a tutorial that uses JavaScript and Fortune's algorithm to draw a Voronoi diagram in a canvas element: Voronoi Canvas Tutorial

It's not complete yet (he's at part 3 of 4) but there's enough there to complete it I think.

查看更多
爷、活的狠高调
6楼-- · 2020-05-24 17:24

the other Python answer seems to point at a raster only solution. I am also interested in solving this problem (in Python) and I think the following script could form a usable starting point:

http://www.oxfish.com/python/voronoi.py

(Archived copy at wayback)

查看更多
爱情/是我丢掉的垃圾
7楼-- · 2020-05-24 17:27

Just found this page. I've been working on a Voronoi demo applet using Javascript/canvas, after translating into Javascript a C# version of Steven Fortune's algorithm by Benjamin Dittes (available at Code Project, see "Fortune's Voronoi algorithm implemented in C#"). Here is the page which include Fortune's Voronoi algorithm in Javascript: http://www.raymondhill.net/voronoi/voronoi.php This is a first iteration, I plan to adapt it further to be better suited to Javascript. Hope this helps.

查看更多
登录 后发表回答