How to avoid displaying groups of vertices

May 31, 2015 at 11:41 AM

I would like to display only groups that have nodes with edges (i.e, to hide all non-connected nodes in the graph, it happens after I filter them for certain minimal edge weight)

I wrote the following code:

(1) ver.SetValue(ReservedMetadataKeys.Visibility, VisibilityKeyValue.Hidden);

(2) foreach (List<int> cluster in communities)
            if (cluster.Count > 1)
                // Create a group.
                GroupInfo group = new GroupInfo();

                // Populate the group with the cluster's vertices.
                foreach (int nodeIndex in cluster)
I debugged and the result is that I I create groups only for connected nodes
BUT - what is being displayed are these groups + a last one that is empty and contains all the hidden nodes. I know this because if I delete line (1) above, I see all the nodes there.

How can I completely disable this group? it is not created in (2). Is it some default?

Thank you very much?