view only related edges

Apr 15, 2010 at 4:53 PM

Hi, I am using NodeXL to find relationships between companies and individuals.  I am looking for both apparent and unapparent connections, and need to document them.  I would like to select one vertex, and only show edges related to that vertex.  I can select it in the diagram, but need everything else to disappear so that I can work creating an easily understandable diagram with only those edges.  I am sure that there is an easy way to do this, but it is escaping me.  Thanks for your assistance!

Apr 15, 2010 at 5:25 PM
Edited Apr 15, 2010 at 5:29 PM

Here is one way:

1. Make all the vertices and edges disappear.  Do this by going to Options at the top of the graph pane, then setting both Opacity entries in the Options dialog box to 0%.

2. Go to the Vertices worksheet by clicking the Vertices tab at the lower-left corner of the Excel window.

3. In the Vertices worksheet, click the vertex of interest.

Selected vertices (and their incident edges) are always visible, even if you have the opacity set to 0, so your selected vertex will light up red in the graph pane.

If you don't like red, you can change the selected vertex and edge colors to something else using Options.

-- Tony

Apr 15, 2010 at 6:10 PM

Tony, thanks for the quick reply.  I was able to hide the edges and vertices with the opacity feature.  When I click on an edge, it shows up in red.  When i click on a vertex, it does not.  I may have done something as I was trying to figure this out............

This solution works for just being able to view the selection on screen, but they continue to have the entire graph behind them.  Is there a way to only include the subgraph without everything else?  Or is there a way to include only one vertex and not everything else?

 

 

Apr 15, 2010 at 6:17 PM

Eve:

Are you saying that when you click a row in the Vertices worksheet that that vertex is not lighting up red in the graph pane?

-- Tony

 

Apr 15, 2010 at 6:19 PM

yes, exactly.............it was doing it before, so have closed down the app and will load it again and try again..............

 

Apr 15, 2010 at 6:22 PM

ok - selecting vertex does highlight now.

 

Apr 15, 2010 at 6:23 PM

so bottom line, i need to be able to create the subgraph in the graph window so i can work with it - can we do that?

 

Coordinator
Apr 15, 2010 at 7:24 PM

I am not sure if this will address your requirement exactly, but, try the right-click menu, and the Select Subgraph option:

We will be modifying the behavior of a node when clicked multiple times to map to the outward expansion by degree of the selected population.

 

Apr 15, 2010 at 7:29 PM
Edited Apr 15, 2010 at 7:39 PM

I thought you were asking about showing only edges related to a vertex, which I believe you've just done.  (One related point: The vertex's adjacent vertices don't get selected using the above technique.  If you want to show a vertex, its incident edges, AND its adjacent vertices, right-click the selected vertex in the graph pane and select Select Adjacent Vertices.)

Do you need to do more than that?  If so here is a way to "extract" a subgraph into a new NodeXL workbook, where you can work on it without the distractions of the remainder of the graph:

1. Restore your Opacity settings back to 100%.

2. Right-click the vertex of interest in the graph pane and select Select Subgraphs.

3. In the Select Subgraphs dialog box, select "The clicked vertex only," set "Levels of Adjacent vertices to include in each subgraph" to 1, and check "Select the connecting edges."  Click Select, and your subgraph will be selected.

4. In the Excel ribbon, go to NodeXL, Data, Export, Selection to New NodeXL Workbook.  That will export only the subgraph to a new NodeXL workbook.

Bottom line: I'm not sure what you're asking for.  If this didn't answer your question, please explain exactly what you need to do.

-- Tony

Mar 16, 2011 at 1:04 PM

Hi

I am new to NodeXL and finding it a really interesting application. I am working on a data with 1500+ nodes.

I am trying to work on a similar problem as eve mentioned above. All I want to do is to be able to select an edge from the graph pane, based on its in-degree, out-degree or degree in general e.g., I want to select all those vertices whose edge weights are 5 or more. Is there a way to do that? Clicking on an edge does not select it.

Secondly, I was wondering whether the excel feature of sorting the data based on just one column works in NodeXL? e.g., in the lower left pane when I select Vertices and then try to sort in it based on in-degree etc., I am unable to do it.

Could you help me with that? Thanks!

Mar 16, 2011 at 1:18 PM

Just found the option to do the sorting but still unable to select the edges (based on visual display) from the graph view.  

Mar 16, 2011 at 5:06 PM
Edited Mar 16, 2011 at 5:11 PM

You can't directly select edges in the graph pane, but you can select them in the workbook.  Actually, you mentioned two problems, one involving vertices and one involving edges.  In the first example below I assume you have an undirected graph, in which case degree is the relevant graph metric.

To select all vertices (and their incident edges) whose degree is greater than 2:

1. Use NodeXL, Analysis, Graph Metrics to calculate degree.  This adds a Degree column to the Vertices worksheet.

2. Select the Vertices worksheet by clicking the Vertices tab at the lower-left corner of the Excel window.

3. Sort the Vertices worksheet by clicking the down-arrow to the right of the word Degree and selecting Sort Smallest to Largest.

4. Click the first cell in the Degree column with a value of 3 or greater.

5. Press Ctrl-Shift-DownArrow to select that row and all that follow.

To select all edges (and their adjacent vertices) whose edge weight is 5 or greater:

1. If you don't already have an Edge Weight column on the Edges worksheet, use NodeXL, Data, Prepare Data, Merge Duplicate Edges to merge duplicate edges and create an Edge Weight column.

2. Sort the Edges worksheet by clicking the down-arrow to the right of the words Edge Weight and selecting Sort Smallest to Largest.

3. Click the first cell in the Edge Weight column with a value of 5 or greater.

4. Press Ctrl-Shift-DownArrow to select that row and all that follow.

-- Tony

Mar 16, 2011 at 5:10 PM
Edited Mar 16, 2011 at 5:20 PM

Some additional notes:

* You can perform other selection tasks in the graph pane via the graph pane's right-click menu.

* The Edges and Vertices worksheets also have right-click menus.  The selection items for the worksheet right-click menus are located under a NodeXL submenu.

* You might find NodeXL, Analysis, Dynamic Filters useful.  Here, you can easily hide all the vertices (and their incident edges) whose degree is greater than 2, or all the edges (and their adjacent vertices) whose edge weight is 5 or greater.

* If you want to sort the Edges worksheet using more advanced criteria, click an edge in the worksheet and select Data, Sort & Filter, Sort.

-- Tony

Jun 7, 2011 at 5:42 PM

Hi,

I found this topic helpful as I am also interested in generating subgraphs. However, after I export the subgraph, the new file doesn't contain all the attributes that I had set with the "autofill columns" ... is there a way to get the fields that were filled in carried over to the new workbook?

 

thanks

 

/patti

Jun 7, 2011 at 8:10 PM

Answered my own question -- with the exporting of the current options from my previous question about vertex size. (http://nodexl.codeplex.com/discussions/259802)

Jun 8, 2011 at 12:03 AM

Patti:

Are you sure about that?  NodeXL, Data, Export, Selection to New NodeXL Workbook does export edge and vertex attribute values to the new workbook, including those filled in by Autofill Columns.

-- Tony

Jun 8, 2011 at 11:15 AM

See my own answer at 4:10. It did export the attributes, but not the graph options, but I was able to figure out how to save the graph options as well.

Jun 8, 2011 at 3:11 PM

Okay.  I misunderstood the problem, and I see that you found a solution.

-- Tony