Created
July 4, 2021 08:35
-
-
Save bobbicodes/0600546949f3d2fcaa3f4b84ff2c7bae to your computer and use it in GitHub Desktop.
Graphviz reconstructed SVG in Hiccup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn svg-node [label x y] | |
[:g [:ellipse {:fill "none" :stroke "black" :cx x :cy y :rx 27 :ry 18}] | |
[:text {:text-anchor "middle" :x x :y (+ 4 y) :font-family "Monospace" | |
:font-size 14} label]]) | |
(defn svg-edge [label x y path points] | |
[:g | |
[:path {:fill "none" :stroke "black" :d path}] | |
[:polygon {:fill "black" :stroke "black" :points points}] | |
[:text {:text-anchor "middle" :x x :y y :font-family "Monospace" :font-size 14.00} label]]) | |
(defn dag3 [] | |
[:svg {:width "100%" :viewBox "0 0 566 305"} | |
[:g {:transform "scale(1,1), rotate(0), translate(4,301)"} | |
[:polygon {:fill "white" :stroke "none" :points "-4,4 -4,-301 562,-301 562,4 -4,4"}] | |
[svg-node "14" 315 -18] | |
[svg-node "12" 459 -18] | |
[svg-node "11" 171 -18] | |
[svg-node "10" 243 -18] | |
[svg-node "13" 531 -18] | |
[svg-node "4" 99 -105] | |
[svg-node "8" 27 -18] | |
[svg-edge "1" 72.5 -57.8 "M86.1278,-88.8037C75.0702,-75.7495 58.9641,-56.7354 46.353,-41.8473" "48.8949,-39.433 39.7607,-34.0647 43.5535,-43.9574 48.8949,-39.433"] | |
[svg-node "9" 99 -18] | |
[svg-edge "1" 103.5 -57.8 "M99,-86.799C99,-75.1626 99,-59.5479 99,-46.2368" "102.5,-46.1754 99,-36.1754 95.5001,-46.1755 102.5,-46.1754"] | |
[svg-node "7" 315 -105] | |
[svg-edge "1" 319.5 -57.8 "M315,-86.799C315,-75.1626 315,-59.5479 315,-46.2368" "318.5,-46.1754 315,-36.1754 311.5,-46.1755 318.5,-46.1754"] | |
[svg-node "15" 387 -18] | |
[svg-edge "1" 359.5 -57.8 "M327.872,-88.8037C338.93,-75.7495 355.036,-56.7354 367.647,-41.8473" "370.446,-43.9574 374.239,-34.0647 365.105,-39.433 370.446,-43.9574"] | |
[svg-node "1" 273 -279] | |
[svg-node "2" 215 -192] | |
[svg-edge "1" 199.5 -57.8 "M206.516,-87.6111C200.186,-75.3817 191.418,-58.4429 184.177,-44.456" "187.163,-42.6103 179.458,-35.3385 180.946,-45.8283 187.163,-42.6103"] | |
[svg-node "3" 315 -192] | |
[svg-edge "2" 300.5 -231.8 "M281.098,-261.611C287.141,-249.382 295.511,-232.443 302.422,-218.456" "305.635,-219.854 306.927,-209.339 299.359,-216.753 305.635,-219.854"] | |
[svg-edge "3" 167.5 -144.8 "M197.382,-178.09C178.134,-163.986 147.108,-141.251 125.047,-125.086" "126.919,-122.119 116.784,-119.031 122.781,-127.765 126.919,-122.119"] | |
[svg-node "5" 215 -105] | |
[svg-edge "4" 219.5 -144.8 "M215,-173.799C215,-162.163 215,-146.548 215,-133.237" "218.5,-133.175 215,-123.175 211.5,-133.175 218.5,-133.175"] | |
[svg-edge "1" 234.5 -57.8 "M220.532,-87.2067C224.444,-75.332 229.768,-59.1684 234.252,-45.5567" "237.675,-46.3514 237.48,-35.7584 231.027,-44.1613 237.675,-46.3514"] | |
[svg-edge "1" 251.5 -231.8 "M262.362,-262.41C253.75,-249.788 241.467,-231.788 231.568,-217.281" "234.295,-215.067 225.767,-208.779 228.512,-219.012 234.295,-215.067"] | |
[svg-edge "6" 319.5 -144.8 "M315,-173.799C315,-162.163 315,-146.548 315,-133.237" "318.5,-133.175 315,-123.175 311.5,-133.175 318.5,-133.175"] | |
[svg-node "6" 459 -105] | |
[svg-edge "5" 399.5 -144.8 "M334.721,-179.359C359.603,-164.672 402.56,-139.315 430.879,-122.599" "432.685,-125.597 439.518,-117.5 429.127,-119.569 432.685,-125.597"] | |
[svg-edge "1" 463.5 -57.8 "M459,-86.799C459,-75.1626 459,-59.5479 459,-46.2368" "462.5,-46.1754 459,-36.1754 455.5,-46.1755 462.5,-46.1754"] | |
[svg-edge "1" 503.5 -57.8 "M471.872,-88.8037C482.93,-75.7495 499.036,-56.7354 511.647,-41.8473" "514.446,-43.9574 518.239,-34.0647 509.105,-39.433 514.446,-43.9574"]]]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment