Skip to content

Instantly share code, notes, and snippets.

@jvanzyl
Created January 9, 2017 13:52
Show Gist options
  • Save jvanzyl/0cd167f3d8836ccb00c9ac6d636619b0 to your computer and use it in GitHub Desktop.
Save jvanzyl/0cd167f3d8836ccb00c9ac6d636619b0 to your computer and use it in GitHub Desktop.
  1. Install Graphviz on your machine
  2. Create a script called graph with the following contents:
#!/bin/sh

dot -T pdf | open -a /Applications/Preview.app -f

Create a simple graph using Graphviz notation and place in graph.txt:

digraph project {
  a -> b -> c
}

Generate the graph and view with the PDF Viewer:

cat graph.txt | graph

And you will see the simple graph visually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment