Question

I am having problem with drawing in pydot.

The problem lies in defining the layout of the nodes created. Currently everything is drawn vertically and is not spread. This gives me the problem of going down to see the nodes created.

Is there any way I can define the nodes to be created horizontally whenever they are very large in number?? Also I want to display mathematical symbols in the labels. But I have not been able to find how to do that.

If anyone knows please do tell how I can write epsilon and lambda in the labels from one node to another....

Thanks a lot...

Was it helpful?

Solution

I found out that writing the string in unicode representation shows mathematical symbols as edges...

For example you can write node = pydot.Node("ε",shape = "ellipse", style="filled", fillcolor="turquoise")

Using this we get epsilon as label of the node....

Similarly we can get rest of the mathematical symbols....

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