Skip to content

Commit

Permalink
del chanNum argument
Browse files Browse the repository at this point in the history
  • Loading branch information
vladdez committed Nov 10, 2023
1 parent e0eb9f9 commit 4d6daa1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/plot_erpgrid.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ Plot an ERP image.
- `pos::Vector{Point{2,Float}}`: electrode positions.
## Keyword Arguments
- `chanNum` (Number, `30`) - Number of channels.
- `drawLabels` (bool, `false`) - Draw channels labels over each waveform.
- `times`: (Vector, `1:size(plotData, 2)`) - Vector of size()
Expand All @@ -25,11 +24,12 @@ function plot_erpgrid!(
f::Union{GridPosition,Figure},
plotData::Matrix{<:Real},
pos;
chanNum = 30,
drawLabels = false,
times = 1:size(plotData, 2),
times = -1:size(plotData, 2)-2, #arbitrary strat just for fun
kwargs...,
)
chanNum = size(plotData, 1)
println(size(plotData, 1), " ", size(plotData, 2))
plotData = plotData[1:chanNum, :]
pos = hcat([[p[1], p[2]] for p in pos]...)

Expand Down
15 changes: 10 additions & 5 deletions test/test_erpgrid.jl
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
data, pos = TopoPlots.example_data()
data = data[:, :, 1]

@testset "basic" begin
f = Figure()
plot_erpgrid!(f[1, 1], data, pos)
#times = -0.099609375:0.001953125:1.0

@testset "basic erpgrid: one plot is out of the border" begin
plot_erpgrid(data[1:3, 1:20], pos)
end

@testset "basic erpgrid" begin
plot_erpgrid(data[1:6, 1:20], pos)
end

@testset "basic" begin
plot_erpgrid(data, pos)
@testset "erpgrid with GridPosition" begin
f = Figure()
plot_erpgrid!(f[1, 1], data, pos)
end

0 comments on commit 4d6daa1

Please sign in to comment.