diff --git a/src/recipes.jl b/src/recipes.jl index ffa30aac..3ad76b3d 100644 --- a/src/recipes.jl +++ b/src/recipes.jl @@ -1024,9 +1024,13 @@ end @assert length(g.args) == 1 && typeof(g.args[1]) <: AbstractMatrix seriestype := :spy mat = g.args[1] - if length(unique(mat[mat .!= 0])) < 2 + lunique = length(unique(mat[mat .!= 0])) + if lunique == 2 legend --> nothing seriescolor --> cgrad([invisible(), fg_color(plotattributes)]) + elseif lunique < 2 + legend --> nothing + seriescolor --> fg_color(plotattributes) end n,m = size(mat) Plots.SliceIt, 1:m, 1:n, Surface(mat) @@ -1045,7 +1049,7 @@ end markersize := 1.5 end markerstrokewidth := 0 - marker_z := zs + #marker_z := zs label := "" x := cs y := rs