Problem with colors for vertices on graph

Sep 23, 2011 at 9:58 PM

Well, I'm stumped, so it's time to go to the source...

I'm trying to set the colors for members of networks in the latest NodeXL version ( I have to apply specific colors for 3 types of people...

I am using Autofill to set the Vertex Color from another column of data labelled Status.
In the Vertex Color Options I have The source column's values are: Categories
I also use the Status column to Autofill the Vertex Labels
In the Status column on the Vertex tab I use one of 3 symbols: + * - for each Vertex
I have set the colors for the above symbols in the Goups tab by setting up 3 groups with the above symbols.
In the Group Options I have chosen the first option: The colors specified in the Vertex Column on the Groups worksheet...

Here are my problems:

1. The colors in the Vertex Color column don't match the RGB numbering convention (they are all 0,12,96 or 0,136,227, etc., (all the first numbers are 0 even the red one)), but the look right in the graph.

2. If I change an entry in the Status column (say, from * to -), and update Autofill and refersh the graph, the label changes on the graph, but not the color.

There's got to be a way to get this to work so that the labels and colors match properly.

Any ideas? I'm open to all. I'm trying to make it easy for people to use, otherwise they won't.

Thanks, and take care.



Sep 24, 2011 at 5:44 PM
Edited Sep 26, 2011 at 4:40 PM

Hello, Bill:

There are two distinct ways to assign vertex colors based on your Status column:

1. Use NodeXL, Visual Properties, Autofill Columns and select the Categories option in the Vertex Color Options dialog box.  Autofill Columns will fill in the Color column on the Vertices worksheet based on the values in your Status column.  The only disadvantage to using Autofill Columns to assign colors is that NodeXL uses a predetermined color set, and you can't change these colors without tediously editing multiple cells in the Color column.

2. Use NodeXL, Analysis, Groups, Group by Vertex Attribute and select the Categories option in the Group by Vertex Attribute dialog box.  In this case, NodeXL creates a set of groups based on the values in your Status column, and assigns a unique color to each group.  Much of the group information, including the assigned colors, gets stored in the Groups worksheet; the rest gets stored in the Group Vertices worksheet and can be ignored.  Now, when the graph is shown, NodeXL sees that groups exist and uses the colors stored in the Groups worksheet instead of any that might be stored in the Vertices worksheet.  One advantage to using groups is that the color of a group can be easily changed by editing a single cell in the Groups worksheet.

I think the problem you’re running into is that you are trying to combine both techniques.  For predictable results with vertex color, use one or the other, not both.  Using groups for vertex color doesn’t prevent you from using Autofill Columns to autofill other columns, including the Label column.

For more information about how groups work in NodeXL, go to NodeXL, NodeXL, Help and look at the Working with Groups topic.

If this doesn’t clear things up, let me know.

-- Tony

Sep 24, 2011 at 5:49 PM

And for both techniques outlined above, the Group Options selection for "What colors should be used for the groups' vertices?" should be left at the default setting of "The colors specified in the Vertex Color column on the Groups worksheet."  The Group Options are for advanced scenarios.

-- Tony

Sep 26, 2011 at 10:34 PM

Thanks, Tony. I cleared everything and set it up according to your #2 method, but it didn't work.

But--I have a new clue that might help. If I change a Vertex Status from one symbol to another (+ to -, say) in the status column, and then go to the Groups tab and click on the + cell, the graph highlights all the vertexes that used to be +, no matter what their current Status (and Label) says. So I can change Status all I want, but the program never notices (except that it does change the Label on the graph).

It's as though they won't move from one group to another even though the status changes.

Any ideas?

I'm using on Excel 2007, Windows 7, new Dell Optiplex 980.

And thanks for the reminder aboout the Help files. I started with NodeXL before there were help files and I forgot to check. I've read them now.

Sep 26, 2011 at 11:14 PM


Groups are created only on demand; they do not get dynamically updated.  If you change a Vertex Status from one symbol to another, you have to tell NodeXL to recreate your groups by running Group by Vertex Attribute again.

-- Tony

Sep 27, 2011 at 9:13 PM

