diff --git a/src/mailhead/visualize.clj b/src/mailhead/visualize.clj index 9401297..0061bd3 100644 --- a/src/mailhead/visualize.clj +++ b/src/mailhead/visualize.clj @@ -2,18 +2,26 @@ (:use [tangle.core]) (:require [mailhead.parser :as parser])) -(defn nodes [receive-path] [:a :b :c]) +(defn nodes [receive-path] ["home" "servera" "target"]) -(defn edges [receive-path] [[:a :b {:label "200ms"}] - [:b :c {:label "50min"}]]) +(defn edges [receive-path] [["home" "servera" {:label "200ms" :fillcolor "gray" :color "gray"}] + ["servera" "target" {:label "50min" :fillcolor "gray" :color "gray"}]]) (defn draw-path [receive-path] (-> (graph->dot (nodes receive-path) (edges receive-path) - {:node {:shape :box} + {:node {:shape :box + :fontname "Arial" + :fontsize 12 + :style "filled" + :fillcolor "darkgoldenrod1" + :color "darkgoldenrod3"} + :edge {:fontname "Arial" + :fontsize 10} :directed? true - :graph {:rankdir :LR}}) + :graph {:rankdir :LR + :color "transparent"}}) (dot->image "png"))) (defn draw [filename]