# EEGPlot.jl: A package to plot Multivariate Time Series (interactively and statically)

**URL:** https://discourse.julialang.org/t/eegplot-jl-a-package-to-plot-multivariate-time-series-interactively-and-statically/135296
**Category:** Package Announcements
**Tags:** plotting, time-series, makie, eeg
**Created:** [January 27, 2026, 8:03pm UTC](https://discourse.julialang.org/t/eegplot-jl-a-package-to-plot-multivariate-time-series-interactively-and-statically/135296 "2026-01-27T20:03:18Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Marco-Congedo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/marco-congedo/32/7321_2.png) [@Marco-Congedo](https://discourse.julialang.org/u/Marco-Congedo)
#### Post date: [January 27, 2026, 8:03pm UTC](https://discourse.julialang.org/t/eegplot-jl-a-package-to-plot-multivariate-time-series-interactively-and-statically/135296/1 "2026-01-27T20:03:18Z")

</div>

[EEGPlot](https://github.com/Marco-Congedo/EEGPlot.jl) was meant to be a package to plot interactively **EEG data**.

However, I’m just realizing it can be useful to plot other **multivariate time series**.

The example below plays and plots a chirp, allowing to interact like in this GIF:

![Inspecting a sound wave](https://global.discourse-cdn.com/julialang/original/3X/3/d/3d0df75548fe5daca6c45f964ce7a0c0a2fbb9b5.gif)

```julia
using Pkg
Pkg.add("EEGPlot")
Pkg.add("PortAudio")
Pkg.add("GLMakie")

using LinearAlgebra
using PortAudio
using EEGPlot
using GLMakie

function chirp(sr::Int, T::Float64 = 2.0)
    t = range(0, T, step = 1/sr)

    f0, f1 = 220.0, 440.0
    phase = 2π .* (f0 .* t .+ (f1 - f0) .* t.^2 ./ (2T))

    env = sinpi.(t ./ T).^2

    left = env .* sin.(phase)
    right = env .* sin.(phase .+ 0.4)

    M = hcat(left, right)
    M ./= maximum(abs, M)
end

#######################################
sr = 44_100
X = chirp(sr, 2.0)   

# Play the sound
PortAudioStream(0, 2; samplerate = sr) do stream
    write(stream, X)
end

# Plot the waves
eegplot(X, sr, ["Left", "Right"];
        X_title = "Chirp",
        px_per_sec = 3000,
        X_title_font_size = 16,
        X_color = :firebrick,
        X_labels_font_size = 16,
        s_labels_font_size = 16)

```
