@@ -7,6 +7,8 @@ keywords: "浏览器插件、Chrome插件、SEO浏览器插件"
77description : " 本文分享我常用的绘图工具,包括白板绘图、文本绘图、代码绘图与专业绘图等工具。"
88isCJKLanguage : true
99og_image : " https://img.bmpi.dev/4928b4de-db94-968e-115b-767d2e2f007a.png"
10+ isMarkupEnabled : true
11+ isMermaidEnabled : true
1012---
1113
1214由于在写作中经常需要配图,本文分享下我常用的绘图工具以及如何存储并展示配图。
@@ -75,12 +77,106 @@ skinparam monochrome true
7577
7678可以使用在线编辑器 [ PlantUML Editor] ( http://www.plantuml.com/plantuml/uml/ ) 在线编辑预览。
7779
80+ <u title =" 2022/02/18日更新 " >除了PlantUML外还可以用 [ Markmap] ( https://github.com/gera2ld/markmap ) </u >,相比PlantUML的好处在于它基于Web,不需要通过渲染生成图片的方式就可以从文本生成可交互的思维导图。比如下面的通过Markdown生成思维导图的例子:
81+
82+ ``` text
83+ # markmap
84+
85+ ## Links
86+
87+ - <https://markmap.js.org/>
88+ - [GitHub](https://github.com/gera2ld/markmap)
89+
90+ ## Related
91+
92+ - [coc-markmap](https://github.com/gera2ld/coc-markmap)
93+ - [gatsby-remark-markmap](https://github.com/gera2ld/gatsby-remark-markmap)
94+
95+ ## Features
96+
97+ - links
98+ - **inline** ~~text~~ *styles*
99+ - multiline
100+ text
101+ - `inline code`
102+ -
103+ ```js
104+ console.log('code block');
105+ ```
106+ - Katex - $x = {-b \pm \sqrt{b^2-4ac} \over 2a}$
107+
108+ ## 当然也支持中文啦
109+ ```
110+
111+ 通过此库最终生成的效果:
112+
113+ ``` markmap
114+ # markmap
115+
116+ ## Links
117+
118+ - <https://markmap.js.org/>
119+ - [GitHub](https://github.com/gera2ld/markmap)
120+
121+ ## Related
122+
123+ - [coc-markmap](https://github.com/gera2ld/coc-markmap)
124+ - [gatsby-remark-markmap](https://github.com/gera2ld/gatsby-remark-markmap)
125+
126+ ## Features
127+
128+ - links
129+ - **inline** ~~text~~ *styles*
130+ - multiline
131+ text
132+ - `inline code`
133+ -
134+ ```js
135+ console.log('code block');
136+ ```
137+ - Katex - $x = {-b \pm \sqrt{b^2-4ac} \over 2a}$
138+
139+ ## 当然也支持中文啦
140+ ```
141+
78142### 架构图
79143
80144![ ] ( https://img.bmpi.dev/48504c01-c2d0-e05a-1eda-d82b88f6496d.png )
81145
82146源文本见 [ arch_aws.plantuml] ( https://raw.githubusercontent.com/bmpi-dev/bmpi.dev/master/content/dev/guide-to-serverless/arch_aws.plantuml ) 。
83147
148+ <u title =" 2022/02/18日更新 " >除了PlantUML外还可以用 [ Mermaid] ( https://github.com/mermaid-js/mermaid ) </u >来通过文本生成各种UML图。比如下面通过文本生成时序图的例子:
149+
150+ ``` text
151+ sequenceDiagram
152+ autonumber
153+ 张三->>李四: Hello John, how are you?
154+ loop Healthcheck
155+ 李四->>李四: Fight against hypochondria
156+ end
157+ Note right of 李四: Rational thoughts!
158+ 李四-->>张三: Great!
159+ 李四->>王五: How about you?
160+ 王五-->>李四: Jolly good!
161+ ```
162+
163+ 生成的效果图如下:
164+
165+ ``` mermaid
166+ sequenceDiagram
167+ autonumber
168+ 张三->>李四: Hello John, how are you?
169+ loop Healthcheck
170+ 李四->>李四: Fight against hypochondria
171+ end
172+ Note right of 李四: Rational thoughts!
173+ 李四-->>张三: Great!
174+ 李四->>王五: How about you?
175+ 王五-->>李四: Jolly good!
176+ ```
177+
178+ GitHub的Markdown已经支持Mermaid了,相比PlantUML的优势在于其原生支持Web,无需通过生成图片即可集成到网站页面中。
179+
84180关于文本绘图的进一步思考,推荐看 [ C4 Model] ( https://c4model.com/ ) 的作者这篇 [ Software architecture diagrams as text] ( https://dev.to/simonbrown/visio-draw-io-lucidchart-gliffy-etc-not-recommended-for-software-architecture-diagrams-4bmm ) 。
85181
86182## 专业绘图
@@ -123,5 +219,3 @@ skinparam monochrome true
123219## 关于绘图工具的思考
124220
125221没有一种工具是万能的,万能如 Excalidraw 也无法替代 Lucidchart/Draw.io/Google Drawings/Visio 这些复杂的工具(他们更适合复杂的对精确性有高度要求的图)。更没有一种软件工具能替代纸和笔。工具更重要的是背后使用它的人,能用图片讲好一个故事才是我们需要不断提升的能力,一个工具能做到不限制你的发挥就算适合的好的工具。
126-
127- *** 文章更新时间:2021年2月28日***
0 commit comments