Okay, I'm getting there. I can make the instructions clear enough for staff to follow.

However (you knew that was coming, didn't you?), when I update by running Group by Vertex Attribute, the colors revert to those chosen by NodeXL. I have to use Red, Blue, and Grey and I need the values that I have chosen so that they will be easy to differentiate in a grayscale laser printout. I don't have a choice in this, it's the CDC's call. Any ideas?

Thanks for your help and patience.

Sep 27, 2011 at 10:34 PM
Edited Sep 28, 2011 at 12:12 AM


It sounds like NodeXL could use a "don't overwrite my colors" checkbox when creating groups.  We don't have that right now, so my advice is to set all your Vertex Status cells to their final values and create your groups just once.  If you really need to updates things repeatedly, you can copy your desired group colors to a new column and use them to manually overwrite NodeXL's group colors every time you recreate your groups.

I'm sorry I don't have a better solution than that.

-- Tony

Sep 29, 2011 at 7:59 PM

Thanks, Tony.

If you are taking suggestions, yes, I'd like to see...

a. A "Leave my colors alone" checkbox.

b. More options in the Automate button to simplify updating the display.

c. A way to tell NodeXL to cluster the members of each subgroup closely together in a circle around their core member (recruiter). I find the layout in Boxes option tedious. It would be great to be able to tell NodeXL "For each recruiter, place his friends X distance away." Not being a social scientist, I look at the Layout Options-Strength of Repulsive Force as the kind of thing that makes sense to me to do this. But it's apparently not. Is there a way?

In fairness, we may be using NodeXL in a manner that is not the norm. We are using it to document and report on groups that we already know the information for. We're not really using it to research and discover patterns. Funded agencies will track HIV test results in social networks (which is why they'll need to change some Vertex Status entries when people get tested). They'll use NodeXL for their periodic reports. And since they are probably not computer experts, I'm trying to make it as simple as possible. The CDC wants 3 shapes (large square, large and small circles) representing their role in the group and 3 colors representing their status (positive, negative, untested).

I'm new to NodeXL, so if you have a better idea how to do this, I'm all ears. I have a couple of months to finalize this and I'm willing to start from scratch.

Thanks for your help and take care.

Oct 7, 2011 at 8:24 PM
Edited Oct 7, 2011 at 9:26 PM

Well, Tony, here's a follow-up and my solution. I realize that a lot of people are doing much more complex work with NodeXL than I am, but I'm not a social scientist, so this use is all new to me.

After a phone conversation with someone who graciously offered his time (who can identify himself, if he wants, but I don't think I should), my eyes were opened. I had been treating this as though I had to let NodeXL do all the work; that's why I was searching for a solution is Categories or Groups (to populate the columns with data). He told me that I could just use Excel as I normally would and use the NodeXL functionality when it made sense. I had assumed that I shouldn't mess with the columns directly, just through Autofill, etc.

Bingo! It's so easy. He suggested just using an If statement. Piece of cake. =IF(P3="+","maroon",IF(P3="-","royalblue","200,216,200")) Done.

So, now I have a new perspective, and NodeXL is doing everything I need. Sort of.

While we were on the phone, I mentioned that I couldn't add a column at the end of the Vertices worksheet and have it show up in the Dynamic Filters window (although I already had another one that did show up). I have since figured it out. The column won't show up until you actually put some data in it, and--most importantly--that data has to be numbers. I was trying to allow users to filter on +, -, or * and it just wouldn't show up.

So, as a workaround, I created another column that assigns a number to each symbol and the users can sort by that. I used conditional formatting to make the cell and font colors match the graph colors for each symbol (which makes the numbers invisible). The text of column title (which I also formatted to be invisible) shows up in the Dynamic Filter window, and includes a legend that gives the number equivalents. So it's easy to sort on the 3 values.

Finally: The calendar attached to the date field Filter controls is great. Thanks to whoever worked that out. Very handy.

So--Thanks Tony and all. I may have more questions if we decide to expand the functionality. I'm doing my first training on it early next month (for our staff) and for the end users in December or January. Time to write the documentation and training materials.

Take care.

Bill Pearson