Graphviz中的自动多行标签? [英] Automatic multiline labels in Graphviz?

查看:128
本文介绍了Graphviz中的自动多行标签?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Graphviz 绘制一些图形.我在节点上使用标签,可以放入"\n"强制其将标签分成两行.有什么方法可以让Graphviz(或我正在使用的dot)自动看到它应该拆分一些节点标签,并使其本身自动地做出最佳选择吗?

I'm using Graphviz to draw some graphs. I'm using labels on nodes and I can put in "\n" to force it to split the label across 2 lines. Is there some way to get Graphviz (or dot which I'm using) to automatically see that it should split some nodes labels, and for it itself to make the best choice automagically?

推荐答案

我也搜索了此内容,但我认为当前版本中不可能.当前的解决方案"是编写代码,根据节点之间的最小距离(nodesep属性,如果我没记错的话),每隔几个字符自动添加"\ n".

I've also searched for this, but I don't think it's possible in the current version. The current "solution" is to write code that automatically adds the "\n" every few characters, based on the minimum distance between nodes (nodesep attribute, if I'm not mistaken).

这篇关于Graphviz中的自动多行标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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