Graphviz 是一個命令列軟體,可以讀取具有 dot 語法的文檔,生成流程圖之類的圖檔,並在各種常見的科學報告文檔格式(如 LaTeX、Rmarkdown、Jupyter notebook)內都有相關外掛或內建功能可以整合使用。
中文教學
<cmd> |
用於 | 例子 |
---|---|---|
dot |
有向圖(分層地畫) | |
neato |
無向圖(基於彈簧模型) | |
twopi |
星形圖(結點中心放到同心的一系列圓上,包括圓心) | |
circo |
環狀的圖 | |
fdp |
無向圖(基於力) | |
patchwork |
方形樹 |
GraphViz Pocket Reference: https://graphs.grevian.org/example
Need compiled with the additional option --shell-escape
.
sample 1: graphviz
sample 2: dot2texi
+ tikz
Use DiagrammeR::grViz
function in DiagrammeR
package:
Also this function can read graphviz file from file path:
In Rmarkdown:
Use graphviz
package
Read graphviz file: Graphviz Preview
Use graphviz in markdown: Graphviz Markdown Preview