找回密码
 立即注册

微信扫码登录

[超级图表] Graphviz测试

[复制链接]
阳光肺科 发表于 2026-9-11 07:11:45 | 显示全部楼层 |阅读模式

马上注册,阅读更多内容,享用更多功能!

您需要 登录 才可以下载或查看,没有账号?立即注册

×

graph LR     subgraph subgraph1         direction TB         top1[top] --> bottom1[bottom]     end     subgraph subgraph2         direction TB         top2[top] --> bottom2[bottom]     end     %% ^ These subgraphs are identical, except for the links to them:     %% Link *to* subgraph1: subgraph1 direction is maintained     outside --> subgraph1     %% Link *within* subgraph2:     %% subgraph2 inherits the direction of the top-level graph (LR)     outside ---> top2
 楼主| 阳光肺科 发表于 2026-9-11 07:13:19 | 显示全部楼层

[plot gv]digraph AIWorkflow {
        rankdir=TB;
        bgcolor="transparent";
        node [fontname="Comic Sans MS", fontsize=12];
        edge [fontname="Comic Sans MS", fontsize=10];
      
        subgraph cluster_brain {
          style="filled,rounded,dashed";
          color="#FF6B6B";
          fillcolor="#FFE5E5";
          penwidth=3;
          node [style="filled,rounded", fillcolor="#FFB3BA", color="#FF6B6B", penwidth=2];
         
          ai_think [label="🧠 AI Thinking\nAnalyzing Request", shape=ellipse];
          ai_generate [label="⚡ Code Generation\nCreating Graphviz", shape=box];
          ai_optimize [label="🔧 Auto Optimization\nRefining Structure", shape=diamond];
         
          ai_think -> ai_generate -> ai_optimize;
          label = "🤖 AI Processing Engine";
          fontcolor="#FF6B6B";
          fontsize=14;
        }
        subgraph cluster_tools {
          style="filled,rounded";
          color="#4ECDC4";
          fillcolor="#E8F8F7";
          penwidth=3;
          node [style="filled,rounded", fillcolor="#B3E5E0", color="#4ECDC4", penwidth=2];
         
          preview [label="👁️ Live Preview\ngraphvizonline.net", shape=tab];
          png_export [label="📸 PNG Export\nHigh Quality Image", shape=folder];
          svg_export [label="🎨 SVG Export\nScalable Vector", shape=note];
          share_link [label="🔗 Share Link\nCollaboration Ready", shape=component];
         
          preview -> png_export;
          preview -> svg_export;
          preview -> share_link;
         
          label = "🌐 Online Toolkit";
          fontcolor="#4ECDC4";
          fontsize=14;
        }
      
        user_input [label="👤 User Input\n'Create a cool diagram'",
                    shape=house, style="filled,rounded",
                    fillcolor="#FFE66D", color="#FFB300", penwidth=3];
        
        final_output [label="✨ Amazing Result\nProfessional Diagram",
                      shape=star, style="filled,rounded",
                      fillcolor="#95E1D3", color="#00B894", penwidth=3];
      
        user_input -> ai_think [label="Request", color="#FF6B6B", penwidth=2];
        ai_optimize -> preview [label="Generated Code", color="#4ECDC4", penwidth=2];
        
        png_export -> final_output [label="Image Ready", color="#00B894", penwidth=2];
        svg_export -> final_output [label="Vector Ready", color="#00B894", penwidth=2];
        share_link -> final_output [label="Link Ready", color="#00B894", penwidth=2];
      
        final_output -> ai_think [label="Feedback Loop",
                                 style=dashed, color="#A0A0A0", penwidth=1];
      
        magic1 [label="✨", shape=plaintext, fontsize=20, fontcolor="#FFD93D"];
        magic2 [label="🚀", shape=plaintext, fontsize=20, fontcolor="#6BCF7F"];
        magic3 [label="💫", shape=plaintext, fontsize=20, fontcolor="#4D96FF"];
        
        {rank=same; magic1; ai_generate; magic2}
        {rank=same; magic3; preview}
        
        magic1 -> ai_generate [style=invis];
        magic2 -> ai_generate [style=invis];
        magic3 -> preview [style=invis];
      }[/plot]
 楼主| 阳光肺科 发表于 2026-9-11 07:14:19 | 显示全部楼层

[plot gv]digraph flowchart {
    rankdir=TB;
    node [shape=box, style=rounded];

    start [label="开始", shape=ellipse];
    input [label="输入数据"];
    process [label="处理数据"];
    decision [label="数据有效?", shape=diamond];
    output [label="输出结果"];
    end [label="结束", shape=ellipse];

    start -> input;
    input -> process;
    process -> decision;
    decision -> output [label="是"];
    decision -> process [label="否", tailport=w];
    output -> end;
}[/plot]
 楼主| 阳光肺科 发表于 2026-9-11 07:14:51 | 显示全部楼层

层次结构

[plot gv]digraph hierarchy {
    rankdir=TB;
    node [shape=box];

    CEO [shape=box3d];
    CTO [shape=box3d];
    CFO [shape=box3d];

    CEO -> {CTO CFO};

    CTO -> {DevManager QAManager};
    CFO -> {AccManager HRManager};

    DevManager -> {FrontendTeam BackendTeam};
    QAManager -> {AutomationTeam ManualTeam};

    FrontendTeam -> {ReactDev VueDev};
    BackendTeam -> {JavaDev PythonDev};
}[/plot]
 楼主| 阳光肺科 发表于 2026-9-11 07:18:27 | 显示全部楼层

[plot gv]digraph hierarchy {
    rankdir = TB;
    node [shape = box];
    CEO [shape = box3d];
    CTO [shape = box3d];
    CFO [shape = box3d];
    CEO -> {
    CTO CFO
};
    CTO -> {
    DevManager QAManager
};
    CFO -> {
    AccManager HRManager
};
    DevManager -> {
    FrontendTeam BackendTeam
};
    QAManager -> {
    AutomationTeam ManualTeam
};
    FrontendTeam -> {
    ReactDev VueDev
};
    BackendTeam -> {
    JavaDev PythonDev
};
    }[/plot]
 楼主| 阳光肺科 发表于 2026-9-11 07:20:02 | 显示全部楼层
[plot gv]digraph MessageArchitecture {
  messageClient
  messageQueue[shape=rarrow]
  messageBackend[shape=rectangle]
  messageDB[shape=cylinder]
  userService[shape=rectangle]
  userDB[shape=cylinder]
  pushNotifications[shape=octagon]
  messageNotifier[shape=rectangle]
  
  messageClient -> messageBackend[label=sendMessage]
  messageBackend -> userService
  userService -> userDB
  messageBackend -> messageDB
  messageDB -> messageQueue[label="change data capture"]
  messageQueue -> messageNotifier
  messageNotifier -> pushNotifications
}[/plot]

给我们建议|手机版|阳光肺科 ( 粤ICP备2020077405号-1 )

GMT+8, 2026-10-10 09:36

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表