当前位置: 首页 > ai >正文

graphviz和dot绘制流程图

graphviz和dot绘制流程图

step1:下载graphviz,https://graphviz.org/download/
step2:安装,记得添加环境变量
step3:验证是否安装成功 dot --version

C:\Users\wangrusheng>dot --version
dot - graphviz version 12.2.1 (20241206.2353)

step4:开始写流程图代码,保存在本地
C:\Users\wangrusheng\Downloads\flow.dot

digraph {rankdir="LR";graph [fontname="helvetica", fontsize=12];node [fontname="helvetica", fontsize=10];edge [fontname="helvetica", fontsize=10];start [shape="plaintext", style="rounded", label="I want to extract\nmembers from a zip file."];fewlarge [shape="box", label="Do you have a few\nlarge files zip files\nwith tens\nof thousands\nof members?"];manysmall [shape="box", label="Do you have\nmany small files\nwith a few\ndozen members?"];extractsome [shape="box", label="Do you need\nto extract many\nmembers but\nnot all?"];end [shape="plaintext", style="rounded", label="Use vanilla unzip."];unzippa [shape="plaintext", style="rounded", label="Maybe unzippa is faster."];{rank=same; start; fewlarge; manysmall; end;}{rank=same; extractsome; unzippa;}start -> fewlarge;fewlarge -> manysmall[label="No"];fewlarge -> extractsome[label="Yes"];manysmall -> end[label="No"];manysmall -> extractsome[label="Yes"];extractsome -> end[label="No"];extractsome -> unzippa[label="Yes"];
}

step5:用命令行,生成图片

Microsoft Windows [版本 10.0.26100.3915]
(c) Microsoft Corporation。保留所有权利。C:\Users\wangrusheng>dot --version
dot - graphviz version 12.2.1 (20241206.2353)C:\Users\wangrusheng>dot -Tpng "C:\Users\wangrusheng\Downloads\flow.dot" -o "C:\Users\wangrusheng\Downloads\flow.png"C:\Users\wangrusheng>

step6:去对应目录打开图片,就能看到效果
end

http://www.xdnf.cn/news/3856.html

相关文章:

  • 金仓数据库 KingbaseES 在电商平台数据库迁移与运维中深入复现剖析
  • MongoDB 整合SpringBoot
  • Webug4.0靶场通关笔记12- 第17关 文件上传之前端拦截(3种方法)
  • Google Agent space时代,浅谈Agent2Agent (A2A) 协议和挑战!
  • 什么是右值引用和移动语义?大白话解释
  • 5个重要的财务指标讲解
  • Javase 基础加强 —— 02 泛型
  • SpringBoot中接口签名防止接口重放
  • Debezium Binlog解析与事件转换流程详解
  • Linux 入门:操作系统进程详解(上)
  • P3469 [POI 2008] BLO-Blockade
  • 字符串问题c++
  • python:如何计算皮尔森相关系数
  • LynxHub开源程序是您的一体化 AI 平台
  • **Java面试:技术大比拼**
  • 初试C++报错并解决记录
  • 【win11 】win11 键盘测试
  • K230的摄像头使用通道
  • SAM2-Unet
  • 【Java学习笔记】构造器
  • IPv6地址分类
  • uniswap v4 hooks标志位
  • 重排和重绘
  • 广东省考备考(第一天5.4)—判断(对称)
  • 组合模式深度解析:构建灵活树形结构的终极指南
  • Spring AI 实战:第四章、Spring AI多模态之看图说话
  • 四、shell脚本--流程控制语句:指挥脚本“走哪条路”
  • C++ 建造者模式详解
  • 第13章:陈默再访海奥华
  • QT下根据深度信息计算物体尺寸并UI显示的简单方案