Skip to content

Commit fb50e40

Browse files
authored
Merge pull request #127 from April-Hannah-Lena/master
fix boxmeasure plots
2 parents 1692b45 + 55d9d52 commit fb50e40

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/PlotsExt.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ end
2828
@recipe function plot!(boxset::BoxMeasure{Box{N,T}}; projection=x->x[1:2]) where {N,T}
2929
xs = Vector{Float32}(undef, 5*length(boxset))
3030
ys = Vector{Float32}(undef, 5*length(boxset))
31-
cs = Vector{Float32}(undef, 5*length(boxset))
31+
cs = Vector{Float32}(undef, length(boxset))
3232
q = projection
3333

3434
for (i, (box, val)) in enumerate(boxset)
3535
c, r = q(box.center), q(box.radius)
3636
lo, hi = c .- r, c .+ r
3737
xs[5*(i-1)+1:5*i] .= (lo[1], hi[1], hi[1], lo[1], NaN)
3838
ys[5*(i-1)+1:5*i] .= (lo[2], lo[2], hi[2], hi[2], NaN)
39-
cs[5*(i-1)+1:5*i] .= (val, val, val, val, NaN)
39+
cs[i] = val
4040
end
4141

4242
seriestype := :shape

0 commit comments

Comments
 (0)