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

Sparr <[email protected]> Thu, 27 Feb 2014 17:19:04 -0500
Newsgroups gmane.comp.video.graphviz
Message-ID <CANp3UNDwUrJVFwqUnbjUw8t+fsJMA74S8h--rHkSa9_HvvLPew@mail.gmail.com>
No, it's just for cluster layout purposes.
On Feb 27, 2014 5:14 PM, "John Ellson" <[email protected]> wrote:

> Yes, except that presumably the reason for moving it to a subgraph is so
> that you inherit a number of the attributes from the subgraph tree, so you
> wouldn't need to rewrite those.
>
> John
>
>
>
>
> On 02/27/2014 05:08 PM, Sparr wrote:
>
>> 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