Created
December 29, 2015 17:02
-
-
Save mortenpi/24730ed5f1b6de8976a4 to your computer and use it in GitHub Desktop.
Gadfly spy() test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if length(ARGS) != 1 | |
error("Output file name not provided!") | |
end | |
ofile = ARGS[1] | |
println("Writing the plot to: $ofile") | |
using Gadfly | |
M,N = 22,30 | |
matrix = zeros(Float64, (M,N)) | |
for i=1:M, j=1:N | |
matrix[i,j] = abs(i^2 - j^2) | |
end | |
p = spy(matrix) | |
draw(PNG(ofile, 8cm, 8cm), p) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment