状态转换图和目录结构图

$ more FileSystemState.dot
digraph FileSystemState {
    node [shape=circle,height=1.2,width=1.2,fixedsize=true]
    edge [style=solid,color=red];
    /* root should be Unmounted, but Mounted looks better. */
    "Mounted" [root=true]
    "Unmounted" -> "Mounted" [label="mount",weight=0.85]
    "Mounted" -> "Unmounted" [label="unmount"]
    "Mounted" -> "Frozen" [label="freeze"]
    "Mounted" -> "Paused" [label="pause"]
    "Mounted" -> "Mounted" [label="modifyMount"]
    "Frozen" -> "Mounted" [label="thaw"]
    "Frozen" -> "Unmounted" [label="unmount"]
    "Paused" -> "Mounted" [label="resume"]
    "Paused" -> "Unmounted" [label="unmount"]
}

state

$ more Windows.dot 
digraph Windows {
    edge [style=solid,color=red];
    "C:" -> "AUTOEXEC.BAT"
    "C:" -> "CONFIG.SYS"
    "AUTOEXEC.BAT" [shape=box,label="DOS file",color=yellow,style=filled];
    "CONFIG.SYS" [shape=box,label="DOS file",color=yellow,style=filled];
    "C:" -> "Document and Settings"
    "C:" -> "Drivers"
    "C:" -> "Program Files"
    "C:" -> "Windows"
    "Document and Settings" -> "Administrator"
    "Document and Settings" -> "All Users"
    "Document and Settings" -> "tom"
    "tom" -> "Desktop"
    "tom" -> "Favorites"
    "tom" -> "My Documents"
    "tom" -> "Start Menu"
    "Desktop" -> "My Computer"
    "Desktop" -> "My Document"
    "Desktop" -> "Recycle Bin"
    "Desktop" -> "tom.png"
    "tom.png" [shape=box,label="Thomas's photo",color=red,style=filled];
    "Desktop" -> "chess.pgn"
    "chess.pgn" [shape=box,label="Master's game",color=green,style=filled];
}

dir

$ more go.cmd
@echo off

set files=FileSystemState Windows
for %%x in (%files%) do dot -Nfontname=simsun -T png -o %%x.png %%x.dot
[ dot ]
Written on June 1, 2011