Network Graphs in MATLAB®

How to make Network Graphs plots in MATLAB® with Plotly.


Plotly is known for its graphing libraries, but it's also a broader ecosystem for building interactive data apps, AI data analysis tools, and deploying and hosting Dash apps. Explore the full set of tools and platforms designed to help turn data into action. Discover Plotly.

Note: We are retiring documentation for R, MATLAB, Julia, and F#. Learn more about this change here.

Graphing Network Graphs with Adjacency Matrices

    [B, V] = bucky;
    H = sparse(60, 60);
    k = 31:60;
    H(k, k) = B(k, k);

    fig = figure;
    gplot(B - H, V, 'b-');
    hold on;

    gplot(H, V, 'r-');
    axis off equal;

    fig2plotly(fig);