digraphs - Graphviz Dot placing node inside subgraph even though it was defined elsewhere -


I am trying to create a dot script generator for the problem of homework, except that it is running well, except I have this issue where some nodes are not being defined in the subgraph, being placed in them for example, the following dot script:

  digraph DG {compound = true; Labelloc = "t"; Label = "test.cpp"; Vehicle; Make; Subgraph Clusterford {label = "Ford" Ford [Size = "None"] [style = "invis"] [label = ""]; Horse - & gt; Vehicles [label = "personal"]; Thunderbird - & gt; Vehicles [label = "personal"]; } Ford - & gt; [Label = "public"] [ltail = "clusterford"]; Subgraph Cluster Chevrolet {label = "Chevrolet" Chevrolet [Size = "None"] [style = "invis"] [label = ""]; Camaro - & gt; Vehicles [label = "personal"]; } Chevrolet - & gt; [Label = "public"] [ltail = "cluster chevrolet"]; }   

It generates: Enter image details here

"vehicle" node is considered "outside of Ford" sub-circumference

This will give you what you want:

  Dygraph DG {Complex = true; labelloc = "t"; Label = "test.cpp"; Subgraph Clusterford {label = "Ford" Ford [Size = "None"] [style = "invis"] [label = ""]; Mustang Thunderbird} SubGraph Cluster Chevrolet {label = "Chevrolet" Chevrolet [Size = "None"] [style = "invis"] [label = ""]; Camaro} Ford - & gt; [Label = "public"] [ltail = "clusterford"]; Chevrolet - & gt; [Label = "public"] [ltail = "cluster chevrolet"]; Horse - & gt; Vehicles [label = "personal"]; Thunderbird - & gt; Vehicles [label = "personal"]; Camaro - & gt; Vehicles [label = "personal"]; }    

Comments

Popular posts from this blog

c# - passing input text from view to contoller with FacebookContext using Facebook app -

ios - Does Core Data autoupdate a many to many relationship on saving -

Calling a C++ function from C# by passing a string with variable size to it -