Merge pull request #1155 from mkborregaard/newspy

RFC: New spy implementation
This commit is contained in:
Michael Krabbe Borregaard 2017-10-11 09:01:58 +02:00 committed by GitHub
commit b71cfce105

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