From 3ce71999e257cde2f9f24746323a2ddc00ab7c18 Mon Sep 17 00:00:00 2001 From: Daniel Schwabeneder Date: Mon, 16 Oct 2017 21:24:13 +0200 Subject: [PATCH] spy recipe: change default color for matrices with unique values --- src/recipes.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/recipes.jl b/src/recipes.jl index 8fb582ae..5501351a 100644 --- a/src/recipes.jl +++ b/src/recipes.jl @@ -937,6 +937,8 @@ end mat = g.args[1] if length(unique(mat[mat .!= 0])) < 2 legend --> nothing + # revert the default gradient to have a darker (almost black) color in the default theme + seriescolor --> cgrad([cgrad()[0], cgrad()[1]]) end n,m = size(mat) Plots.SliceIt, 1:m, 1:n, Surface(mat) @@ -945,7 +947,7 @@ end @recipe function f(::Type{Val{:spy}}, x,y,z) yflip := true aspect_ratio := 1 - + rs, cs, zs = findnz(z.surf) newz = fill(NaN, size(z)...)