image thumbnail

MATLAB Plot Gallery - Graph Plot

by

 

24 Feb 2012 (Updated )

Create a graph plot

Graph_Plot

This is an example of how to create a graph plot in MATLAB®.

Read about the gplot function in the MATLAB documentation.

For more examples, go to MATLAB Plot Gallery

% Create the onnectivity graph of the Buckminster Fuller geodesic dome
[B, V] = bucky;
H = sparse(60, 60);
k = 31:60;
H(k, k) = B(k, k);

% Visualize the graph using the gplot function (blue)
figure
gplot(B - H, V, 'b-')
hold on

% Visualize a rotation of the graph (red)
gplot(H, V, 'r-')
axis off equal

Contact us