- In order to create a matrix view, open your graph file (.slg) with the Open View Dialog. Select the view type “Matrix” on the left-hand side of the Open View Dialog window. Then choose the default view template “Matrix” or one of your self-made view templates under “My View Templates” if you have saved view templates beforehand. Generally speaking, the columns and rows of a matrix represent nodes while the matrix fields between these represent edges.
The View Settings section gives you the opportunity to select which node class(es) you would like to select as row and column elements (dropdowns: “Columns (nodes)” and “Rows (nodes)”. In the fields “Row/Column label”, you should select a unique identifying attribute for your nodes, such as name or id number. Furthermore, you can choose which edge class you would like to model in the matrix fields (“Cells (edges)”). In the field “Cell labels”, you can select an attribute of your selected edge class defined in the Metamodel. Note that even if you did not define any edge attributes in your Metamodel, you can select the “_guid”. This is an internally used identification number which is unique for each node or edge instance. Thus, if you are only interested in finding out if an edge exists or not, you can always use the _guid.
In the shown example, we want to know whether two part nodes are connected by an edge. Thus, we select “Part” as node class both for the columns and rows. As label, we choose the attribute “id” as it is unique for each node. Lastly, we select the “All edges” in the cells field and “_guid” as cell label as we do not care about the edge class which connects the part nodes. We rather want to know if there is any connecting edge between them at all.
An excerpt of the resulting matrix is shown below. The _guid can be found in the matrix field between the two part nodes which are connected by an existing edge.
- Open the View Manager and select the node series of your row/column if you want to adapt the visualization of all rows/columns. To highlight just a certain row/column, you can simply click on it in the view. Then go to the properties pad in order to modify the view settings. Have a look at the bottom of this article for a description of all available properties.
- Adjust the properties of the matrix view in the properties pad by selecting the symbol on the top left-hand side of the matrix:
- As soon as you are happy with your customized view, you can save the settings by extracting a view template. Thus, you can reuse it for any graph file. You find your saved view templates under “My View Templates in the Open View Dialog.
Adaptable View Properties
|Graph Elements||Property Name||Description|
|Node||Fill Color||Defines the color of your element|
|Node, Edge||Label Font Color||Defines the color of your label text|
|Node, Edge||Label Font Size||Defines the size of your label|
|Node, Edge||Label Position||Defines the position of your label according to cardinal directions|
|Node, Edge||Label Text||Defines the label text|
|Node, Edge||Tooltip||Defines the text which is showed while hovering over the element with the mouse|
|Diagonal Cell Color||Defines the color of diagonal cells|
|Empty Cell Color||Defines the color of empty cells|
|Influence Direction||Defines the edges that should be visualized depending on how rows and columns influence each other|
|Self Loop Color||Defines the color of entries which are source and target of the same edge|
|Sort Columns by||Defines an attribute for sorting the columns|
|Sort Columns Direction||Defines how columns should be sorted (ascending or descending)|
|Sort Rows by||Defines an attribute for sorting the rows|
|Sort Rows Direction||Defines how rows should be sorted (ascending or descending)|
|Zoom||Defines how big the matrix should be visualized|
|Nodes||Index||Defines at which position the node should appear|
|Nodes, Edges||Label Angle||Defines the angle in which the label text is presented|