ModiaPlot_GLMakie.jl

Convenient line plots of ModiaResults with GLMakie
Author ModiaSim
Popularity
0 Stars
Updated Last
2 Years Ago
Started In
June 2021

ModiaPlot_GLMakie

Stable The MIT License

ModiaPlot_GLMakie is part of ModiaSim and provides convenient line plots of simulation results with package GLMakie.

ModiaPlot_GLMakie is typically not directly used, but is activated via package ModiaResult. For details of the installation and the usage, see the ModiaResult documentation.

Example

Once a result data structure result with signals sigA(t), sigB(t), sigC(t), r[3](t):

 # │ 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,

import ModiaResult

# Define plotting software globally
ModiaResult.usePlotPackage("GLMakie") # or ENV["MODIA_PLOT"] = "GLMakie"
                
# Execute "using ModiaPlot_GLMakie"                              
ModiaResult.@usingModiaPlot

then the following command

plot(result, [("sigA", "sigB", "sigC"), "r[2:3]"])

generates the following image (layout and legends are automatically constructed):

SegmentedSignalsPlot

Main developer

Martin Otter, DLR - Institute of System Dynamics and Control

Used By Packages

No packages found.