You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When working with long node names (~ >130 characters), create_dot mangles the name by adding line breaks. This makes it hard to round-trip pydot.Graph objects through the dot command and read them back in again (which is what nx.nx_pydot.pydot_layout does).
(Continuing the discussion from #420)
(BTW, that PR doesn't fix the issue)
It's Graphviz (dot) itself that performs the name splitting, not pydot.
I couldn't find any documentation mentioning this. If this is an old, deeply ingrained thing, then they'll never change it. I understand it's probably for visual clarity, but still... 😞
I'm wondering what's the expected behavior of pydot in this situation.
I don't think we should:
Remove the split when reading an already split graph (because someone might be doing it intentionally)
Do that split anywhere in the internal representation (because it's undocumented, weird, and unexpected)
The least invasive way to fix the problem might be to extend get_node so that it also checks the "unsplit" names of existing nodes.
Uh oh!
There was an error while loading. Please reload this page.
Originally reported by @dougthor42 in networkx/networkx#7648.
When working with long node names (~ >130 characters),
create_dot
mangles the name by adding line breaks. This makes it hard to round-trippydot.Graph
objects through the dot command and read them back in again (which is whatnx.nx_pydot.pydot_layout
does).A minimum reproduction is
The two names aren't equal, and it would be nice if they were.
The text was updated successfully, but these errors were encountered: