zenna
zenna

Reputation: 9176

how to plot 3d graph (network) matlab?

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?

Upvotes: 1

Views: 2317

Answers (3)

Christine Tobler
Christine Tobler

Reputation: 89

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');

Upvotes: 1

Alejandro
Alejandro

Reputation: 1

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

Upvotes: 0

Jacob
Jacob

Reputation: 34601

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

Upvotes: 2

Related Questions