UnfoldMakie.jl
Plotting and visualization tools for EEG data, with additional Unfold.jl regression ERP methods. Based on the visualization libraries Makie.jl and AlgebraOfGraphics.jl
Install / Use
/learn @unfoldtoolbox/UnfoldMakie.jlREADME
|Estimation|Visualisation|Simulation|BIDS pipeline|Decoding|Statistics|MixedModelling| |---|---|---|---|---|---|---| | <a href="https://github.com/unfoldtoolbox/Unfold.jl/tree/main"><img src="https://github-production-user-asset-6210df.s3.amazonaws.com/10183650/277623787-757575d0-aeb9-4d94-a5f8-832f13dcd2dd.png" alt="Unfold.jl Logo"></a> | <a href="https://github.com/unfoldtoolbox/UnfoldMakie.jl"><img src="https://github-production-user-asset-6210df.s3.amazonaws.com/10183650/277623793-37af35a0-c99c-4374-827b-40fc37de7c2b.png" alt="UnfoldMakie.jl Logo"></a>|<a href="https://github.com/unfoldtoolbox/UnfoldSim.jl"><img src="https://github-production-user-asset-6210df.s3.amazonaws.com/10183650/277623795-328a4ccd-8860-4b13-9fb6-64d3df9e2091.png" alt="UnfoldSim.jl Logo"></a>|<a href="https://github.com/unfoldtoolbox/UnfoldBIDS.jl"><img src="https://github-production-user-asset-6210df.s3.amazonaws.com/10183650/277622460-2956ca20-9c48-4066-9e50-c5d25c50f0d1.png" alt="UnfoldBIDS.jl Logo"></a>|<a href="https://github.com/unfoldtoolbox/UnfoldDecode.jl"><img src="https://github-production-user-asset-6210df.s3.amazonaws.com/10183650/277622487-802002c0-a1f2-4236-9123-562684d39dcf.png" alt="UnfoldDecode.jl Logo"></a>|<a href="https://github.com/unfoldtoolbox/UnfoldStats.jl"><img src="https://github-production-user-asset-6210df.s3.amazonaws.com/10183650/277623799-4c8f2b5a-ea84-4ee3-82f9-01ef05b4f4c6.png" alt="UnfoldStats.jl Logo"></a>|<a href="https://github.com/unfoldtoolbox/UnfoldMixedModels.jl"><img src="https://github.com/user-attachments/assets/ffb2bba6-3a30-48b7-9849-7d4e7195b297" alt="UnfoldMixedModels.jl logo"></a>|
A toolbox for visualizations of EEG/ERP data and Unfold.jl models.
<p align="center"> <img src="docs/build/assets/UM_plots.gif" width="300" align="right"> </p>Based on two libraries:
- Makie.jl - very flexible visualisation library (Maki-e means "visualisation" on Japanese);
- AlgebraOfGraphics.jl - Makie-based grammar of graphics visualisation library, allowing flexible mapping.
Additionally we provide some specific plots for:
- Unfold.jl - for performing rERP analyses;
But
Unfold.jlis not a dependency and all plotting functions are agnostic to any specific analysis package.
This package offers users high performance, and highly customizable plots.
<img src="https://unfoldtoolbox.github.io/UnfoldMakie.jl/dev/assets/complex_plot.png" width="300" align="right">We currently support 9 general ERP plots:
ERP plots
Butterfly plots
Topography plots
Topography time series
ERP grid
ERP images
Channel images
Parallel coordinates
- Circular topoplots
And 2 Unfold-specific plots:
- Design matrices
- Splines plot
Installing Julia
<details> <summary>Click to expand</summary>The recommended way to install julia is juliaup. It allows you to, e.g., easily update Julia at a later point, but also to test out alpha/beta versions etc.
TLDR: If you don't want to read the explicit instructions, just copy the following command
Windows
AppStore -> JuliaUp, or winget install julia -s msstore in CMD
Mac & Linux
curl -fsSL https://install.julialang.org | sh in any shell
Installing UnfoldMakie.jl
using Pkg
Pkg.add("UnfoldMakie")
Quickstart
using UnfoldMakie
using CairoMakie # backend
using Unfold, UnfoldSim # Fit / Simulation
data, evts = UnfoldSim.predef_eeg(; noiselevel = 12, return_epoched = true)
data = reshape(data, 1, size(data)...) # simulate a single channel
times = range(0, step = 1 / 100, length = size(data, 2))
m = fit(UnfoldModel, @formula(0 ~ 1 + condition), evts, data, times)
plot_erp(coeftable(m))
Contributions
Contributions are very welcome. These can be typos, bug reports, feature requests, speed improvements, new solvers, better code, better documentation.
How to Contribute
You are very welcome to submit issues and start pull requests!
Adding Documentation
- We recommend to write a Literate.jl document and place it in
docs/literate/FOLDER/FILENAME.jlwithFOLDERbeingHowTo,Explanation,TutorialorReference(recommended reading on the 4 categories). - Literate.jl converts the
.jlfile to a.mdautomatically and places it indocs/src/generated/FOLDER/FILENAME.md. - Edit make.jl with a reference to
docs/src/generated/FOLDER/FILENAME.md.
Citation
If you use these visualizations, please cite:
- this is our publication in Journal of Open Source Software on version 0.5.11. We recommend to cite this paper.
- this is DOI of the last version of UM.jl. Cite this or others DOIs if you need to mention specific version of the package.
