Skip to content

Commit

Permalink
Docs: update plot_butterfly docs (#119)
Browse files Browse the repository at this point in the history
* Update plot_erp.jl

* better docs

* Update plot_erp.jl

added more consistency, couple of dots and removed a repetition. 
And "positions" should be Array not nothing, right?

---------

Co-authored-by: Vladimir Mikheev <[email protected]>
  • Loading branch information
behinger and vladdez authored Nov 28, 2023
1 parent 4f45c26 commit 6599355
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/plot_erp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,14 @@ Plot an ERP plot.
- `categorical_color` (bool, `true`): in case of numeric `:color` column, treat `:color` as continuous or categorical variable.
- `categorical_group` (bool, `true`): in case of numeric `:group` column, treat `:group` as categorical variable by default.
- `topolegend` (bool, `false`): add an inlay topoplot with corresponding electrodes.
- `stderror` (bool, `false`): add an error ribbon, with lower and upper limits based on the `:stderror` column.
- `pvalue` (Array, `[]`): show a pvalue.
- example: `DataFrame(from=[0.1, 0.3], to=[0.5, 0.7], coefname=["(Intercept)", "condition:face"])` - if coefname is not specified, the lines will be black
- example: `DataFrame(from=[0.1, 0.3], to=[0.5, 0.7], coefname=["(Intercept)", "condition:face"])` - if coefname is not specified, the lines will be black.
- `positions` (Array, `[]`): see plot_butterfly.
- `topolegend` (bool, `false`): (see `plot_butterfly`).
Internal-use only:
- `butterfly` (bool, `true`): a butterfly plot instead of an ERP-plot. See `plot_butterfly`
$(_docstring(:erp))
Expand All @@ -34,15 +37,18 @@ plot_erp(plot_data::DataFrame; kwargs...) = plot_erp!(Figure(), plot_data, ; kwa

"""
Plot a butterfly plot
plot_butterfly(plot_data::DataFrame; positions=nothing) =
## kwargs (...; ...):
- `butterfly` (bool, `true`): create a butterfly plot.
- `topolegend` (bool, `true`): show an inlay topoplot with corresponding electrodes.
- `positions` (Array, `[]`): if specified, adds a topoplot as an inset legend to the provided channel positions. Must be the same length as `plot_data`.
To change the colors of the channel lines use the `topoposition_to_color` function.
- `topolegend` (bool, `true`): show an inlay topoplot with corresponding electrodes. Requires `positions` to be provided.
- `topomarkersize` (Real, `10`): change the size of the markers, topoplot-inlay electrodes.
- `topowidth` (Real, `0.25`): change the size of the inlay topoplot width.
- `topoheigth` (Real, `0.25`): change the size of the inlay topoplot height.
- `topopositions_to_color` (function, ´x -> posToColorRomaO(x)´).
- `topopositions_to_color` (function, ´x -> posToColorRomaO(x)´): change the colors of the channel lines.
$(_docstring(:butterfly))
see also [`plot_erp`](@Ref)
Expand Down

0 comments on commit 6599355

Please sign in to comment.