¿Cómo definir una forma de nodo en graphviz?

I want to draw circle as the node in dot. I am using the following simple code which should draw circle. But it draws draws eclipse instead. This is my code :

digraph G {
node [ shape=circle, width=0.5, height = 0.5, fixedsize=true]
Node1  -> Node1 ;
Node1 -> Node2;
Node2 -> Node1;
Node2 -> Node2;
};

Esto es lo que obtengo:

enter image description here

How do I draw circle?

preguntado el 02 de julio de 12 a las 18:07

3 Respuestas

All is absolutely correct in your file. There must be circles.

imagen

Respondido 02 Jul 12, 18:07

Usar shape="circle" should work, for example:

digraph G {
0 [color="aqua", label="A", shape="circle", style="filled"];
1 [color="bisque", label="B", shape="circle", style="filled"];
2 [color="blue", label="C", shape="circle", style="filled"];
3 [color="blueviolet", label="E", shape="circle", style="filled"];
4 [color="brown", label="D", shape="circle", style="filled"];
5 [color="burlywood", label="F", shape="circle", style="filled"];
6 [color="cadetblue", label="G", shape="circle", style="filled"];
0->0 ;
0->1;
1->4;
2->2;
2->3;
3->4;
4->4;
4->5;
4->6;
5->0;
6->2;
}

enter image description here

Respondido 02 Jul 12, 18:07

digraph G {
node [ shape="circle", width=1, height = 1, fixedsize=true];
s0 -> s0 [label="a -> x = x.a\ny = y.a"];
s0 -> s1 [label="a -> x = x.a\ny = y.a"];
s1 -> s0 [label="a -> x = x.a\ny = y.a"];
s1 -> s1 [label="a -> x = x.a\ny = y.a"];
};

La salida es:

enter image description here

Any better way of rendering it?

Respondido 02 Jul 12, 18:07

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.