Skip to main content
Skip table of contents

8. Layout and Pinning

In this Session…

Before you begin…

  • Using Layouts to organize and visualize data:

    • Pinning and Releasing nodes

    • Using Force directed, Parametric, Geometric,and Tree layouts.

    • Using the Quick Layout toolbar menu for geometric layout.

To follow along, download the starting data and snapshot library:



How To GraphXR 8. Layout and Pinning


Before You Begin…

Ideally, you’ll have worked through Module 7. Preferences.

If you’re starting here, and you want to follow along, you’ll need to:

  • Log in to GraphXR, create a Project, and open its graph space.

  • Download starting data (HowTo_08_START.graphxr) and the starting snapshot library HowTo_08_START.graphxrsnapshots) for this module and drag and drop it onto the graph space. 


We’ve already seen how layouts help us discover and explore graph patterns. With our data loaded, click to open the Layout panel.


The Layout panel includes tabs to adjust the default layout appearance, to work with Geometric and hierarchical layouts, and to create Parametric 3D scatterplots.


The right-click Layout menu or Quick Layout toolbar icon give one-click access to often-used geometric layout options, but with less control than in the Layout panel’s Geometric tab. We’ll delve into the various layout options in detail in a moment.


First, though, we’ll look at pinning to understand how it affects working with layouts.
Open the Project panel and Settings tab, and deselect Hide Pin Icon.  


A pin icon appears on the nodes arranged with the geometric grid layout, showing that they are pinned to that xyz location in the project space. 


We use the Pin / Release toolbar toggle icon (or right-click Actions=>Pin or Release menu items) to pin or release selected nodes. The badge next to the toolbar icon shows the number of currently pinned nodes.


Any nodes that are moved manually (using left click + drag)are also pinned.
To see this, select a few unpinned Character nodes and move them.
The number of pinned nodes is updated on the Pin icon badge.


When you select pinned nodes, the icon changes to Release. Simply click to release those nodes to the default force-directed layout.


With no data selected, you can click to pin all the data.... 


… or, when all the data is pinned, release it to the default force-directed layout.


Now open the  Layout panel and Force tab for a look at the default force-directed layout. It’s a dynamic physics simulation that arranges nodes and edges of your graph for reasonably good 3D visibility. 


Here you can adjust key force layout parameters. Note that the adjustments made in this panel affect all the data except for any pinned nodes.


Adjust the Link Strength slider to control how strongly the edges of the graph pull the nodes together. TIP: If the graph moves out of the view, click Center To or Fly Out  toolbar icons.


Edge length can also be controlled by the Link Distance slider.


The Gravity slider controls how strongly all nodes are attracted to a central point.


The Charge slider adjusts how strongly nodes are attracted to each other. Moving the slider tothe left results in greater repulsive force between the nodes.


Use the Collision slider to separate nodes that overlap in the view. This is particularly useful in a 2D view, to un-stack nodes projected on top of one another.


Move the Z-Compress slider to the right to flatten the node layout so that it is more 2-dimensional.


A fully 2D layout can be useful, especially for reports. In the Project panel and Settings tab, click the 2D Mode checkbox.


You’ll longer be able to rotate the view of the graph in 3D, and the Z-Compress slider will be hidden. Now re-open Project=>Settings and deselect the 2D Mode checkbox to return to 3D layout.


When you pin nodes in the graph space, for example, using left click drag, the remaining unpinned nodes are rearranged. To temporarily disable force layout before moving nodes, click the Enable/Disable Force Layout toolbar icon.


This leaves any unpinned nodes where they were. To re-enable force layout on unpinned nodes, click the toggle in the toolbar (or in the Force layout tab).


Restore Default Settings resets slider controls to their defaults. The graph data also returns to the default force layout, again, except for any pinned nodes. 
Now let’s look at our other layout options.


With the Quick Layout menu available in the toolbar or the right-click Layout menu we can apply many geometric layouts in one click. In the legend, select the Episodes nodes, click the Quick Layout icon,  and choose Grid.


With Episodes still selected, open the menu again and choose Expand to expand the grid or Contract to contract it by a default scale factor.


Nodes can also be arranged in hierarchical rings or trees around a central selection of nodes, and we can do this from the Quick Layout menu.


The depth of hierarchical Ring or Tree layouts can be set in the Geometric layout panel, but not in a Quick Layout. So, we’ll select the Episodes nodes and Hide them, and then quickly lay out Character nodes around their respective House nodes.


Select the House nodes, and in the Quick Layout menu choose Circle, and then Expand, as many times as you like to expand the circle layout. (This simply makes it easier to see the Ring layout we’ll apply next.)


With the House nodes still selected, click Quick Layout and choose Ring from the menu. Character nodes are now arranged in rings around their respective House nodes. NOTE: If you don’t select central nodes, GraphXR chooses for you.


With the House nodes still selected, choose Tree in the Quick Layout menu. The Character nodes are arranged in trees to the right of their respective House nodes.


Choose Ring again to return to the ring layout. Now click Show Hidden Nodes in the toolbar to restore our hidden Episode nodes.


