Matina G
Matina G

Reputation: 1582

Embed LaTeX in Graphviz

I am creating a graph using python and graphviz. So my script goes like :

from graphviz import Digraph
dot = Digraph()
dot.node('Start')
dot.node('Calculate A')
dot.edge('Start', 'Calculate A')

and so on. I need to write math text in some nodes, let's say, replace 'A' by an integral. How can that be done? Thanks in advance, M

Upvotes: 3

Views: 1733

Answers (1)

sroush
sroush

Reputation: 6783

Sorry, Graphviz does not support LaTeX.
In theory, you could use Unicode & Graphviz (pseudo) HTML to create what you want, but it would probably be quite challenging.
A (pretty) easy way to combine LaTex and Graphviz would be to create separate image files (svg, png, jpeg, ...) - one per node using your "usual" LaTeX processes and then "including" these files in your Graphviz program using the image attribute.

Upvotes: 2

Related Questions