Created
June 5, 2014 13:33
-
-
Save MHenderson/ca7c19758d4427f2bb12 to your computer and use it in GitHub Desktop.
Colouring the Frucht graph with gvpr.
This file contains 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
graph { | |
graph [name="Frucht Graph"]; | |
0 -- 1; | |
0 -- 6; | |
0 -- 7; | |
1 -- 2; | |
1 -- 7; | |
2 -- 3; | |
2 -- 8; | |
3 -- 4; | |
3 -- 9; | |
4 -- 5; | |
4 -- 9; | |
5 -- 6; | |
5 -- 10; | |
6 -- 10; | |
7 -- 11; | |
8 -- 9; | |
8 -- 11; | |
10 -- 11; | |
} |
This file contains 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
output_dir:=./output | |
src_dir=. | |
svg_options:=-s\ | |
-Tsvg\ | |
-Gsize=4,4\!\ | |
-Groot=3\ | |
-Nwidth=0.3\ | |
-Nfixedsize=true\ | |
-Nlabel=\ | |
-Nshape=circle\ | |
-Ecolor=black | |
svgs:=$(output_dir)/frucht.svg\ | |
.PHONY: all clean | |
all: svg | |
svg: $(svgs) | |
$(svgs): $(output_dir)/%.svg: $(src_dir)/%.gv | $(output_dir) | |
gvpr -c -f colour -a '1 2 3 1 2 3 2 3 1 3 1 2' $< | twopi $(svg_options) -o $@ | |
$(output_dir)/: | |
mkdir -p $@ | |
clean: | |
rm -rf $(output_dir) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment