https://github.com/modiasim/modiaplot_glmakie.jl
Convenient line plots of ModiaResults with GLMakie
https://github.com/modiasim/modiaplot_glmakie.jl
Last synced: 4 months ago
JSON representation
Convenient line plots of ModiaResults with GLMakie
- Host: GitHub
- URL: https://github.com/modiasim/modiaplot_glmakie.jl
- Owner: ModiaSim
- License: mit
- Created: 2021-06-07T12:48:49.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2022-02-03T13:52:23.000Z (over 4 years ago)
- Last Synced: 2025-05-21T01:43:03.880Z (about 1 year ago)
- Language: Julia
- Size: 211 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# ModiaPlot_GLMakie
[](https://modiasim.github.io/ModiaResult.jl/stable/index.html)
[](https://github.com/ModiaSim/ModiaResult.jl/blob/master/LICENSE.md)
ModiaPlot_GLMakie is part of [ModiaSim](https://modiasim.github.io/docs/)
and provides convenient line plots of simulation results with package
[GLMakie](https://github.com/JuliaPlots/GLMakie.jl).
ModiaPlot_GLMakie is typically not directly used, but is activated via package
[ModiaResult](https://github.com/ModiaSim/ModiaResult.jl).
For details of the installation and the usage,
see the [ModiaResult documentation](https://modiasim.github.io/ModiaResult.jl/stable/index.html).
## Example
Once a result data structure `result` with signals `sigA(t), sigB(t), sigC(t), r[3](t)`:
```julia
# │ name unit nTime signalType valueSize eltype
───┼─────────────────────────────────────────────────────────────
1 │ time 2 Independent () Float64
2 │ sigA m 88 Continuous () Float64
3 │ sigB m s^-1 151 Continuous () Float64
4 │ sigC m N 16 Clocked () Float64
5 │ r m 72 Continuous (3,) Vector{Float64}
```
is available and `GLMakie` selected for plotting,
```julia
import ModiaResult
# Define plotting software globally
ModiaResult.usePlotPackage("GLMakie") # or ENV["MODIA_PLOT"] = "GLMakie"
# Execute "using ModiaPlot_GLMakie"
ModiaResult.@usingModiaPlot
```
then the following command
```julia
plot(result, [("sigA", "sigB", "sigC"), "r[2:3]"])
```
generates the following image (layout and legends are automatically constructed):

## Main developer
[Martin Otter](https://rmc.dlr.de/sr/en/staff/martin.otter/),
[DLR - Institute of System Dynamics and Control](https://www.dlr.de/sr/en)