Sparse matrix pattern?

Is there a Plots command similar to MATLAB’s spy command to plot the sparsity pattern of a sparse matrix?

Yes, it’s called spy


Ah. I had tried spy, but my original matrix was dense, so I just needed to do:

using SparseArrays

Great that it is a scatter plot, so that I can change the default dot size by

spy(sparse(A), ms=5)
1 Like