Skip to content

Latest commit

 

History

History
124 lines (113 loc) · 2.37 KB

File metadata and controls

124 lines (113 loc) · 2.37 KB

Github的Markdown文档可通过g.gravizo.com来绘制DOT和PlantUML等格式的图形。相关示例如下:

![Alt text](http://g.gravizo.com/g? digraph G { aize ="4,4"; main [shape=box]; main -> parse [weight=8]; parse -> execute; main -> init [style=dotted]; main -> cleanup; execute -> { make_string; printf} init -> make_string; edge [color=red]; main -> printf [style=bold,label="100 times"]; make_string [label="make a string"]; node [shape=box,style=filled,color=".7 .3 1.0"]; execute -> compare; } )

![Alt text](http://g.gravizo.com/g? MCFB -> MCK: send command; MCK -> MCFB: ack; MCK -> AXIS: setpoint; MCK -> MCFB: signal; )

Alt text

![Alt text](http://g.gravizo.com/g? /** *Structural Things *@opt commentname *@note Notes can *be extended to span multiple lines / class Structural{} / *@opt all @note Class / class Counter extends Structural { static public int counter; public int getCounter%28%29; } / *@opt shape activeclass *@opt all *@note Active Class */ class RunningCounter extends Counter{} )

![Alt text](http://g.gravizo.com/g? @startuml; actor User; participant "First Class" as A; participant "Second Class" as B; participant "Last Class" as C; User -> A: DoWork; activate A; A -> B: Create Request; activate B; B -> C: DoWork; activate C; C --> B: WorkDone; destroy C; B --> A: Request Created; deactivate B; A --> User: Done; deactivate A; @enduml )

![Alt text](http://g.gravizo.com/g? @startuml; %28*%29 --> if "Some Test" then; -->[true] "activity 1"; if "" then; -> "activity 3" as a3; else; if "Other test" then; -left-> "activity 5"; else; --> "activity 6"; endif; endif; else; ->[false] "activity 2"; endif; a3 --> if "last test" then; --> "activity 7"; else; -> "activity 8"; endif; @enduml )

参考文档:

http://www.jianshu.com/p/1256e2643923

http://www.ibm.com/developerworks/cn/opensource/os-cn-ecl-plantuml/index.html