Skip to content

Commit

Permalink
Merge pull request #48 from zmaril/master
Browse files Browse the repository at this point in the history
Allow for more global attributes in graphviz
  • Loading branch information
Aysylu Greenberg committed Jan 10, 2015
2 parents 68e89cb + 3145874 commit fc3be84
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/loom/io.clj
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,11 @@
(if d? "digraph \"" "graph \""))
(.append (dot-esc graph-name))
(.append "\" {\n"))]
(when (:graph opts)
(doto sb
(.append " graph ")
(.append (dot-attrs (:graph opts)))))
(doseq [k [:graph :node :edge]]
(when (k opts)
(doto sb
(.append (str " " (name k) " "))
(.append (dot-attrs (k opts))))))
(doseq [[n1 n2] (distinct-edges g)]
(let [n1l (str (or (node-label n1) n1))
n2l (str (or (node-label n2) n2))
Expand Down

0 comments on commit fc3be84

Please sign in to comment.