使用 Graphviz 绘画 UML 图# 使用 Graphviz 绘画 UML 图 Milo Yip 2019/10/28 ## 目录 1 简介 1.1 使用 Graphviz dot 2 类图 2.1 继承 2.2 关联 2.3 聚合 2.4 组成 2.5 依赖 2.6 类成员 2.7 包 2.8 排布技巧 2.9 颜色 3 状态图 4 参考 18 ## Chapter 1 去描述图(graph),然后自动排布节点和边去生成图片。它已有近 30 年历史。 UML(unified modeling language,统一建模语言)是一种常用的面向对象设计的方法。其中最常用的是类图(class diagram),用于表示类的构成以及类之间的关系。 利用 Graphviz 去生成 UML 类图有几个好处: 1. 用文本表示图,容易更新,容易做版本管理。 2. 能自动排布节点位置,在大型复杂的图特别方便。 能自动排布节点位置,在大型复杂的图特别方便。 3. 统一文档风格。 实际上,文档生成工具Doxygen也是采用Graphviz生成类图的。不过,我们在软件设计中,经常以类图表示系统中某个部分,并且按需展示某些重点,而不是简单地全部列出,所以还是需要手工去描述我们想要画什么,表示我们的软件设计。 ### 1.1 使用 Graphviz dot 首先,下载 Graphviz 安装包。macOS 用户可以0 码力 | 20 页 | 331.51 KB | 2 年前3
PlantUML 1.2019.2 Справочное руководство по языку# Построение диаграмм UML с использованием PlantUML  #### Справочное руководство по языку PlantUML (Version 1.2019.2) PlantUML объектов • Диаграмма развёртывания • Диаграмма синхронизации Также поддерживаются следующие не-UML-диаграммы: • Wireframe graphical interface • Archimate diagram • Specification and Description Language ### 6.7 Использовании нотации UML2 Команда skinparam componentStyle uml2 используется, чтобы переключиться на нотацию UML2. @startuml skinparam componentStyle uml2 interface "Data Access"0 码力 | 159 页 | 1.76 MB | 2 年前3
Drawing UML with PlantUML - PlantUML Language Reference Guide(Version 1.2019.4)# Drawing UML with PlantUML  #### PlantUML Language Reference Guide (Version 1.2019.4) PlantUML is a component that allows diagram • State diagram • Object diagram • Deployment diagram • Timing diagram The following non-UML diagrams are also supported: • Wireframe graphical interface • Archimate diagram • Specification results without tweaking. ### 6.7 Use UML2 notation The skinparam componentStyle uml2 command is used to switch to UML2 notation. @startuml skinparam componentStyle uml2 interface "Data Access"0 码力 | 167 页 | 1.83 MB | 2 年前3
PlantUML 1.2019.3 语言参考指引# 使用 PlantUML 绘制的 UML  PlantUML 语言参考指引 (Version 1.2019.3) PlantUML 是一个开源项目,支持快速绘制: · 时序图 • 用例图 · 类图 · 活动图 · 组件图 ·状态图 · 对象图 · 部署图 · 定时图 同时还支持以下非 UML 图: · 线框图形界面 · 架构图 • 规范和描述语言 (SDL) • Ditaa diagram · 甘特图 • 以 AsciiMath 或 JLaTeXMath 符号的数学公式通过简单直观的语言来定义这些示意图。 ## 1 时序图 ### 1.1 简单示例 你可以用 -> 来绘制参与者之间传递的消息,而不必显式地声明参与者。 [Image](/uploads/documents/8/6/0/8/860878bc8f88b6993946457623c43708/p13_1.jpg) ### 1.15 分隔符 你可以通过使用 == 关键词来将你的图表分割多个步骤。 @startuml == Initialization == Alice -> Bob: Authentication Request Bob -> Alice: Authentication0 码力 | 157 页 | 1.78 MB | 2 年前3
Drawing UML with PlantUML - PlantUML Language Reference Guide(Version 1.2019.9)# Drawing UML with PlantUML  #### PlantUML Language Reference Guide (Version 1.2019.9) PlantUML is a component that allows diagram • State diagram • Object diagram • Deployment diagram • Timing diagram The following non-UML diagrams are also supported: • Wireframe graphical interface • Archimate diagram • Specification results without tweaking. ### 6.7 Use UML2 notation The skinparam componentStyle uml2 command is used to switch to UML2 notation. @startuml skinparam componentStyle uml2 interface "Data Access"0 码力 | 175 页 | 1.95 MB | 2 年前3
Drawing UML with PlantUML - PlantUML Language Reference Guide(Version 1.2019.3)# Drawing UML with PlantUML  #### PlantUML Language Reference Guide (Version 1.2019.3) PlantUML is a component that allows diagram • State diagram • Object diagram • Deployment diagram • Timing diagram The following non-UML diagrams are also supported: • Wireframe graphical interface • Archimate diagram • Specification results without tweaking. ### 6.7 Use UML2 notation The skinparam componentStyle uml2 command is used to switch to UML2 notation. @startuml skinparam componentStyle uml2 interface "Data Access"0 码力 | 159 页 | 1.73 MB | 2 年前3
Drawing UML with PlantUML - PlantUML Language Reference Guide(Version 1.2023.11)# Drawing UML with PlantUML  #### PlantUML Language Reference Guide (Version 1.2023.11) PlantUML is a component that allows diagram • Component diagram • Deployment diagram • State diagram • Timing diagram The following non-UML diagrams are also supported: • JSON Data • YAML Data • Network diagram (nwd) • Wireframe graphical ef07782a743b35f/p43_3.jpg) [Ref. QA-2794] #### 1.39.3 style strictuml To be conform to strict UML (for arrow style: emits triangle rather than sharp arrowheads), you can use: • skinparam style strictuml0 码力 | 551 页 | 7.79 MB | 2 年前3
Drawing UML with PlantUML - PlantUML Language Reference Guide(Version 1.2020.23)# Drawing UML with PlantUML  #### PlantUML Language Reference Guide (Version 1.2020.23) PlantUML is a component that allows diagram • State diagram • Object diagram • Deployment diagram • Timing diagram The following non-UML diagrams are also supported: • JSON Data • Wireframe graphical interface • Archimate diagram • ee88d1220cf0b80/p36_2.jpg) [Ref. QA-2794] #### 1.36.3 style strictuml To be conform to strict UML (for arrow style: emits triangle rather than sharp arrowheads), you can use: • skinparam style strictuml0 码力 | 311 页 | 3.15 MB | 2 年前3
使用 PlantUML 绘制 UML - PlantUML 语言参考指引(Version 1.2019.4)# 使用 PlantUML 绘制的 UML  PlantUML 语言参考指引 (Version 1.2019.4) PlantUML 是一个开源项目,支持快速绘制: · 时序图 • 用例图 · 类图 · 活动图 · 组件图 · 状态图 · 对象图 · 部署图 · 定时图 同时还支持以下非 UML 图: · 线框图形界面 · 架构图 • 规范和描述语言 (SDL) • Ditaa diagram · 甘特图 • MindMap diagram • Work Breakdown Structure diagram • 以 AsciiMath 或 JLaTeX Math 符号的数学公式 通过简单直观的语言来定义这些示意图。 [Image](/uploads/documents/f/9/f/8/f9f83bd5a84d48ea327f1aeea20d8343/p13_1.jpg) ### 1.15 分隔符 你可以通过使用 == 关键词来将你的图表分割多个步骤。 @startuml == Initialization == Alice -> Bob: Authentication Request Bob -> Alice: Authentication0 码力 | 165 页 | 1.89 MB | 2 年前3
使用 PlantUML 绘制 UML - PlantUML 语言参考指引(Version 1.2021.2)# 使用 PlantUML 绘制的 UML  PlantUML 语言参考指引 (Version 1.2021.2) PlantUML 是一个开源项目,支持快速绘制: · 时序图 • 用例图 类图 • 对象图 · 活动图 · · 组件图 · 部署图 • 状态图 • 定时图 同时还支持以下非 UML 图: • JSON Data • YAML Data • Network diagram (nwd) · 线框图形界面 • 架构图 规范和描述语言 (SDL) - 规范和描述语言 (SDL) • Ditaa diagram 甘特图 • MindMap diagram • Work Breakdown [Image](/uploads/documents/9/c/0/f/9c0fcb6d35426147b6d89f594bdf68a9/p16_1.jpg) ### 1.19 分隔符 你可以通过使用 == 关键词来将你的图表分割多个步骤。 @startuml == 标本核收录入阶段 == Alice -> Bob: Authentication Request Bob --> Alice: Authentication0 码力 | 381 页 | 4.05 MB | 2 年前3
共 545 条
- 1
- 2
- 3
- 4
- 5
- 6
- 55













