Suggestion #1 - PlantUML
PlantUML uses Graphviz, so one option is to simply use PlantUML. For example, in PlantUML this...
@startuml
Bob -> Alice : hello
@enduml
...is rendered as this...

The above diagram was rendered at http://plantuml.com/plantuml/..., and you can read up on PlantUML sequence diagrams in the documentation. Also, PlantUML can also be used from the command line, and PlantUML plugins are available for many popular IDEs.
Suggestion #2 - NEATO
You can also use Graphviz & NEATO (PDF). For example, this directed graph...
digraph sequenceDiagramExample {
bobHead [ label="Bob" pos="0,1.5!" shape="record" ];
bobPoint0 [ pos="0,0.75!" shape="point" width="0" ]
bobFoot [ label="Bob" pos="0,0!" shape="record" ];
aliceHead [ label="Alice" pos="1,1.5!" shape="record" ];
alicePoint0 [ pos="1,0.75!" shape="point" width="0" ]
aliceFoot [ label="Alice" pos="1,0!" shape="record" ];
bobHead -> bobPoint0 -> bobFoot [ dir="none" style="dashed" ]
aliceHead -> alicePoint0 -> aliceFoot [ dir="none" style="dashed" ]
bobPoint0 -> alicePoint0 [ label="hello" labelloc="c" style="solid" ]
}
And rendering it via NEATO (which is installed with Graphviz) from the command line...
...is rendered as this...

To use NEATO to render the above image, do you the following:
- Install NEATO, which comes with Graphviz (at least it does on a Mac when using
$ brew install graphviz # requires Homebrew
)
- Place the
digraph sequenceDiagramExample {...}
code from above in a text file called sequenceDiagramExample.dot
- From the command line, run
$ neato -Tpng sequenceDiagramExample.dot -o sequenceDiagramExample.png
, which will generate a PNG file called sequenceDiagramExample.png
- View the PNG :)
Pro-tip - Don't confuse the neato
with dot
executables
neato
is probably what you want to use when you want granular control over how elements are positioned (alternate viewpoints in comments welcome!)
- Don't confuse rendering with
neato
vs. rendering with dot
(which is also included with Graphviz)
- For example, rendering the directed graph from Suggestion #2 using
dot
(e.g. $ dot -Tpng sequenceDiagramExample.dot -o sequenceDiagramExample.png
) will produce this...
