From 5a95e53c020a4a3d1a59a0eee4ae76dde2a4b0d4 Mon Sep 17 00:00:00 2001 From: Vladimir Mikheev Date: Wed, 15 Jan 2025 11:42:38 +0100 Subject: [PATCH] bug --- src/plot_erp.jl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/plot_erp.jl b/src/plot_erp.jl index 708b3fbd1..5c7b89518 100644 --- a/src/plot_erp.jl +++ b/src/plot_erp.jl @@ -205,6 +205,12 @@ 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))), @@ -212,6 +218,6 @@ function add_significance(plot_data, significance, config, sign_type) ) 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