Re: [graphviz-interest] Moving nodes and edges between [sub]graphs using the gv library

Sparr <[email protected]> Thu, 27 Feb 2014 17:08:34 -0500
Newsgroups gmane.comp.video.graphviz
Message-ID <CANp3UNDmVPqqyg83r7euNmgu+8U=1DOJZF8SYE-Deh_9255KQw@mail.gmail.com>
So, to move a node from one subgraph to another I would need to create
a new node, copy all the attributes, create copies of all the existing
edges to/from the old node, copy all of their attributes, then delete
the old node (and the old edges?)?

On Thu, Feb 27, 2014 at 5:06 PM, John Ellson <[email protected]> wrote:
> On 02/27/2014 04:58 PM, Sparr wrote:
>>
>> On Thu, Feb 27, 2014 at 4:28 PM, John Ellson <[email protected]>
>> wrote:
>>>
>>> On 02/27/2014 04:11 PM, Sparr wrote:
>>>>
>>>> What I would like to do is assemble a graph, then selectively
>>>> "promote" certain nodes and edges into subgraphs afterwards.
>>>
>>> Certainly you can manipulate the attributes of nodes and subgraphs in the
>>> abstract graph from one of the language bindings, or from gvpr.
>>
>> I am unsure how to apply this answer. Is there an attribute of a node
>> that specifies which subgraph it belongs to, or vice versa?
>
>
> You can obtain a list of member nodes from a subgraph, and add/del nodes to
> a subgraph.
>
> To move you would have to delete from whatever graph it was in before, and
> add to the subgraph.
>
> A node can't be a direct member of more than one subgraph. Subgraphs can be
> added to other subgraphs, forming a tree,
> so indirectly a node is a member of all its parent subgraphs, and the parent
> graph.
>
> John
_______________________________________________
[email protected]
http://lists.research.att.com/mailman/listinfo/graphviz-interest