From 08bdd11410955d56e4020480047854681aa1f7f3 Mon Sep 17 00:00:00 2001 From: "Michael K. Borregaard" Date: Mon, 9 Oct 2017 21:19:32 +0200 Subject: [PATCH] New spy implementation --- src/recipes.jl | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/src/recipes.jl b/src/recipes.jl index 109b7b05..97352505 100644 --- a/src/recipes.jl +++ b/src/recipes.jl @@ -945,23 +945,21 @@ end @recipe function f(::Type{Val{:spy}}, x,y,z) yflip := true aspect_ratio := 1 + rs, cs, zs = findnz(z.surf) - xlim := ignorenan_extrema(cs) - ylim := ignorenan_extrema(rs) - if plotattributes[:markershape] == :none - markershape := :circle + newz = fill(NaN, size(z)...) + + for i in eachindex(zs) + newz[rs[i],cs[i]] = zs[i] end - if plotattributes[:markersize] == default(:markersize) - markersize := 1 - end - markerstrokewidth := 0 - marker_z := zs - label := "" - x := cs - y := rs - z := nothing - seriestype := :scatter + + seriestype := :heatmap grid --> false + framestyle --> :box + + x := x + y := y + z := Surface(newz) () end