Draw Sparse Graph VI
- Updated2023-02-21
- 4 minute(s) read
Draw Sparse Graph VI
Owning Palette: Visualization VIs
Requires: Multicore Analysis and Sparse Matrix Toolkit
Treats the sparse matrix as an adjacency matrix and draws the graph.
Wire data to the Sparse Matrix input to determine the polymorphic instance to use or manually select the instance.
Draw Sparse Graph (DBL)

![]() |
Labels specifies the label strings to display at each vertex. The number of elements in Labels must be equal to the number of rows and columns in Sparse Matrix. By default, LabVIEW does not display any label strings. |
![]() |
Sparse Matrix specifies a square sparse matrix to draw. |
![]() |
X specifies the x-coordinate for each vertex. The number of elements in X must be equal to the number of rows and columns in Sparse Matrix. |
![]() |
Y specifies the y-coordinate for each vertex. The number of elements in Y must be equal to the number of rows and columns in Sparse Matrix. |
![]() |
error in describes error conditions that occur before this node runs. This input provides standard error in functionality. |
![]() |
Z specifies the z-coordinate for each vertex. The number of elements in Z must be equal to the number of rows and columns in Sparse Matrix. By default, LabVIEW assumes the values of Z are zeros. |
![]() |
Sparse Graph Plot returns a reference to a 3D scene object. Wire this output to the 3D picture control to view the graph of Sparse Matrix. |
![]() |
error out contains error information. This output provides standard error out functionality. |
Draw Sparse Graph (SGL)

![]() |
Labels specifies the label strings to display at each vertex. The number of elements in Labels must be equal to the number of rows and columns in Sparse Matrix. By default, LabVIEW does not display any label strings. |
![]() |
Sparse Matrix specifies a square sparse matrix to draw. |
![]() |
X specifies the x-coordinate for each vertex. The number of elements in X must be equal to the number of rows and columns in Sparse Matrix. |
![]() |
Y specifies the y-coordinate for each vertex. The number of elements in Y must be equal to the number of rows and columns in Sparse Matrix. |
![]() |
error in describes error conditions that occur before this node runs. This input provides standard error in functionality. |
![]() |
Z specifies the z-coordinate for each vertex. The number of elements in Z must be equal to the number of rows and columns in Sparse Matrix. By default, LabVIEW assumes the values of Z are zeros. |
![]() |
Sparse Graph Plot returns a reference to a 3D scene object. Wire this output to the 3D picture control to view the graph of Sparse Matrix. |
![]() |
error out contains error information. This output provides standard error out functionality. |
Draw Sparse Graph Details
The following table lists the support characteristics of this VI.
| Supported on RT targets | No |
An adjacency matrix is the matrix representation of a graph. The n-by-n adjacency matrix corresponds to a graph on n vertices. The matrix element at the (i, j) position corresponds to the graph edge from vertices i to j. A zero matrix element usually means that no connection exists between two vertices.
The following figure shows a graph with six vertices and 11 edges.
Suppose that the edges in the graph are undirected and not weighted. The following symmetric matrix illustrates the corresponding adjacent matrix.
Example
Refer to the Visualize Sparse Matrices VI in the labview\examples\Multicore Analysis and Sparse Matrix\Sparse Matrix directory for an example of using the Draw Sparse Graph VI.






