no complement clustering info in dot file with Gvmap

Following the Gvmap example from http://www.graphviz.org/Gallery/undirected/gd_1994_2007.html and cluster example from http://www.graphviz.org/content/cluster, I tried to create a gvmap file. But it always tells me that there is "no complement clustering info in dot file, using modularity clustering". I am frustrated with this message. What's the meaning of "modularity clustering"? Could anyone tell me where I made mistake? thanks a lot!!!

my platform is Win7 64bit Enterprise with graphviz2.30.1 stable version.

enclosed files are as following:
dot file:cluster_map.txt
gv file: cluster_map.gv (not allowed to be uploaded)
png file: cluster_map.png

the commands are as following:

E:\work\NMS\graphviz\sample>sfdp -Tgv -Goverlap=prism -ocluster_map.gv cluster_map.txt (this step is OK)

E:\work\NMS\graphviz\sample>sfdp -Goverlap=prism -Gcharset=latin1 cluster_map.gv | gvmap -e | neato -Ecolor="#55555522" -n2 -Tpng > cluster_map.png
modularity = -0.106509 new modularity = 0.180473 level = 0, n = 10, nc = 5, gain = 0.286982
modularity = 0.180473 new modularity = 0.245562 level = 1, n = 5, nc = 3, gain = 0.0650888
modularity = 0.245562 new modularity = 0.245562 level = 2, n = 3, nc = 3, gain = 0
no complement clustering info in dot file, using modularity clustering. Modularity = 0.245562, nclu
ster=3
max grouping - min grouping + 1 = 3
avgsize = {27.218484, 18.050004}
setting shore length ======131.272994
nrandom=352
nrandom=352
nn nrandom=223
ncomps = 3
norm = 1.000000norm1 = 1.000000, norm2 = 6.000000
npolys = 3
npolys = 3

AttachmentSize
cluster_map.png91.87 KB
cluster_map.txt367 bytes
out.png53.71 KB

Ignore this. This is simply

Ignore this. This is simply the output you would get if you ran gvmap with the -v (verbose) flag. It simply says that your input has not provided any cluster information, so gvmap is going to us modularity clustering to provide the clustering for you. At present, I am not sure why the verbose flag is on by default but it probably relates to the usual oddities provided by Microsoft.

By the way, you don't need to run sfdp twice. And you don't need the charset attribute unless your input contains non-ascii characters.

 

    sfdp -Goverlap=prism cluster_map.txt | gvmap -e | neato -Ecolor="#55555522" -n2 -Tpng > out.png

 

What I am wondering is that

What I am wondering is that why the map is not correct. please take a look at the file "out.png" which produced by the commands you gave to me. thanks!

Dear erg, The warning

Dear erg,

The warning information is not critical. I concern most is that the commands cannot produce correct map. please take a look at the png files I attached. thanks!

best,

What is it about out.png that

What is it about out.png that you feel is incorrect?

Dear Erg, I guess the

Dear Erg,

I guess the correct map produced by cluster_map.txt should be that a0-a3 are together in one region while b0-b3 together in another region. But obviously in out.png, the situation is not the same as my imgination. That why I think out.png is not correct.

In fact, I really don't know what kind of map is correct from cluster_map.txt. But I know out.png is not what I want. I want a0-a3 are in one region and b0-b3 are in another region.

By default, gvmap takes the

By default, gvmap takes the layout given it and uses that to produce the clustering. (This is the modularity clustering you saw mentioned.)  This only depends on the geometry of the node placement. Because of the edges, b3, a3, b2 and end are all placed close together by sfdp, so gvmap decides they are a cluster. Obviously, this clustering very much depends on the layout. You might try replacing sfdp by dot or fdp and see what you get.

You can override this by specifying the clusters explicitly. This is done by assigning a cluster attribute to each node. Those with the same number are put in the same cluster. For this to work, every node must have an assigned cluster. So for your graph, one could use

graph G {

    node[cluster=1]
    subgraph cluster_0 {
        style=invis;
        node[cluster=2]
        color=lightgrey;
        a0;a1;a2;a3;
        a0 -- a1 -- a2 -- a3;
    }

    subgraph cluster_1 {
        style=invis;
        node[cluster=3]
        b0;b1;b2;b3
        b0 -- b1 -- b2 -- b3;
        color=blue
    }

    start -- a0;
    start -- b0;
    a1 -- b3;
    b2 -- a3;
    a3 -- a0;
    a3 -- end;
    b3 -- end;

    start [shape=Mdiamond];
    end [shape=Msquare];
}

You might ask why not use the given clusters. That was just the way it was implemented. I've must altered gvmap to take a -D flag telling it to use the given cluster subgraphs.

thanks Erg, I got correct map

thanks Erg, I got correct map by your dot file this time. Yes, this map is what I really want. Thanks a lot!

 

best,

james

The problem should be fixed

The problem should be fixed as of the 4 July package of Graphviz.

Recent comments