Removing Self Loops

Feb 24, 2011 at 12:24 AM

Is there a way to not show self nominating edges .... often happens in discussions where a poster responds to their own post

Feb 24, 2011 at 5:06 PM
Edited Feb 24, 2011 at 5:46 PM

Yes.  You can add a column to the Edges worksheet that indicates whether the edge is a self-loop (NodeXL's term for what you are calling a self-nominating edge), then use one of two types of filters to filter out the self-loops.

To add an Is Self-Loop column to the Edges worksheet:

1. Rename the column called "Add Your Own Columns Here" to "Is Self-Loop."

2. Enter this Excel formula into the first data cell of the Is Self-Loop column.  The formula is Excel-speak for "if the vertices are the same enter 1, otherwise enter 0.

            =IF(Edges[[#This Row],[Vertex 1]]=Edges[[#This Row],[Vertex 2]], 1, 0)

To filter out the self-loop rows so they are completely ignored by NodeXL:

1. Click the down-arrow in the Is Self-Loop column header.

2. Under Number Filters, uncheck the "1" checkbox.  This will hide the self-loop rows, and NodeXL ingores hidden rows when you click Show Graph or Refresh Graph.

To temporarily filter out the self-loop rows:

1. In the Excel Ribbon, click NodeXL, Analysis, Dynamic Filters.

2. In the Dynamic Filters dialog box, slide the right-hand Is Self-Loop slider all the way to the left.  The self-loop edges in the graph pane will immediately disappear.

-- Tony

Jan 12, 2013 at 3:09 PM

Found this very useful. Thank you for posting!!