I am analyzing a dataset of sparse matrices, and would like to generate
plots of the sparsity patterns using Gadfly.
By reading different posts, I've come up with this approach:
using Gadfly
n = 1000
A = sparse(tril(ones(n,n)))
is, js = findn(A)
draw(PNG("myplot.png",10cm,10cm),
plot(x=is, y=js,
Coord.cartesian(yflip=true,fixed=true),
Guide.xticks(ticks=[0,n]),
Guide.yticks(ticks=[0,n]),
Geom.point,
Theme(discrete_highlight_color=c -> nothing)
))
but generating these plots is still much slower than I'd expect. Also if
the Theme() parameter suggested here
https://github.com/dcjones/Gadfly.jl/issues/555
is not included, then fairly dense sparsity patterns (as in the example)
aren't plotted very well due to antialiasing.
So my question is if anyone else have customized a spy() function to make
it work better for larger matrices? Judging from different posts about the
spy() function exposed by Gadlfy, there's probably a general interest in a
customized binary version, that works well for larger matrices.
It would be great to turn antialiasing of completely, and perhaps customize
the radius of the disc being plotted. Anyone knows how to do that?