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

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.dtcms.com/a/172050.html

相关文章:

  • Debezium TableSchemaBuilder详解
  • 从Excel到高级工具:数据分析进阶指南
  • Android Compose 中 CompositionLocal 的全面解析与最佳实践
  • 把Android设备变成“国标摄像头”:GB28181移动终端实战接入指南
  • Gradio全解20——Streaming:流式传输的多媒体应用(5)——基于WebRTC的摄像头实时目标检测
  • jwt身份验证和基本的利用方式
  • Air8101开发板实战指南:快速上手MP4视频录制与SD卡存储系统!
  • 华为昇腾CANN架构
  • MySQL——数据库基础操作
  • 使用 Microsoft 365 Copilot 上传手机图片,实现更高效的信息提取
  • Qwen3 性价比新王 Qwen3-30B-A3B 本地私有化部署,可灵活切换思考模式
  • 手机SIM卡打电话时识别对方按下的DTMF按键(二)
  • conda配置好的pytorch在jupyter中如何配置
  • 代码异味(Code Smell)识别与重构指南
  • ARM子程序和栈
  • 互联网大厂Java求职面试:AI大模型与云原生架构设计深度解析
  • 项目实战-基于信号处理与SVM机器学习的声音情感识别系统
  • 基于Boost库、Jsoncpp、cppjieba、cpp-httplib等构建Boost搜索引擎
  • Python生活手册-正则表达式:从快递单到咖啡订单的文本魔法
  • 25:三大分类器原理
  • 004-nlohmann/json 快速认识-C++开源库108杰
  • 期末项目Python
  • [特殊字符]Git 操作实战:如何将本地项目提交到远程 Gitee 仓库
  • Windows11 VS code 安装 Cline 调用 Github MCP 配置过程坑点汇总
  • 【platform push 提示 Invalid source ref: HEAD】
  • 青听音乐 1.0.6| 全网音乐免费听,无损下载,4条音源,界面简洁无广告
  • flink监控指标
  • LintCode第766题,LintCode第1141题,LintCode第478题
  • 《OmniMeetProTrack 全维会议链智能追录系统 软件设计文档》
  • Oracle OCP认证考试考点详解083系列09