New spy implementation

This commit is contained in:
Michael K. Borregaard 2017-10-09 21:19:32 +02:00
parent 7d220f571d
commit 08bdd11410

View File

@ -945,23 +945,21 @@ end
@recipe function f(::Type{Val{:spy}}, x,y,z) @recipe function f(::Type{Val{:spy}}, x,y,z)
yflip := true yflip := true
aspect_ratio := 1 aspect_ratio := 1
rs, cs, zs = findnz(z.surf) rs, cs, zs = findnz(z.surf)
xlim := ignorenan_extrema(cs) newz = fill(NaN, size(z)...)
ylim := ignorenan_extrema(rs)
if plotattributes[:markershape] == :none for i in eachindex(zs)
markershape := :circle newz[rs[i],cs[i]] = zs[i]
end end
if plotattributes[:markersize] == default(:markersize)
markersize := 1 seriestype := :heatmap
end
markerstrokewidth := 0
marker_z := zs
label := ""
x := cs
y := rs
z := nothing
seriestype := :scatter
grid --> false grid --> false
framestyle --> :box
x := x
y := y
z := Surface(newz)
() ()
end end