Does anyone know how to put newline in the label of the node? \\n is not working - instead some new nodes appear.
You can use \n character
\n
With graphviz package, this would give
from graphviz import Digraph d=Digraph() d.node('test',label='line 1\\nline 2') print(d.source)
This would give
digraph { test [label="line 1\nline 2"] }