Standardized Vertex locations

Dec 8, 2013 at 6:54 AM
Edited Dec 8, 2013 at 6:58 AM
Hey all,

I was wondering if it is at all possible to set up a standard group of vertices that never shift position in the graph space. That way you can input edge values from different events and visually compare between them. I was thinking a template or a way of locking the vertex location so that every time I open nodeXL I only need to input the edge info.

I have been attempting to do this by hand, generating the graph then moving the vertices one by one, trying to get the output graphs similar. But the results are not clean enough for publication in a journal. Especially not when one places the graphs side by side. Anyone got ideas?

Thanks

~`Dane
Dec 9, 2013 at 3:59 PM
Dane:

Do you mean that you have two or more graphs that share a common subset of vertices, and you want those vertices to appear in the same location in each graph?

-- Tony
Dec 9, 2013 at 8:34 PM
Not quite. Im using the software to creat figures for the connectivity between brain regions. It will the same 18 vertices in all 6 graphs (which are different conditions/groups). Whether or not there is an edge and how thick it is will ideally be the only thing that changes in any of the graphs.

~`Dane


Dec 9, 2013 at 10:06 PM
Edited Dec 9, 2013 at 10:07 PM
Dane:

An entire set is a subset of itself, so we just said the same thing. But we can happily skip the mathematical set theory and just find you a solution.

What you can do is create what you've called a "template file" that contains vertices that are locked in place, but that has no edges. (I don't mean an Excel template file, which is a different beast, and I know you don't mean that either.) To do that, follow these steps:


1) Create a new NodeXL workbook.

2) Switch to the Vertices worksheet using the tabs at the lower-left corner of the Excel window.

3) For each of your 18 vertices, enter a name in the Vertex column.

4) In the first empty cell in the Visibility column, enter ="show". That will fill the entire Visibility column with "show", which is what is required to get an isolated vertex to appear when you show the graph.

5) Fill in any other visual property columns you want to specify, such as Color or Shape.

6) Select a layout in NodeXL, Graph, Layout.

7) Click Show Graph.

8) Manually rearrange the vertices if necessary.

9) (Important!) Set NodeXL Graph, Layout to "None." This prevents the vertices from moving when you click Refresh Graph.

10) Save the workbook. Call it BrainTemplate.xlsx, for example.


Now, for each of your individual graphs, do this:


11) In Windows Explorer copy BrainTemplate.xlsx to BrainTemplate01.xlsx, for example.

12) In Excel, open BrainTemplate01.xlsx.

13) Fill in the Edges worksheet. In the Vertex 1 and Vertex 2 columns, be sure to use the exact names you used back in step 3.

14) Click Show Graph.

15) You'll get a warning about the Layout being set to None, because the graph has never been laid out before. Answer "Yes" to the warning.

That's it. In step 14, NodeXL will not create a vertex in the Vertices worksheet if the vertex is already there, so you will end up reusing the same 18 vertices for each of your workbooks. And because you used a layout of "None", the vertices will be in the same place in each workbook.

-- Tony
Dec 9, 2013 at 10:08 PM
[Step numbers corrected. CodePlex insists on starting each list at number one. -- Tony]
Dec 10, 2013 at 10:43 PM
Thanks so much Tony for the thorough step by step. I will give this a go when I next have a batch of data to run.

Cheers

~`Dane


Dec 26, 2013 at 7:56 AM
Worked like a charm. thanks man.