1
votes

I want to plot a 3d graph in matlab

By graph I mean in the sense of nodes and edges. I have an adjacency matrix as well as a coordinate matrix for every node. Eventually I would hope to colour these nodes and edges

The gplot function is only 2d. The scatter3 function does not allow for edges.

Any ideas?

3

3 Answers

2
votes

plot3 allows you to plot points and edges in 3D.

1
votes

It's now possible (MATLAB R2016b) to plot a node-link graph in 3d, using the graph class. Example:

g = graph(bucky);
plot(g, 'Layout', 'subspace3');
0
votes

plot3 does not plot graphs, in the sense of nodes and links. I recommend to you igraph, but it scapes of matlab.