graphviz点:如何从节点到箭头中心插入箭头 [英] graphviz dot: how to insert arrows from a node to center of an arrow

查看:225
本文介绍了graphviz点:如何从节点到箭头中心插入箭头的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用graphviz软件包中的点为MPLUS分析创建图表.有没有人使用点可视化结构方程模型/潜在类混合模型的经验?特别是有一个我无法弄清楚如何做的功能:

I try to create diagrams for MPLUS analyses with dot from the graphviz package. Does anybody have experience with using dot to visualize structural equation models/latent class mixture models? There is especially one feature that I can't figure out how to do beautifully:

我需要从节点到另一个箭头中心的箭头,例如

I need arrows from nodes to the center of another arrow like

           C
           |
           |
           V
   A ------------> B

我试图在箭头的交点处插入一个不可见的节点.但是,这会导致破裂"的A-> B箭头,因为点确实将其表示为两个独立的箭头. 点甚至有可能吗?

I tried to insert an invisible node at the intersection of the arrows. This, however, results in a "cracked" A--->B arrow because dot does represent it as two independent arrows. Is this even possible with dot?

感谢您的建议和帮助!

格雷戈尔

推荐答案

以花希​​尔的答案为基础,摆脱纠结:

Building on spenthil's answer to get rid of the kink:

digraph {
  ab[label="", fixedsize="false", width=0, height=0, shape=none];

  a -> ab[arrowhead=None];
  ab -> b;
  c -> ab;

  {rank=same; a; ab; b};
}

输出:

另一种可能性是使用边缘的weight属性来拉直边缘.

An other possibility would be to play with the weight attribute of the edges to straighten out edges.

这篇关于graphviz点:如何从节点到箭头中心插入箭头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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