The "dotty_color" script
The Graphviz package draws graphs: you declare nodes and edges, and program takes care of the layout generation. The dotty program enables you to draw these graphs interactively, with mouse and keyboard.
I wrote dotty_color.lefty, an extension script that adds keyboard shortcuts for color and shape management. A step-by-step install procedure is provided here below.
- download the Graphviz package and install it (let's say in folder GRAPHVIZ_PATH)
- go to folder GRAPHVIZ_PATH\lib\lefty and add here the file dotty_color.lefty.
- edit GRAPHVIZ_PATH\lib\lefty\dotty.lefty: after the last line, append the following statement:
load('dotty_color.lefty');
- start GRAPHVIZ_PATH\bin\dotty.exe; mouse commands: left button = create a node, middle button + drag = create an edge, right button = menu. Keyboard shortcuts are available:
'u' = "undo"
' ' = "do layout" (redraws graph)
'Z' = "zoom in slowly"
'z' = "zoom out slowly"
'l' = "set label"
'L' = "change label"
'r' = "color red"
'g' = "color green"
'b' = "color blue"
'k' = "color black"
'K' = "color black/grey"
'w' = "color white"
'd' = "delete"
'x' = "direct/indirect"
'a' = "add many nodes"
's' = "save graph as"
'p' = "print graph" (creates a PNG, Windows only)
The dotty window showing an example graph