是否可以从节点绘制箭头到空?(Is it possible to draw arrow from node to nothing?)

编程入门 行业动态 更新时间:2024-10-17 09:45:50
是否可以从节点绘制箭头到空?(Is it possible to draw arrow from node to nothing?)

我试图在DiagrammeR::mermaid中绘制一个简单的图表,看起来像:

mermaid(" graph LR A(Sample Text) -->A A-->B B-->A B--> ")

显然(或不) -->A和B-->代码不起作用。 不可能有箭头去或来自哪里。

有一个简单的解决方法(空白节点?/不可见节点?)

I'm trying to draw a simple Diagram in DiagrammeR::mermaid that should looks like:

mermaid(" graph LR A(Sample Text) -->A A-->B B-->A B--> ")

Obviously (or not) -->A and B--> code doesn't work. It's not possible to have an arrow going or coming from nowhere.

Is there a simple work around (blank node ? / invisible node ?)

最满意答案

这个怎么样?

library(DiagrammeR)

mermaid("
     graph LR
        START[.]-->A[Sample Text]
        A-->B
        B-->A 
        B-->STOP[.]

        style START fill:#FFFFFF, stroke:#FFFFFF;
        style STOP  fill:#FFFFFF, stroke:#FFFFFF;
        ")
 

输出图是:

在此处输入图像描述

How about this?

library(DiagrammeR)

mermaid("
     graph LR
        START[ ]-->A[Sample Text]
        A-->B
        B-->A 
        B-->STOP[ ]

        style START fill:#FFFFFF, stroke:#FFFFFF;
        style STOP  fill:#FFFFFF, stroke:#FFFFFF;
        ")
 

Output diagram is:

enter image description here

更多推荐

本文发布于:2023-08-07 13:02:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1464500.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:箭头   节点   draw   arrow   node

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!