pixel size:
info
tooltip

Help

What

The big matrix is an Adjacency matrix, a representation of a graph. If row 2 and column 4 is colored, that means there exists an edge from node #2 to node #4.

This adjacency matrix was generated using Adjacency matrix code visualizer.

Why

The adjacency matrix give you an overview over connections in your graph. These examples are about connections between classes in a java code-base. Some interesting revelations this overview can give are:

See how connected your packages are
Sort and color by Package. Nicely separated packages will have half-box shapes just above the diagonal in the same color, and not many points above or next to this half-box. A half-box of the same color shows that classes within a package uses each other. Having few points above or next to the half-box means that package is not connected to other packages. A Tools packages would have many points above and below it because it is being used by all classes.
Highlight groups of highly connected classes
Sort by Similarity and color by Package. This groups together classes that are highly connected to each other and not highly connected to others, largest groups are at the top left. You should see half-boxes along the diagonal. If a half-box has two colors, then two packages are heavily connected. If there are two half-boxes with the same color, then that package should perhaps be split into two packages.
Detect cyclic dependencies
Sort by Tree (or by Package, Similarity, or Jar). When sorted by tree, all dots below the diagonal are classes that are part of a cycle of dependencies. In a perfect code-base there will be cyclic dependencies and thus no dots below the diagonal. The main purpose of Classycle is to detect cyclic dependencies. You should run Classycle on your code to clearly find and eliminate cycles in your code. When sorting by package, similarity and jar, nodes in the same package/group/jar will be sorted by tree.
Identify base classes
Sort by Used. The most used classes are near the top left. If you see colors in the full height at the left part you have classes that are heavily used from all your classes. If you see many colors in the whole the matrix, then all classes use all other classes.
Identify God classes
Sort by Uses. The classes that use the use the most classes are near the top left.
Find Bacon
Find one or a few classes by zooming or filtering. Then click the Add connected, Add uses or Add used by buttons to show all classes that uses or are used by your starting classes. See how few clicks it takes to connect all your classes from different start classes.

How

Change size of adjacency matrix
The size of the matrix is calculated based on the biggest square that can fit on your browser window, with room for the options buttons.
Show nodes in rectangle
You can click-drag a rectangle to only see nodes overlapping the rectangle. Click-dragging shows all rows overlapping the height of the rectangle, and all columns overlapping the width of the rectangle. Because of this, zooming in areas away from the diagonal give weird results.
Mouse-wheel zoom
You can also use the mouse-wheel to zoom in or out around your mouse pointer. Zooming away from the diagonal is weird because adjacency matrices must have the same rows and columns.
Group by
Switches to a new graph where the nodes have been merged. Two merged nodes are connected when any node in the un-merged nodes are connected.
Filter
Show just the classes that contains your filter text.
Add uses
Add all classes that uses one of the currently showing classes. This button does nothing when showing all classes.
Add used
Add all classes that are used by one of the currently showing classes. This button does nothing when showing all classes.
Order by:
  • Package: Order nodes by their packages. Nodes in the same package are ordered by tree.
  • Similarity: Attempts to make groups of nodes that are highly connected to each other and not very connected to other nodes. The largest group is near the top left. Nodes in the same group are ordered by tree.
  • Tree: If the graph is a tree, then order nodes by breadth-first . If the graph is not a tree, then try its best. Ordering a tree by this will not put any dots below the diagonal. Any dots below the diagonal are nodes that form a circle.
  • Name: Order nodes by their names.
  • Connections: Order nodes by the number of nodes they use plus the number of nodes are used by them. Most connected nodes are near the top left.
  • Used: Order nodes by the number of nodes that are used by them.
  • Uses: Order nodes by the number of nodes they use.
  • jar: Order nodes by which jar they come from. Nodes in the same jar are ordered by tree.
Color by:
  • Package: Give nodes in the same package the same color.
  • Name: Give nodes a distinct color.
  • Connections: Color nodes based on number of nodes they use plus the number of nodes are used by them. Most connected nodes are blue, least connected nodes are black.
  • jar: Give nodes in the same jar the same color.
Pixel size
A large pixel size draws nodes as big circles that are transparent. The smallest pixel size draws nodes as pixels. Note: large pixel sizes can get very laggy on large graphs.
Showing current/maximum classes (Reset)
Tell you how many nodes are currently shown versus how many nodes are in the graph. Reset clears filters and zooms all the way out.
Populate table, Clear table
Populate table creates a table of up to 1000 of the nodes currently shown. Clear table remove the created table.