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 Plot{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: May 07, 2024. Website built with Franklin.jl and the Julia programming language.
These docs were autogenerated using Makie: v0.20.10, GLMakie: v0.9.11, CairoMakie: v0.11.12, WGLMakie: v0.9.10