spy
spy(x::Range, y::Range, z::AbstractSparseArray)
Visualizes big sparse matrices. Usage:
N = 200_000
x = sprand(Float64, N, N, (3(10^6)) / (N*N));
spy(x)
# or if you want to specify the range of x and y:
spy(0..1, 0..1, x)
Attributes
Available attributes and their defaults for Combined{Makie.spy}
are:
colormap :viridis
colorrange MakieCore.Automatic()
colorscale identity
framecolor :black
framesize 1
inspectable true
marker MakieCore.Automatic()
markersize MakieCore.Automatic()
visible true
Examples
using CairoMakie, SparseArrays
N = 100 # dimension of the sparse matrix
p = 0.1 # independent probability that an entry is zero
A = sprand(N, N, p)
f, ax, plt = spy(A, markersize = 4, marker = :circle, framecolor = :lightgrey)
hidedecorations!(ax) # remove axis labeling
ax.title = "Visualization of a random sparse matrix"
f
© Makie.jl. Last modified: October 31, 2023. Website built with Franklin.jl and the Julia programming language.
These docs were autogenerated using Makie: v0.19.12, GLMakie: v0.8.12, CairoMakie: v0.10.12, WGLMakie: v0.8.16