I am currently writing a graph library in Java, and I need a tool to visualize some graphs. I discovered Graph-viz, which happens to be a great, albeit buggy, way to do this.
In my model, Counts are made up of Nodes and Edges . Each Node has a specific number of ports (I / O / IO) and Edges binds those ports together. Some special nodes are called GraphNodes and insert Graph . The ports of these GraphNodes are mapped to some ports on the internal nodes .
I would like to provide some submissions. The first one I am satisfied with is as follows: http://i.stack.imgur.com/ujU71.png
Inputs Ports are green, outputs are red, and inputs are blue.
In this view, GraphNodes are not extended and Nodes are displayed just as easily. In the second version, I would like to create something similar to the following picture: http://i.stack.imgur.com/Cx624.png
The problem is that I cannot create a subgraph (cluster) with fixed areas (it seems not possible). Another solution I tried is to include a graph in node. However, inserting some code into the <td> </td> HTML label does not evaluate the code:
digraph graph0 { node1 [ label = < <table border="0" cellspacing="0"> <tr> <td cellpadding="0"> <table border="0" cellspacing="0"> <tr> <td bgcolor="palegreen" border="1" port="port2">port2</td> <td bgcolor="palegreen" border="1" port="port3">port3</td> </tr> </table> </td> </tr> <tr> <td cellpadding="0"> <table border="0" cellspacing="0"> <tr> <td cellpadding="0"> <table border="0" cellspacing="0"> <tr> <td bgcolor="skyblue" border="1" port="port5">port5</td> </tr> </table> </td> <td bgcolor="peachpuff" border="1"> subgraph clusterTest { nodeTest } </td> </tr> </table> </td> </tr> <tr> <td cellpadding="0"> <table border="0" cellspacing="0"> <tr> <td bgcolor="lightpink" border="1" port="port4">port4</td> </tr> </table> </td> </tr> </table> > style = "invisible" ] }
The previous code creates the following schedule: http://i.stack.imgur.com/E9jQ1.png
Finally, the best solution I can come up with is the following: http://i.stack.imgur.com/VzS5g.png
However, I am not satisfied with this because GraphNodes ' Ports are sometimes placed in strange places.
Do you know how I can reach the target schedule? If necessary, request any other information.
EDIT: I still haven't found a solution. A way to deal with this would be to be able to fix the position of the given nodes inside the containing cluster, but this does not seem to be possible with the help of a โpointโ layout. Any idea?