0

How to use Graphviz to align nodes circular in clusters with additional text? Optionally with identical node positions (always 8 nodes per cluster)? Intended Alignment

I tried circo, however, faced some shortcomings:

  • No clustering
  • No comments
  • Problems with margins for larger labels (10+ char)
  • Alignment varies with label size

This (Graphviz Online), nothing spectacular, was the closest I could get. Any hints to other layouts (or even tools) appreciated.

graph {

layout = circo;

node [shape = circle,
      fontname = Helvetica,
      margin = 0]

edge [style=invis]

subgraph 1 {
a1 -- b1 -- c1 -- d1 -- e1 -- f1 -- g1 -- h1 -- a1
}

subgraph 2 {
a -- b -- c -- d -- e -- f -- g -- h -- a
}
}
braggPeaks
  • 1,158
  • 10
  • 23
  • Please show what you got so far as starting point for others to correct / complete. – albert Dec 28 '18 at 09:58
  • Hi @albert. Did you check the link below "This (Graphviz Online)" - I tried a lot, but although this snippet is quite simple, it was the closest I could achieve. I am about to write an alternative answer right now. – braggPeaks Dec 28 '18 at 10:28
  • No I didn't (to my shame) but I think it i nearly always better to include the (short) source code as links might not be not persistent (in the future) and also giving a better reading as one directly can see the code and doen't have to click to another site. – albert Dec 28 '18 at 10:36
  • Okay, got it, sorry for that. I thought it is convenient to directly jump into, but you are right, a broken link in the future is highly likely. Will edit my Q. – braggPeaks Dec 28 '18 at 10:41

1 Answers1

0

Not exactly the answer as I was asking for (Graphviz), but I found a much nicer solution with MATLAB. It was about plotting a seating plan for an event.

Seating Plan Plot

What I did broken down:

  • imread() image of the floor plan
  • Roughly determined pixel spacing, used as x & y vector for image() so that tables are in scale with the room.
  • Manually defined centers for the clusters (here tables) with the help of ginput() (or imellipse())
  • Plotted circles with plot() and added text with text()
braggPeaks
  • 1,158
  • 10
  • 23