Using symbol font / math notation in graphviz

ⅰ亾dé卋堺 提交于 2019-12-05 06:27:39

OK, using UTF8 characters directly in the .dot file, I can now avoid the Symbol font kludge (but what I tried for subscripts, e.g., subscript-one, x2081 just have a small box containing '2081')

Here's the revised file, that now works with both -Tpdf and -Tpng. (The UTF8 characters don't appear properly in this post.)

    digraph threevar {
      rankdir=LR;
      size="8,4";
      node [fontsize=14 shape=box];
      edge [fontsize=10];
      center=1;
      {rank=min k }
      {rank=same X1 X2 X3 }
      {rank=max z1 z2 z3 }
      z1 [shape=circle label="d1"];
      z2 [shape=circle label="d2"];
      z3 [shape=circle label="d3"];
      k [label="?" shape="ellipse"];
      k -> X1 [label="?1"];
      k -> X2 [label="?2"];
      k -> X3 [label="?3"];
      z1 -> X1;
      z2 -> X2;
      z3 -> X3;
    }

The result is:

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!