I am plotting the sparsity of matrix A
by using Plots.spy
, but the plot is not showing the ones values, e.g., A[13,4], A[14,5],A[15,6].
- Can you guide me for the reason?
- Is there a way also to show the non-zero elements in the bottom of the figure as in Matlab?
julia> using Plots
julia> A
15×15 SparseMatrixCSC{Float64, Int64} with 42 stored entries:
0.0137346 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ -0.00123457 ⋅ ⋅ ⋅ ⋅ ⋅
⋅ 0.0137346 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ -0.00123457 ⋅ ⋅ ⋅ ⋅
⋅ ⋅ 0.0137346 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ -0.00123457 ⋅ ⋅ ⋅
⋅ ⋅ ⋅ 1.0 ⋅ ⋅ -1.0 ⋅ ⋅ ⋅ ⋅ ⋅ 1.0 ⋅ ⋅
⋅ ⋅ ⋅ ⋅ 1.0 ⋅ ⋅ -1.0 ⋅ ⋅ ⋅ ⋅ ⋅ 1.0 ⋅
⋅ ⋅ ⋅ ⋅ ⋅ 1.0 ⋅ ⋅ -1.0 ⋅ ⋅ ⋅ ⋅ ⋅ 1.0
⋅ ⋅ ⋅ -1.0 ⋅ ⋅ 1.00302 -0.000705766 -0.000705766 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅
⋅ ⋅ ⋅ ⋅ -1.0 ⋅ -0.000705766 1.00302 -0.000705766 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅
⋅ ⋅ ⋅ ⋅ ⋅ -1.0 -0.000705766 -0.000705766 1.00302 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅
-0.00123457 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ 0.00425693 -0.000705766 -0.000705766 ⋅ ⋅ ⋅
⋅ -0.00123457 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ -0.000705766 0.00425693 -0.000705766 ⋅ ⋅ ⋅
⋅ ⋅ -0.00123457 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ -0.000705766 -0.000705766 0.00425693 ⋅ ⋅ ⋅
⋅ ⋅ ⋅ 1.0 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅
⋅ ⋅ ⋅ ⋅ 1.0 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅
⋅ ⋅ ⋅ ⋅ ⋅ 1.0 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅
spy(A)