# Multi-NETVIS: Visual Analytics for Multivariate Network
## 4 Research Methods
### Spatial Transformation Based on the Stability of the Network Structure  
Computing each network layout may lead to changes in the relative positions of the network nodes, which is unhelpful for identifying the analysis target in multiple layouts. In order to maintain the relative positions of nodes in the three different dimension layouts, we propose a multi-dimensional spatial transformation method for layout transformation. The method generates a network layout according to the original layout position instead of recalculating each layout. The layout transformation process includes three steps: projection, rotation, and scaling. As shown in Figure 2, it contains two types of node attributes and two types of edge attributes. Layout transformation can be performed using the node type and edge type. First, the network projects the topology to the \(XOY\) plane based on the original structure in the 3D layout. According to graphing principles, the coordinates of the nodes are calculated as follows:  
\[A_{t}=T_{p}\cdot\left( \begin{array}{c}x\\ y\\ z\\ 1\end{array} \right)=\left( \begin{array}{cccc}1&0&0&0\\ 0&1&0&0\\ 0&0&0&0\\ 0&0&0&1\end{array} \right)\cdot\left( \begin{array}{c}x\\ y\\ z\\ 1\end{array} \right)=\left( \begin{array}{c}x\\ y\\ 0\\ 1\end{array} \right) \tag{1}\]  
where \(T_{p}\) is the projection matrix and the 2D layouts of the two communities are obtained through projection transformation. Second, we rotate the projected topology from the \(XOY\) plane to the \(XOZ\) plane, for which the calculation is as follows:  
\[A_{r} =T_{r}\cdot A_{t}\] \[=\left( \begin{array}{cccc}1&0&0&0\\ 0&\text{cos}\theta&\text{sin}\theta&0\\ 0&-\text{sin}\theta&\text{cos}\theta&0\\ 0&0&0&1\end{array} \right)\cdot\left( \begin{array}{c}x\\ y\\ 0\\ 1\end{array} \right)=\left( \begin{array}{c}x\\ \cos\theta\cdot y\\ \sin\theta\cdot y\\ 1\end{array} \right) \tag{2}\]  
Figure 1: The schematic workflow of our system. where \(T_{r}\) is the rotation matrix and the value of \(\theta\) is \(\frac{1}{2}\pi\). Third, we scale the topology obtained from the previous step and gather the discrete nodes in proportion to ensure that the topology exists on a set of parallel \(XOZ\) planes. A method called the context preserving layout is used to solve the problem of overlap with the network nodes; this projects multiple networks in the 3D space into the 2D plane while preserving their topological structure and connection relationships. In the 2D plane, where the nodes are laid out in a circle, the node radius is defined as \(r\). The nodes overlap when the distance \(d\) between nodes is less than \(2r\). The nodes that overlap with node \(i\) are the set \(N_{0}\), with repulsive force calculated as follows:  
\[F_{i}=\sum_{j\in N_{o}}\frac{p_{j}-p_{i}}{\left\|p_{j}-p_{i}\right\|} \tag{3}\]  
Therefore, the coordinate of node \(i\) is adjusted according to the repulsion force, calculates as follows:  
\[\left\{ \begin{array}{l}x^{\prime}=\cos\theta\cdot d+x\\ y^{\prime}=\sin\theta\cdot d+y\end{array} \right. \tag{4}\]  
where \(\theta\) is the included angle between directions \(F_{i}\) and \(+x\). The 2.5D layout is carried out based on the network structure obtained by the above transformation, and the values of \(Y\) are determined according to the attribute values. Because nodes are in different communities, we assign values of \(Y\) for the nodes in each community to ensure that nodes with the same attribute value are laid out on the same plane. When multiple communities are drawn across layers, the occlusion crossover of community-associated edges needs to be considered. In this study, an optimal ranking method based on the minimum cross-layer coefficient is proposed to determine the hierarchical order of community in 2.5-dimensional layout. The order of each community is random by default, and the distance between community \(c_{i}\) and \(c_{j}\) can be defined as \(d=\left|j-i\right|-1\).