HTML水平线误差graphviz [英] Html Horizontal line error graphviz

查看:168
本文介绍了HTML水平线误差graphviz的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要创建一个带有与节点的行分隔标签的子图集群.

I'm needing to create subgraph cluster have a label with line separation from nodes.

subgraph cluster_0{

   label=< <B>process #1</B> <HR/> >
    node [shape=none]
    t1 [label="label1"]
    t2 [label="label2"]
    t3 [label="label 3"]
    node [shape=box group=a style=filled fillcolor="red;.5:white" height=.2 label = "" ]
    A [ fillcolor="red;0.3:white" ]
    B [fillcolor="red;.9:white"]
    C
     node [shape=none  fillcolor=white]
    t11 [label="label1"]
    t21 [label="label2"]
    t31 [label="label 3"]

    edge[style=invis];
     A->B->C
     t1->t2->t3
     t11->t21->t31





 }

然后我在


语法上出错. 错误堆栈

Then I get in error on


Syntax. error stack

pydot.InvocationException: Program terminated with status: 1. stderr follows: Error: syntax error in line 1 
...  <HR/> ...
in label of graph cluster_0

我的graphviz版本是 点-graphviz版本2.36.0(20140111.2315)

My graphviz version is dot - graphviz version 2.36.0 (20140111.2315)

推荐答案

在graphviz网站上,名为节点形状" 包含类似于html的标签的语法(大约一半):

On the graphviz web site, the page called "Node Shapes" contains a grammar (about half-way down) for html-like labels:

对于<HR/>,它说:

rows : row
     | rows row
     | rows <HR/> row

这意味着 <HR/>仅在两行之间被允许.并且行仅允许在<TABLE>中使用,因此您必须将所有内容包装在表中,然后它才可能起作用.

This means that <HR/> is only allowed in between two rows. And rows are only allowed within a <TABLE>, so you'll have to wrap everything in a table and then it may work.

根据您要实现的精确程度,另一种可能的解决方案可能是使用<U>text</U>简单地下划线.

Depending on what exactly you'd like to achieve, an other possible solution might be to simply underline the label using <U>text</U>.

这篇关于HTML水平线误差graphviz的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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