Reputation: 12341
Ḧi,
I'd like to draw a graph using the dot language that looks like a star ( a central node, wih all the other nodes with one link to this other node).
I've been googling around without finding much. Do you have a basic example ?
thanks
Upvotes: 3
Views: 2390
Reputation: 218
use this example
graph g {
node1 [label="1"]
node2 [label="2"]
node3 [label="3"]
node4 [label="4"]
node5 [label="5"]
node6 [label="6"]
node7 [label="7"]
node4 -- node3
node4 -- node2
node4 -- node1
node4 -- node5
node4 -- node7
node4 -- node6
}
Then invoke this commmand: neato -T svg -o direct.svg direct.dot
output as shown:
Upvotes: 1