How to Create an Adjacency Matrix

Table of Contents

What is an Adjacency Matrix

The Adjacency Matrix is one possible tabular representation of a graph. We have:

  1. some identifiers as row headers,
  2. same or other identifiers they are in relationship with as column headers,
  3. an optional value about each pair’s interaction in each intersecting cell.

To represent this table as a chart, we use a variation of a Scatter Chart:

  1. Simple Adjacency Matrix – for simple pair detection, with no value, using Scatter for the row headers and Label for the column headers.
  2. Adjacency Matrix with Category – with the value passed as a Category.
  3. Adjacency Matrix Bubble Chart – with the value passed as bubble Size.

Simple Adjacency Matrix

For this scenario, we may have a table with employee names or id as row headers and their managers as column headers, as depends_on identifiers. An X marker in any cell will tell the employee has that person as a manager, otherwise the cell is left empty.

To show this as a chart, we’ll use a Scatter Chart. The vertical axis will come from a Scatter chart type selection, reversed upside-down, to have the X axis labels on top. While the horizontal axis will get a Label setting. Sometimes both axes can be category axes, with text instead of numbers.

Dependency Crosstab Chart

Data labels are simply irrelevant here, we should never show them. We just display an X marker when there was an id and depends_on entry for that pair.

Adjacency Matrix with Category

You may also want to display how many products each employee sold for his manager, so we’ll have different values table’s cells. To show the quantity values as data labels on our chart, we add a Category selection to the previous simple Scatter chart.

Dependency Crosstab with Category

We have to show Category values as data labels, and show them as either lollipop bubbles, or block plots. Or we may show them above the regular simple markers as well.

Adjacency Matrix Bubble Chart

Previous charts bring nothing more compared to a typical text-only table (it’s even better to display it that way). To take advantage of the power of data visualization, we may replace the Category with a Size selection. This changes our Scatter Chart into a more powerful Bubble Chart. We can now see how large each quantity value is compared to the others.

Bubble Dependency Crosstab

This Bubble Chart uses a marker similar to the block plot, but we should be able to change it.


  • Creating an Adjacency Matrix in Data Xtractor or Visual Xtractor is flexible and rich: we may start with a simple Scatter Chart with X markers, when all we care about is identifying pairs of values.
  • Add a Category selection for values you may want to show as simple data labels.
  • Or add a Size selection instead, if you want to show how large each value is compared to the others.
  • Adjacency Matrices can be better visual replacements for typical text-only cross-tables.