使用 Graphviz 的 SVG
来自 PostgreSQL wiki
跳转到导航跳转到搜索Graphviz
Graphviz (https://graphviz.cn/) 是一套工具,可使用不同的策略来可视化有向图和无向图。
- dot - 有向图的默认值
- neato - "弹簧模型" 布局
- fdp - 与 neato 相似
- sfdp - fdp 的多尺度版本,用于大型图的布局
- twopi - 径向布局
- circo - 圆形布局
源文件的语法是 DOT (https://en.wikipedia.org/wiki/DOT_(graph_description_language)),默认文件扩展名为 .gv。
示例
我们文件的典型标题如下所示
digraph {
layout=dot;
// default values
node [shape=box, label="", fontname="sans-serif", style=filled, fillcolor=white, width=2.2, fontsize=8];
graph [fontname="sans-serif"]; // must be specified separately
edge [fontname="sans-serif"]; // must be specified separately
// an unobtrusive background color
pad="1.0, 0.5";
bgcolor=whitesmoke;
// layout of edges and nodes
splines=ortho;
nodesep=0.3;
ranksep=0.3;
label="An example graph" fontsize=26;
...
...