Skip to content

Commit

Permalink
bug
Browse files Browse the repository at this point in the history
  • Loading branch information
vladdez committed Jan 15, 2025
1 parent 4755863 commit 5a95e53
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/plot_erp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -205,13 +205,19 @@ function add_significance(plot_data, significance, config, sign_type)
posY = stepY * -0.05 + scaleY[1]
Δt = diff(plot_data.time[1:2])[1] # added length of significance polygone

if sign_type == :line
Δy = 0.01 # height of significance polygone
else
Δy = 0.5
stepY = stepY - 3
end
p[!, :segments] = [
Makie.Rect(
Makie.Vec(x, posY + stepY * (Δy * (n - 1))),
Makie.Vec(y - x + Δt, 0.5 * Δy * stepY),
) for (x, y, n) in zip(p.from, p.to, p.signindex)
]

res = data(p) * mapping(:segments) * visual(Poly)
res = data(p) * mapping(:segments) * visual(Poly, alpha = 0.5)
return (res)
end

0 comments on commit 5a95e53

Please sign in to comment.