gpt4 book ai didi

graphics - 绘制序列图

转载 作者:行者123 更新时间:2023-12-02 10:04:32 26 4
gpt4 key购买 nike

我正在寻找一种简单的语言/命令行实用程序来绘制 sequencetiming图表(可能是两种不同的工具)。我已经找到Mscgen用于绘制序列图,看起来不错,但我正在研究其他可能性。

谢谢

最佳答案

PlantUMLhttp://plantuml.sourceforge.net/sequence.html

PlantUML is used to draw UML diagram, using a simple and human readable text description.

The generated images can then be used without any reference to the GPL/LGPL/ASL/EPL/MIT license. It is not even necessary to stipulate that they have been generated with PlantUML, although this will be appreciate by PlantUML team.

根据我的经验,它很容易使用,并且可以生成漂亮的图表。我强烈推荐它。

输出文件类型:

-tsvg     To generate images using SVG format
-teps To generate images using EPS format
-txmi To generate XMI file for class diagram
-thtml To generate HTML files for class diagram
-ttxt To generate images with ASCII art
-tutxt To generate images with ASCII art using Unicode characters

以下示例展示了如何创建简单的序列图。 enter image description here

@startuml
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response

Alice -> Bob: Another authentication Request
Alice <-- Bob: another authentication Response
@enduml

您还可以通过使用生命线激活和销毁来创建更详细的图表: enter image description here

@startuml
participant User

User -> A: DoWork
activate A

A -> B: << createRequest >>
activate B

B -> C: DoWork
activate C
C --> B: WorkDone
destroy C

B --> A: RequestCreated
deactivate B

A -> User: Done
deactivate A

@enduml

关于graphics - 绘制序列图,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6364672/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com