Repetitive call of render command leads to strange rendering behavior in script bindings

Hi all,

I have been using Graphviz version 2.20.2 on a Linux machine in form of the tcl bindings, i.e. the Tcldot and gv packages.

If I create a network and call the tk render function once at the end, everything works fine.

However, if I call the render function repetitively, i.e., if I create a few graph elements, then render, then create some more graph elements, and render again, I get strange rendering behaviour such as: (i) Cluster frames are not drawn respectively clusters are not considered at all for the layout and (ii) edges are not drawn using splines even though the splines attribute is set.

It seems as if the graph retains some status information from previous layout or rendering steps which hamper the next rendering process. Below is a minimal piece of code to illustrate the error. It creates a graph with node "a" in the general context and node "A" inside of a cluster "A". If the rendering is called only once at the end of the script, the cluster gets drawn correctly.

Did anybody experience similar errors? How can I avoid them?

Thanks for any help

JPE

# This is ok ...

package require Tcldot

set c .c
canvas $c
pack $c

set g [dotnew digraph rankdir TB]

$g addsubgraph "cluster 1" label 1

graph0 addnode a
graph1 addnode A

$g layout
eval [$g render $c "dot"]

# This produces no cluster border

package require Tcldot

set c .c
canvas $c
pack $c

set g [dotnew digraph rankdir TB]

$g addsubgraph "cluster 1" label 1

graph0 addnode a

$g layout
eval [$g render $c "dot"]

graph1 addnode A

$g layout
eval [$g render $c "dot"]

Recent comments