center.dot 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /* use of the center keyword */
  2. digraph G {
  3. graph [center=1 rankdir=LR bgcolor="#808080"]
  4. edge [dir=none]
  5. node [width=0.3 height=0.3 label=""]
  6. { node [shape=circle style=invis]
  7. 1 2 3 4 5 6 7 8 10 20 30 40 50 60 70 80
  8. }
  9. { node [shape=circle]
  10. a b c d e f g h i j k l m n o p q r s t u v w x
  11. }
  12. { node [shape=diamond]
  13. A B C D E F G H I J K L M N O P Q R S T U V W X
  14. }
  15. 1 -> a -> {A B} [color="#0000ff"]
  16. 2 -> b -> {B A} [color="#ff0000"]
  17. 3 -> c -> {C D} [color="#ffff00"]
  18. 4 -> d -> {D C} [color="#00ff00"]
  19. 5 -> e -> {E F} [color="#000000"]
  20. 6 -> f -> {F E} [color="#00ffff"]
  21. 7 -> g -> {G H} [color="#ffffff"]
  22. 8 -> h -> {H G} [color="#ff00ff"]
  23. { edge [color="#ff0000:#0000ff"]
  24. A -> i -> {I K}
  25. B -> j -> {J L}
  26. }
  27. { edge [color="#00ff00:#ffff00"]
  28. C -> k -> {K I}
  29. D -> l -> {L J}
  30. }
  31. { edge [color="#00ffff:#000000"]
  32. E -> m -> {M O}
  33. F -> n -> {N P}
  34. }
  35. { edge [color="#ff00ff:#ffffff"]
  36. G -> o -> {O M}
  37. H -> p -> {P N}
  38. }
  39. { edge [color="#00ff00:#ffff00:#ff0000:#0000ff"]
  40. I -> q -> {Q U}
  41. J -> r -> {R V}
  42. K -> s -> {S W}
  43. L -> t -> {T X}
  44. }
  45. { edge [color="#ff00ff:#ffffff:#00ffff:#000000"]
  46. M -> u -> {U Q}
  47. N -> v -> {V R}
  48. O -> w -> {W S}
  49. P -> x -> {X T}
  50. }
  51. { edge [color="#ff00ff:#ffffff:#00ffff:#000000:#00ff00:#ffff00:#ff0000:#0000ff"]
  52. Q -> 10
  53. R -> 20
  54. S -> 30
  55. T -> 40
  56. U -> 50
  57. V -> 60
  58. W -> 70
  59. X -> 80
  60. }
  61. }