Graphviz(DOT)字幕 [英] Graphviz (DOT) Captions

查看:47
本文介绍了Graphviz(DOT)字幕的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用Graphviz DOT打印大量图形.为了区分每个图对应于哪个输入,我还想为每个图添加标题.无论如何,可以将其嵌入到图形的DOT表示中.

I need to print a large number of graphs using Graphviz DOT. To distinguish which input each graph corresponds to, I want to also have a caption for each graph. Is there anyway to embed this into the DOT representation of the graphs.

推荐答案

您可以使用label向图形添加标题.

You can use label to add a caption to the graph.

示例:

digraph {
    A -> B;
    label="Graph";
    labelloc=top;
    labeljust=left;
}

labelloclabeljust可用于确定图形标签的顶部/底部和左侧/右侧.

labelloc and labeljust can be used to determine top/bottom and left/right position of the graph label.

可用于修改 graphviz属性参考.

提示:定义点文件的图形标签结尾,否则子图形将继承这些属性.

Tip: Define the graph label end of your dot file, otherwise subgraphs will inherit those properties.

这篇关于Graphviz(DOT)字幕的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