| Products & Services | Industries | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → MATLAB |
| Contents | Index |
| Learn more about MATLAB |
gplot(A,Coordinates)
gplot(A,Coordinates,LineSpec)
The gplot function graphs a set of coordinates using an adjacency matrix.
gplot(A,Coordinates) plots a graph of the nodes defined in Coordinates according to the n-by-n adjacency matrix A, where n is the number of nodes. Coordinates is an n-by-2 matrix, where n is the number of nodes and each coordinate pair represents one node.
gplot(A,Coordinates,LineSpec) plots the nodes using the line type, marker symbol, and color specified by LineSpec.
For two-dimensional data, Coordinates(i,:) = [x(i) y(i)] denotes node i, and Coordinates(j,:) = [x(j)y(j)] denotes node j. If node i and node j are connected, A(i,j) or A(j,i) is nonzero; otherwise, A(i,j) and A(j,i) are zero.
To draw half of a Bucky ball with asterisks at each node,
k = 1:30; [B,XY] = bucky; gplot(B(k,k),XY(k,:),'-*') axis square

Tree Operations for related functions
![]() | gmres | grabcode | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |