# gplot

## Purpose

Plot a graph theoretic graph.

## Synopsis

    gplot(A,xy)
    gplot(A,xy,lc)

## Description

`gplot(A,xy)` plots the graph specified by `A` and `xy`. A graph, G, is a set of nodes numbered from 1 to n, and a set of connections, or edges, between them. In order to plot G, two matrices are needed. The adjacency matrix, `A`, has `A(i`,`j)` nonzero if node ``i is connected to node `j`. The coordinates array, `xy`, is an `n`-by-2 matrix with the position for node `i` in the `i`-th row, `xy(i,:)` `= [x(i) y(i)]`.

`gplot(A,xy,lc)` uses a specified line type and color instead of the default, solid red lines. See `plot` for a description of valid line types.

## Examples

To draw the graph of half of a Bucky ball:

    [B,xy] = bucky;
    gplot(B(1:30,1:30),xy(1:30,:))
    axis([-1.25  1.25  -1.25  1.25])

## ``See Also

    plot, spy,

(c) Copyright 1994 by The MathWorks, Inc.