目录
GraphViz图基本元素说明
E, N, G, S 和 C 相当于 edges, nodes, the root graph, subgraphs 和 cluster subgraphs
- Graph属性: 定义图的大小,样式,元素的排列方向,超链接等
- Node 节点: 定义节点的大小,样式,形状,节点说明等
- Edge 线条: 定义线条样式(虚实箭头等),线条说明等
- Subgraph 子图: 在graph中嵌套graph
- Cluster subtraphs 子图集群
node常用属性
| 属性名 | 默认值 | 说明 |
|---|
| color | black | node图形颜色,see color values |
| fontcolor | black | 字体颜色 |
| fontname | Times-Roman | 字体 |
| fontsize | 14 | 字体大小 |
| image | | node背景图片地址 |
| label | node | name node 显示内容 |
| shape | ellipse | 形状 |
| style | | 图形样式,eg、bold、dotted、filled |
| height | .5 | 最低高度尺寸 |
| width | .75 | 最低宽度尺寸 |
| URL | | 点击跳转地址 |
| target | | 点击跳转打开方式 |
edge常用属性
| 属性名 | 默认值 | 说明 |
|---|
| arrowhead | normal | 箭头样式 |
| arrowsize | 1 | .0 箭头尺寸 |
| color | black | 颜色 |
| dir | forward | 箭头方向 |
| edgeURL | | 点击跳转地址 |
| fontcolor | black | 字体颜色 |
| fontname | Times | -Roman 字体 |
| fontsize | 14 | 字体大小 |
| headport | | 线条头部连接处,eg .n、ne、e、se、s、sw、w、nw |
| label | | 描述内容 |
| labelfontcolor | black | label字体颜色 |
| labelfontname | Times | -Roman label字体 |
| labelfontsize | 14 | label字体大小 |
| style | | 图形样式,eg .bold、dotted、filled |
| tailport | | 线条尾部连接处,eg .n、ne、e、se、s、sw、w、nw |
| weight | 1 | integer cost of stretching an edge |
graph全局属性
| 属性名 | 默认值 | 说明 |
|---|
| color | black | for clusters,outline color,and fill color |
| dpi | 96 | 图像输出像素 |
| fillcolor | black | cluster fill color |
| fontcolor | black | 字体颜色 |
| fontname | Times-Roman | 字体 |
| fontsize | 14 | 字体大小 |
| label | | 描述内容 |
| landscape | | true:orientation=landscape |
| rank | | 子图等级限制, same,min,max,source,sink |
| rankdir | TB | 图片排列方式,LR(left to right) or TB(top to bottom) or RL(right to left) or BT(bottom to top) |
| size | | 最大图片尺寸 |
| style | | 图片样式 |
| stylesheet | } pathname or URL to XML style sheet for SVG | |
| URL | | 点击跳转地址 |
| target | | 点击跳转打开方式 |
| bgcolor | | 背景颜色 |