Node Functions Panel

The Node Functions Panel is an addition to DukeGuess that allows you to easily access different properties of nodes. This section will describe how to open up the panel and explain each of its different uses.

Opening the Panel

To open the panel, go to the "File" menu at the top of the window, and select "Run Script...". You should open the "nodeScript.py" file in the DukeGuess folder.

This will add a panel to the bottom of your DukeGuess window that contains several buttons and a small text box. It looks like the image below

Using the Panel

Selecting Nodes

Using the Panel is fairly simple. Before you may use any of the buttons, though, you must select a node. You may do this in two different ways: either click on a node, or type its name into the text box and hit enter (Note that capitalization DOES matter). This will make the node "selected" and turn its color red. To select a different node, simply click on a different node or enter a different name into the text box. To clear a selected node without selecting another, click on the "Clear Current Node" button.

Jack is selected

Outdegree and Betweenness Buttons

The buttons labeled "Get outdegree" and "Get Betweenness" operate in similar ways. Once you have selected a node, if you click on the outdegree button the outdegree of the selected node is printed to the text box. If you click on betweenness, the betweenness is printed to the text box.

For more information on outdegree and betweennness, see their Wikipedia articles: Degree on Wikipedia and Betweenness on Wikipedia

The outdegree of Jack is 9 (his betweenness is 309.83)

Highlight Neighbors

This is a simple button that allows you to highlight all the selected nodes neighbors. A neighbor is a node that is directly connected to the selected node. This button will turn all the neighbors orange. If you would like to return them to their original color either click the "Clear Current Node" button or click on a different node.

Jack with his neighbors highlighted

Highlight Nodes X Edges Away

This button is a more powerful version of the "Highlight Neighbors" button. Instead of highlighting just neighbors, you can dictate the distance away a node must be from your selected node in order to be highlighted orange. For example, if you select "2" for Jack, but it will select all the neighbors for Jack's neighbors whom Jack does not have a connection with. These nodes are a distance of 2 away.

When you click on the "Highlight Nodes X Edges Away" button, a box comes up asking you to enter the distance you would like to highlight. Either enter a distance or type "all". If you type "all", something a little bit different will happen. Instead of highlighting nodes at just one set distance, the program will highlight nodes at every distance according to their distance. For example, neighbors will be highlighted one color, nodes 2 away will be highlighted another color, nodes 3 away another color, and so on. Nodes that are not reachable from the selected node (a distance of infinity) will be highlighted black. A color key also pops up to help you identify the colors.

Type in all to get a color gradient

Below is what the "24" graph looks like if you do an "all-Highlight" on Jack:


The Grouping Buttons

The last two buttons, "Save Group" and "Clear Group" have a specialized function. If you hold the shift key and left click on a node, you'll notice it changes color to a light blue. This means the node has been added to a group. To deselect a node from the group, shift-click it again.If you would like to save this group click on the "Save Group" button. If you would like to completely clear the list, click on the "Clear Group" button.

Any groups that you save will be available for use in the Interpreter for the rest of your DukeGuess session.

Put Jack, Kim, and Victor into a group called "group1"


< Back Contents Next >