流程圖常用符號及對應的無樣式 dot 陳述句[1]
| 形狀 | 描述 | DOT |
|---|---|---|
![]() |
用來表達程序的次序,用一條線由一個符號連接去到另一個符號,如果不是標準的上至下、左至右圖就會加上箭頭 | -> |
![]() |
用來表示次要或程式的開始與完結,常以一個圓角長方形表示,通常里面會標上“開始”或“結束”或其他相關字眼,如“提交查詢”或“接受產品” | terminal [shape="plain" label=<<TABLE BORDER="1" CELLPADDING="4" STYLE="ROUNDED" CELLBORDER="0" CELLSPACING="0"><TR><TD>起止符號</TD></TR></TABLE>>]; |
![]() |
以長方形來代表一系列程式去改變數值、形式、資料的位置 | process [shape="rectangle" label="程式"]; |
![]() |
以一個菱形去顯示一個條件行程,用來按情況去決定下一步走向,通常以“是/否”或“真/假”值去決定 | decision [shape="diamond" label="決策判斷"]; |
![]() |
以平行四邊形來標示資料輸入或輸出的程序,即填入資料或顯示作業結果的步驟 | io [shape="parallelogram" label="輸入/輸出"]; |
![]() |
用來補充某步驟的額外資訊,可用一個虛線來連接一個半閉合的長方型至想注釋的符號中 | comment [shape="plain" margin=0 label=<<TABLE BORDER="1" SIDES="TBL" CELLPADDING="4" CELLBORDER="0" CELLSPACING="0"><TR><TD>注解</TD></TR></TABLE>>]; x -> comment [style="dotted" arrowhead="none"]; |
![]() |
用一個有2條左右垂直線長方型,來表示一個已在其他地方定義了的程序 | predefined [shape="plain" label=<<TABLE CELLBORDER="1" CELLPADDING="4" CELLSPACING="0" BORDER="0"><TR><TD></TD><TD>已定義流程</TD><TD></TD></TR></TABLE>>]; |
![]() |
用一個含有字母的小圓圈來連接目標流程畫于同一頁上 | onpage [shape="circle" label="同頁參考"]; |
![]() |
用一個倒畫的屋型來表示目標流程畫于另一頁上 | offpage [shape="invhouse" label="換頁參考"]; |
![]() |
用一個圓柱來表示資料庫 | db [shape="cylinder" label="資料檔或資料庫"]; |
![]() |
用一個拉長了的六角形來代表初始化或預備的程序 | init [shape="hexagon" label="初始化"]; |
如果想要支持更復雜的符號, 請參見 How can I create custom shapes?
一個簡單的流程圖樣例 (flowchart_demo.dot)[2]
digraph flowchart { // terminal [shape="plain" label=<<TABLE BORDER="1" CELLPADDING="4" STYLE="ROUNDED" CELLBORDER="0" CELLSPACING="0"><TR><TD>起止符號</TD></TR></TABLE>>];
// process [shape="rectangle" label="程式"];
// decision [shape="diamond" label="決策判斷"];
// io [shape="parallelogram" label="輸入/輸出"];
// comment [shape="plain" margin=0 label=<<TABLE BORDER="1" SIDES="TBL" CELLPADDING="4" CELLBORDER="0" CELLSPACING="0"><TR><TD>注解</TD></TR></TABLE>>];
// predefined [shape="plain" label=<<TABLE CELLBORDER="1" CELLPADDING="4" CELLSPACING="0" BORDER="0"><TR><TD></TD><TD>已定義流程</TD><TD></TD></TR></TABLE>>];
// onpage [shape="circle" label="同頁參考"];
// offpage [shape="invhouse" label="換頁參考"];
// db [shape="cylinder" label="資料檔或資料庫"];
// init [shape="hexagon" label="初始化"];
// rankdir = "LR";
start [shape="none" label=<<TABLE BORDER="1" CELLPADDING="4" STYLE="ROUNDED" CELLBORDER="0" CELLSPACING="0"><TR><TD>電燈不作業了</TD></TR></TABLE>>];
decision_1 [shape="diamond" label="電燈接好了么?"];
comment_1 [shape="none" margin=0 label=<<TABLE BORDER="1" SIDES="TBL" CELLPADDING="4" CELLBORDER="0" CELLSPACING="0"><TR><TD>some comments...</TD></TR></TABLE>>]; // 位置決定其渲染順序
end_1 [shape="none" label=<<TABLE BORDER="1" CELLPADDING="4" STYLE="ROUNDED" CELLBORDER="0" CELLSPACING="0"><TR><TD>接好電源</TD></TR></TABLE>>];
decision_2 [shape="diamond" label="燈泡啥訓了么?"];
end_2 [shape="none" label=<<TABLE BORDER="1" CELLPADDING="4" STYLE="ROUNDED" CELLBORDER="0" CELLSPACING="0"><TR><TD>更換燈泡</TD></TR></TABLE>>];
end_3 [shape="none" label=<<TABLE BORDER="1" CELLPADDING="4" STYLE="ROUNDED" CELLBORDER="0" CELLSPACING="0"><TR><TD>修理電燈</TD></TR></TABLE>>];
start -> decision_1;
decision_1 -> comment_1 [style="dashed" arrowhead="none"];
decision_1 -> end_1 [label="否"];
decision_1 -> decision_2 [label="是"];
decision_2 -> end_2 [label="否"];
decision_2 -> end_3 [label="是"];
}
dot -Kdot flowchart_demo.dot -Tpng -o flowchart-demo.png[3]

流程圖 ??
The DOT Language ??
Command-line Invocation ??
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/33826.html
標籤:其他
上一篇:電廠鍋爐防磨防爆問題分析與治理
下一篇:linux 矩陣鍵盤











