Controlling Color Mapping to Vertices

Feb 22, 2012 at 3:49 AM

I have a set of relationships (edge) attributes that I'm analyzing. I am coloring vertices by division.  I would like the color mapping to stay constant as I go through each edge attribute. Is there a way of doing this? Even if I could just save and re-use an allocation or at worse manually change colors by edge attribute.

Feb 22, 2012 at 2:54 PM

I don't understand your scenario.  You're color mapping what to what?  Please clarify, using concrete terminology.  ("My Edges worksheet has a Relationship column, and for each Relationship value I want to use Autofill Columns to fill in the X column on the Y worksheet based on values in the W column on the Z worksheet," or whatever...).

-- Tony

 

Feb 22, 2012 at 9:17 PM

ok...sorry about the vagueness.

My edges worksheet has a number of added columns that represent different relationship types e.g. problem solving, approvals, expert advice etc. The values in the added columns typically represent the relative strength of the relationship and is numeric. My vertices worksheet has additional attribute columns for things like location, department, work role etc...

What I am doing is developing a map for each relationship type and strength. I am colouring the vertices by their departmental membership. NodeXL automatically maps colours to the vertices. However, it seems depending on the number of vertices that are visible, the colours mapped to each department can change from relationship to relationship.

What I am looking for is a way to lock in the colours to be the same for each relationship type I analyse.

Feb 23, 2012 at 6:42 AM
Edited Feb 23, 2012 at 6:48 AM

Which NodeXL menu item are you using to color your vertices: NodeXL, Analysis, Autofill Columns; or NodeXL, Analysis, Groups, Group by Vertex Attribute?

-- Tony

Feb 23, 2012 at 6:47 AM
Edited Feb 23, 2012 at 7:00 AM

...but in either case, edge attributes and relationship types have nothing to do with it.

If you could list the menu items you are using, I can tell you what those items actually do.  I think you are misunderstanding how NodeXL assigns colors to vertices.

-- Tony

Feb 23, 2012 at 8:09 AM
The autopilot columns

Sent from my iPad

On 23/02/2012, at 6:42 PM, "tcap479" <notifications@codeplex.com> wrote:

From: tcap479

Which NodeXL feature are you using to color your vertices: NodeXL, Analysis, Autofill Columns; or NodeXL, Analysis, Groups, Group by Vertex Attribute?

-- Tony

Feb 23, 2012 at 8:17 AM
That's right I don't understand how Nodexl assigns colours. The reason for wanting the same colours for different relationship types is that I take snapshots of networks and paste them into PowerPoint. So if the problem solving map and say the dependency map show the departmental vertex colours with a different colours key it gets confusing.

Sent from my iPad

On 23/02/2012, at 6:47 PM, "tcap479" <notifications@codeplex.com> wrote:

From: tcap479

...and in either case, what do edge attributes and relationship types have to do with it?

If you could list the menu items you are using, I can tell you what those items actually do. I think you are misunderstanding how NodeXL assigns colors to vertices.

-- Tony

Feb 23, 2012 at 3:50 PM

So I gather that this is what you are doing:

1. You are using NodeXL, Analysis, Autofill Columns.

2. In the Vertices tab of the Autofill Columns dialog box, you are specifying Department as the source column for Vertex Color.

3. In the Options for the Vertex Color, you are specifying that the source column's values are Categories.

If that is the case, then NodeXL is assigning a unique color to each set of vertices that have the same Department -- all vertices in the Sociology department might get assigned the color dark blue, for example, while all vertices in the Physics department might be orange.  The colors that NodeXL assigns are predetermined and cannot be changed.

The Edges worksheet and the additional attribute columns you have added to it have nothing to do with how NodeXL autofills the Color column on the Vertices worksheet, so your relationship types are irrelevant.

For more information on Autofill Columns, see the "Automatically Calculating Visual Properties for All Edges, Vertices or Groups" topic at NodeXL, Help, Help.

-- Tony

Feb 23, 2012 at 9:39 PM

Yes I understand your explanation of how colours are uniquely assigned and pre-determined. I use the additional columns in the edges worksheet to store the results of different relationship types as I explained earlier. I filter using the Autofill on edge visibility to look at each of the relationship types I have set up in the additional columns....and as you say NodeXL assigns colours to the Sociology and Physics departments in a predetermined way. So lets say I want to look at the 'frequency of interaction' relationship network, I filter on that column and I get the 'frequency of interaction' map, with the predetermined colours. Now I want to filter on another relationship, lets call it the 'expertise sharing' relationship, and now I get the 'expertise sharing' network map, but NodeXL this time has determined that the Sociology department is now orange and the physics department is now dark blue. Why is this so? I suspect it might have something to do with the nature of the data in that column that impacts how colours are assigned. Perhaps for a particular set of edges a department is no longer represented and therefore may effect the colour allocation. I don't really know.....The solution I am looking for is how do I get the Sociology Department to be dark blue and the Physics department to be orange all the time, irrespective of the data I have in the additional edge columns. 

 

Feb 23, 2012 at 10:14 PM
Edited Feb 23, 2012 at 11:49 PM

Autofill Columns won't work for you.  You'll have to fill in the Color column on the Vertices worksheet yourself, using one of the following techniques:

1. Type them in manually.

2. Use an Excel formula of nested IFs.  The formula would look like this if there are two possible values for Department:

=IF(Vertices[[#This Row],[Department]]="Sociology", "Blue", IF(Vertices[[#This Row],[Department]]="Physics", "Orange", "Black"))

The nested IFs will get ugly very quickly as you add more possible values for Department.

3. Write a VBA macro that does the same thing as the nested IFs, except it would use a clean Select Case statement.

In other words, you either have to do some tedious typing or some programming.

-- Tony

Feb 24, 2012 at 1:28 AM
ok tks Tony ….at least I know there isn't an easier way….I already have a truckload of macros so my not one more :)

Laurence Lock Lee
Ph: 0407001628



On 24/02/2012, at 10:14 AM, tcap479 wrote:

From: tcap479

Autofill Columns won't work for you. You'll have to fill in the Color column on the Vertices worksheet yourself, using one of the following techniques:

1. Type them in manually.

2. Use an Excel formula of nested IFs. The formula would look like this if there are two possible values for Department:

=IF(Vertices[[#This Row],[Department]]="Sociology", "Blue", IF(Vertices[[#This Row],[Department]]="Physics", "Orange", "Black"))

The nested IFs will get ugly very quickly if you add more possible values for Department.

3. Write a VBA macro that does the same thing as the nested IFs, except it would use a clean Select Case statement.

In other words, you either have to do some tedious typing or some programming.

-- Tony