ModiaPlot_WGLMakie.jl

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

ModiaPlot_WGLMakie

Stable The MIT License

ModiaPlot_WGLMakie is part of ModiaSim and provides convenient line plots of simulation results with package WGLMakie.

ModiaPlot_WGLMakie 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 WGLMakie selected for plotting,

import ModiaResult

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

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

SegmentedSignalsPlot

Main developer

Martin Otter, DLR - Institute of System Dynamics and Control