Skip to content

Commit

Permalink
minor changes in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
vladdez committed Sep 20, 2024
1 parent 87cf547 commit 3d1b902
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 10 deletions.
2 changes: 1 addition & 1 deletion docs/literate/tutorials/erp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ text!(0.98, 0.2, text = "* Confidence\nintervals", align = (:right, :top))
f

# There are two ways to implement it.
# First is using `:stderror = true' after `;`.
# First is using `:stderror = true` after `;`.

results.se_low = results.estimate .- 0.5
results.se_high = results.estimate .+ 0.15
Expand Down
14 changes: 12 additions & 2 deletions docs/literate/tutorials/topoplotseries.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,21 @@ nothing #hide
# `bin_width` - specify the interval between topoplots

bin_width = 80
plot_topoplotseries(df; bin_width, positions = positions)
plot_topoplotseries(
df;
bin_width,
positions = positions,
axis = (; xlabel = "Time windows [s]"),
)

# `bin_num` - specify the number of topoplots

plot_topoplotseries(df; bin_num = 5, positions = positions)
plot_topoplotseries(
df;
bin_num = 5,
positions = positions,
axis = (; xlabel = "Time windows [s]"),
)

# # Categorical and contionous x-values
# By deafult x-value is `time`, but it could be any contionous (i.g. saccade amplitude) or categorical (any experimental variable) value.
Expand Down
3 changes: 2 additions & 1 deletion src/plot_butterfly.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ Plot a Butterfly plot.
- `topo_axis.height::Real = 0.25` \\
Change the height of inlay topoplot.
- `mapping = (;)`\\
For highlighting specific channels.
For highlighting specific channels.\\
Example: `mapping = (; color = :highlight))`, where `:highlight` is variable with appopriate mapping.
**Return Value:** `Figure` displaying Butterfly plot.
Expand Down
7 changes: 1 addition & 6 deletions src/plot_topoplotseries.jl
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ function plot_topoplotseries!(
config = PlotConfig(:topoplotseries)
# overwrite all defaults by user specified values
config_kwargs!(config; kwargs...)

# resolve columns with data
config.mapping = resolve_mappings(to_value(data), config.mapping)
data_copy = deepcopy(to_value(data)) # deepcopy prevents overwriting initial data
Expand Down Expand Up @@ -141,12 +142,6 @@ function plot_topoplotseries!(
colorbar = (; colorrange = colorrange),
)

config_kwargs!(
config,
visual = (; colorrange = colorrange),
colorbar = (; colorrange = colorrange),
)

ax = Axis(
f[1, 1];
(p for p in pairs(config.axis) if p[1] != :xlim_topo && p[1] != :ylim_topo)...,
Expand Down
4 changes: 4 additions & 0 deletions test/test_toposeries1.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ end
plot_topoplotseries(df; bin_num = 5, positions = positions)
end

@testset "toposeries: bin_num" begin
plot_topoplotseries(df; bin_num = 5, positions = positions, axis = (; xlabel = "test"))
end

@testset "toposeries: checking other y value" begin
df.cont = df.time .* 3
plot_topoplotseries(df; bin_num = 5, positions = positions, mapping = (; col = :cont))
Expand Down

0 comments on commit 3d1b902

Please sign in to comment.