We can experiment with adjusting the layout from here. For example:
• Select House nodes and move them using left click + drag.
• Select Episode nodes and apply a Spiral (or other) layout.
Expand or Contract any selection of nodes, or all nodes.


Now go to the Layout → Geometric tab and click Release to return to the default force layout.


The Geometric layout tab provides more layout options, controls to position nodes precisely in the project space, and the ability to order nodes by a property value.


As with Quick Layout we can apply a Line, Grid, Circle, Spiral, Cube, or Spring layout to any selection of nodes. But here we can also order the nodes by a property value.. But here we can also order the nodes by a property value.


Select our House nodes, click the Order by Property checkbox, select the House Category and houseName property, and click the Ascend (or Descend) checkbox. Now click Line.


In the Legend, select Episodes. Order by seasonEpisode property and click Grid. Order the Episodes category by seasonEpisode property and click Grid.
For all geometric layouts, unselected and unpinned nodes stay in force layout around the selected nodes (unless you disable force layout).


In the legend, select Characters nodes. In the Layout panel, order the Characters category by the kills property, and click Circle.


Rotate, Scale, and Shift controls let you adjust the orientation, scale, and position of a selection in the 3D space. Select Characters nodes and click Rotate Y to rotate the default 90 degrees. Select House nodes and click Expand (or Contract) to expand or contract the line layout by the default 1.5 times.  


Select the Episodes category (which is in a grid layout) and click the Shift Y button to shift the nodes up by the default 1.1 times.


You can enter positive or negative values for Rotate, Scale, and Shift, to reposition any selection of nodes precisely in the graph space.


At any time, you can choose a new layout for a selection of nodes or the entire graph. Select Characters nodes and click Cube to display the nodes in a 3D cube. 


If no nodes are selected a geometric layout arranges all the nodes. To see this, deselect all nodes and click Spiral, then click Expand several times.


A Distribution layout spreads nodes grouped by a property value in the X, Y or Z direction. To illustrate, we’ll first go to the Project=>Category tab, choose Episodes and set seasonNumber as a caption. 


Back in the Geometric layout tab, select Episodes nodes. Under Distribution, click the Spread Out checkbox and increase the Range to 6. Click Order by Property, choose seasonNumber, and click the Ascend and Number checkboxes. 
Finally, click X to distribute the Episodes nodes by seasonNumber along the X-axis.


Now click Release to return to the force layout.


Quick Layout uses default settings for Ring or Tree layouts. Scroll down in the Geometric tab to see that we can set the Ego depth (i.e. the number of hops from the central node), scale the edge Length, and order nodes by a property value.


As we did before, lay out House nodes in a circle, ordered by houseName, then Expand the circle using the Quick Layout menu. Again, this simply makes it easier to see the results.


With the House nodes still selected, scroll down to the bottom of the panel. 
For Ego depth, enter 1, and for the edge Length, enter 6. Click Order by Property and select Characters and the kills property. Now click Ring.


Notice that with Ego depth set at 1, the Episodes nodes remain in force layout.


With House nodes still selected, click Tree. Character nodes are arranged in a tree pattern to the right of their respective House nodes. Click Left, Right, Up, or Down checkboxes and Tree again to re-orient the connected nodes.


Click Ring again to display our ring layout. You can also change orientation for rings (but it’s easier to see the effect in trees).


The rings or trees are laid out on a 2D plane, but other nodes can be positioned anywhere in the 3D project space. For example, select the Episodes nodes and apply a Grid or Cube layout with nodes ordered by the seasonEpisode property.


At any time you can click Release to return all nodes to the default force layout. Any pinned nodes are automatically released.


Now open the Tree layout tab. Here you can arrange nodes as a hierarchy starting from any selection of nodes. Select House nodes and click Apply. The House nodes form the base of the tree and unselected nodes follow level by level according to their connection to the base nodes.


Select Episodes nodes and click Apply. Now the Episodes nodes form the base of the tree. This immediately separates out the many Character nodes that are not yet connected to an episode.


Use the Axis slider and click Apply to scale the tree layout. To return to a force layout, click Reset.


Next we’ll go to the Parametric layout tab to create a 3D scatterplot. Use the X, Y, and Z dropdown menus to select properties, then click Apply. Our choices are saved, letting us apply that layout again.


Use the Axis slider to adjust the size of the 3D layout, and the Show Axes and Show Grid checkboxes  to toggle the labeled axes and grid on and off.


We’ve selected properties that exist only on Episodes nodes (seasonNumber, millionViewers, and totalLines). Nodes without the properties (e.g. House or Character), or which have a null value are stacked up at the origin point.


To see a force layout of the nodes that don’t have the selected properties, click the Enable Force Layout toggle in the layout panel (not in the toolbar).  Disable Force Layout returns us to our specified parametric layout.


This is a good time to take a snapshot and/or save a GXRF file or data view, and download your snapshot archive. 
Once that’s done, click Clear to return the entire graph to force layout.


We’ve seen how to use layouts for focused visualization of graph patterns.
Next, in Module 9: Time Series, we’ll explore the graph by filtering on timestamp properties. HowTo_08_START.graphxr

Next Steps…

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.