Connection with unique vertices and connected components

Oct 26, 2011 at 3:30 PM

Hi

I wanted to know if there is a way to use NodeXL for finding how many different (unique) vertices, a given vertex is connect to? 

Also, can we retrieve the connected components of a graph and also display them?

Hope to hear back soon!

Thanks

Oct 26, 2011 at 5:11 PM

I'll assume your graph is undirected.  (Set NodeXL, Graph, Type to Undirected.)  The answer is a bit more complicated in the directed case.  To find out how many unique vertices a given vertex is connected to, do this:

1. Select NodeXL, Analysis, Graph Metrics.

2. Check Degree in the Graph Metrics dialog box and click Calculate Metrics.

This will add a set of Graph Metrics columns to the Vertices worksheet.  The number you want is in the Degree column.

To see the connected components in a graph, do this:

1. Select NodeXL, Analysis, Groups, Group by Connected Component.

2. Refresh the graph.

The vertices in each connected component will be given a unique color/shape combination when you do this.

There are many other things you can do with groups, such as displaying them in separate boxes, collapsing them, and getting metrics about them.  Go to NodeXL, Help, Help and see the Working with Groups topic for more information.

-- Tony

 

Oct 27, 2011 at 6:57 PM

Thanks Tony for the prompt response!

Yes, I am working with directed graphs. Do I have to use in-degree and out-degree and then sum the two to get the combined total? But then again, a vertex is counted twice and I only want unique occurrences.

Please let me know how to resolve it!

 

Oct 27, 2011 at 9:16 PM

All you have to do is temporarily set the Type to Undirected, check only Degree in the Graph Metrics dialog box, and reset Type to Directed when you're done.  That way you won't overwrite any directedness-sensitive graph metrics that you're also calculating, such as In-Degree and Out-Degree.  You can always rename the Degree column to Unique Adjacent Vertices afterward if you want to avoid confusion.

-- Tony

Nov 4, 2011 at 9:37 PM

Hello again Tony,

I wanted to display the graph of only a particular group, say the most connected component. When I click on the group, its associated vertices do not get selected. They do get selected on the 'group vertices' work sheet. But that does not allow exporting.

Also, if I manually select a vertex, its associated edges do not get selected in the edges worksheet. In one of my older posts http://nodexl.codeplex.com/discussions/271520 I brought up this issue. But still it is not working.

Can you help me with it?

 

Thanks :)

 

Nov 4, 2011 at 10:53 PM

Sounds like there are two separate problems here.  Let's take the second one first.

If you select a vertex in either the Vertices worksheet or the graph pane and its incident edges do not get selected, it's probably because you have a certain option turned off.  I'll copy the solution from the previous post.  If any of these steps don't work, tell me which one is the problem.

1.  Click the Graph Options button at the top of the Graph Pane. (If the Graph Pane is narrow, the Graph Options button may not be visible. Click the down-arrow at the upper-right edge of the Graph Pane to make the button visible.)

2.  On the Vertices tab of the Graph Options dialog box, check "When a vertex is clicked, select its incident edges."

That will change the option for the current workbook.  To make the change apply to all new NodeXL workbooks you create, do this:

3.  In the ribbon, click NodeXL, Options, Use Current for New.

On the first issue, are you saying that if you click a row in the Groups worksheet then the clicked group's vertices do not get selected in the graph pane?

-- Tony