Question

Ḧ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

Was it helpful?

Solution

Try twopi as the layouter and select radial layout.

OTHER TIPS

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:

image description

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top