This tutorial demonstrates interactive visualization of space physics data using WebGL-powered plots. Unlike static plots, these visualizations allow you to pan, zoom, and explore your data directly.
Note
Panning and zooming need a running Julia session, so the plot on this page is a static image. To interact, open this tutorial in GitHub Codespaces: run the cell with the Quarto extension (Run Cell) and the figure opens in a new browser tab. If the tab is blocked, open port 9384 from the Ports panel, append /browser-display to the URL, and display the figure again.
Interactive Time Series Plot
This example loads OMNI solar wind data:
Code
usingCDAWebusingWGLMakie, SpacePhysicsMakiet0 ="2008-09-05T10:00:00"t1 ="2008-09-05T22:00:00"# The `cda` string macro provides a convenient way to fetch multiple variables from CDAWeb in a single line.tvars = cda"OMNI_HRO_1MIN/flow_speed, Pressure"f, axs =tplot(tvars, t0, t1)f
---title: "Interactive Space Physics Visualization"subtitle: "Explore data with interactive plots"---This tutorial demonstrates interactive visualization of space physics data using WebGL-powered plots. Unlike static plots, these visualizations allow you to pan, zoom, and explore your data directly.::: {.callout-note}Panning and zooming need a running Julia session, so the plot on this page is a static image. To interact, [open this tutorial in GitHub Codespaces](https://codespaces.new/JuliaSpacePhysics/juliaspacephysics.github.io?quickstart=1): run the cell with the Quarto extension (*Run Cell*) and the figure opens in a new browser tab. If the tab is blocked, open port 9384 from the *Ports* panel, append `/browser-display` to the URL, and display the figure again.:::## Interactive Time Series PlotThis example loads OMNI solar wind data:```{julia}#| include: false# The site is static, where WGLMakie output cannot load; render an image there and keep WGLMakie in Codespaces.ifget(ENV, "CODESPACES", "") !="true"usingWGLMakie, CairoMakie CairoMakie.activate!()end``````{julia}usingCDAWebusingWGLMakie, SpacePhysicsMakiet0 ="2008-09-05T10:00:00"t1 ="2008-09-05T22:00:00"# The `cda` string macro provides a convenient way to fetch multiple variables from CDAWeb in a single line.tvars = cda"OMNI_HRO_1MIN/flow_speed, Pressure"f, axs =tplot(tvars, t0, t1)f```In the codespace, try interacting with the plot:- **Scroll** to zoom in/out- **Click and drag** to pan- **ctrl+click** to reset the view::: {.callout-note}See [SpacePhysicsMakie.jl](https://juliaspacephysics.github.io/SpacePhysicsMakie.jl/dev/speasy/) webpage for an example using [`Speasy.jl`](https://sciqlop.github.io/Speasy.jl/dev/).:::