I want to print a board for Scotland Yard, a graph-based board game with 200 nodes and many edges (each edge can be of 3 different colors). The board looks like this:

enter image description here

If I want to programmatically draw a board for this game, I'll need the following features:

  • Colors, nodes should be able to be multiple colors (e.g. orange circle inside teal rectangle)
  • Ability to make edges and nodes very bold / thick
  • Deals well with clutter (maybe I could set via a parameter how spaced-out the nodes would be in the rendering)
  • Library in one of C, C++, Python, or Java
  • Free as in beer

All signs are pointing to graphviz as the most popular such library, my questions for someone who has used graphviz are:

  1. Does graphviz support the features I want?
  2. Which programming language has the easiest graphviz libraries to use?
  3. What other graph-drawing libraries meet these requirements?
  • 1
    The one requirement that is difficult to do in graphviz is one that you don't mention - edges should follow the not necessarily straight road markings on the underlying street map image - unless you are generating that programmatically also. – Steve Barnes Jan 6 '15 at 5:54
  • 1
    Right, I'm willing to waive that requirement if I can get the other stuff working. It might actually be less visually confusing (though not as pretty) if the buses and underground don't follow the same roads the taxis take. – turbulencetoo Jan 7 '15 at 19:53
  • Did you ever find a solution? – Mawg says reinstate Monica Jul 30 '19 at 11:53
  • 1
    @mawg It turns out to be too many nodes and edges for graphviz to handle gracefully (i.e. it looks bad), but it did reveal some interesting things about which areas have more connectivity than others... – turbulencetoo Jul 30 '19 at 13:22
  • 1
    Played around with some code here: bitbucket.org/turbulencetoo/stomp-the-yard/src/master – turbulencetoo Jul 30 '19 at 13:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.