Sparse Adjacency Matrix in MATLAB®

How to make Sparse Adjacency Matrixes 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.

Plot Sparsity Pattern

Plot the 60-by-60 sparse adjacency matrix of the connectivity graph of the Buckminster Fuller geodesic dome. This matrix also represents the carbon-60 molecule and a soccer ball.

B = bucky;
spy(B)

fig2plotly(gcf);

Specify Color and Marker

B = bucky;
spy(B,'green')

fig2plotly(gcf);

Specify Marker Size

B = bucky;
spy(B,'red',2)

fig2plotly(gcf);