Is there a Python API for drawing diagrams (that use lines to connect corresponding values between two lists) [closed]

让人想犯罪 __ 提交于 2019-12-21 02:42:11

问题


Given two lists, which contain same elements of string but in different orders, is there any API that can draw diagrams like

The diagram consists of two stacks of string. Between these two stacks, lines are used to link same elements between these two stacks.

Its outlook is similar as the visualization of sonar (an Eclipse code diff. tool), but the semantics of lines are different.

Does this kind of diagram have some formal name?


回答1:


The general graph description format DOT seems the most appropriate to me: it is easy to describe a huge variety of graphs, with this (text) format, and you can plot them with one of the many tools available (Graphviz comes to mind, for example).

You also have the specialized python-graph module at your disposal (which can work with the DOT format too).




回答2:


With python you have many options, see here for more. I would recommend matplotlib, take a look at this example.



来源:https://stackoverflow.com/questions/7528224/is-there-a-python-api-for-drawing-diagrams-that-use-lines-to-connect-correspond

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!