-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug with colon in name of PORT #54
Comments
Thanks, loosely related to #53 (special status of colon in the DOT language). From the language specification, I think that you would need to quote a port name that should contain a literal In [1]: import graphviz
...:
...: s = graphviz.Source('''
...: digraph structs {
...: node [shape=plaintext]
...: struct1 [label=<
...: <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0" CELLPADDING="4">
...: <TR>
...: <TD PORT="1" ROWSPAN="2">1</TD>
...: <TD PORT=""1:2"" ROWSPAN="1">1:2</TD>
...: </TR>
...: <TR>
...: <TD PORT="1:3" ROWSPAN="1">1:3</TD>
...: </TR>
...: </TABLE>>]
...: struct2 [label=<
...: <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0" CELLPADDING="4">
...: <TR>
...: <TD PORT="2" ROWSPAN="2">2</TD>
...: <TD PORT=""2:2"" ROWSPAN="1">2:2</TD>
...: </TR>
...: <TR>
...: <TD PORT="2:3" ROWSPAN="1">2:3</TD>
...: </TR>
...: </TABLE>>]
...: struct1:"1:2" -> struct2:"2:2"
...: }''') Do you know a working DOT source works for this (literal colon in port)? Might be an upstream issue. I guess one can currently work around by avoiding |
Looks like Graphviz (the upstream package) does not support colons in port names properly. I could not find a working DOT source for using a port name with a colon. E.g. the following does not work as intended: import graphviz
graphviz.Source(r'''
digraph g {
spam[label="left|middle|<f2:1> right", shape=record]
spam:"f2:1" -> "eggs:eggs":s
}''')
Warning: node spam, port f2 unrecognized
Out[1]: Also does not start the edge from the For issues with colons in edge statements specific to this package see #53. |
Example
Result
dot.source
Image
Info
graphviz: 0.8.3
python: 3.6
The text was updated successfully, but these errors were encountered: