SystemModelPlot

SystemModelPlot[sim]

shows preferred plots from the SystemModelSimulationData object sim.

SystemModelPlot[sim,"name"]

shows stored plot "name".

SystemModelPlot[sim,{"v1","v2",}]

generates a plot of the variables vi in sim.

SystemModelPlot[{sim1,sim2,},]

plots variables from several simulations.

SystemModelPlot[model,]

plots from a new simulation of "model".

Details and Options

  • SystemModelPlot[,{tmin,tmax}] plots from tmin to tmax.
  • SystemModelPlot[{model,args},] generates simulation data using SystemModelSimulate[model,args].
  • The model can be a SystemModel object, a full model name string or a shortened model name accepted by SystemModel.
  • SystemModelPlot[sim,{{"v1","p1",di},},] plots variables vi and sensitivity bounds when parameter pi varies 100di%. »
  • A list of stored plots for SystemModelSimulationData sim is available with sim["PlotNames"].
  • SystemModelPlot has the same options as ListLinePlot, with the following additions and changes:
  • AxesLabelAutomaticindicate units on axis
    MeshNonemesh points to draw on each line
    PlotLegendsAutomaticuse variable names vi
    TargetUnitsAutomaticplot in display units from model
  • Events in a simulation are indicated in a plot with Mesh->"Events". »
  • Possible settings for TargetUnits include:
  • "DisplayUnit"display units converted to common units
    "IndividualDisplayUnit"display units without conversion
    "Unit"base units converted to common units
    "IndividualUnit"base units without conversion
    unitexplicit unit
  • "Unit" and "DisplayUnit" attempt to convert compatible quantities to a common unit.
  • "DisplayUnit" and "IndividualDisplayUnit" convert to a unit specified in the model for plot purposes.

Examples

open allclose all

Basic Examples  (4)

Plot a preferred stored plot from a model simulation:

In[1]:=
Click for copyable input
Out[1]=

Plot a stored plot from a model simulation:

In[1]:=
Click for copyable input
Out[1]=

Different simulations can be compared in the same plot:

In[1]:=
Click for copyable input

The tooltip is prepended with the simulation number:

In[2]:=
Click for copyable input
Out[2]=

Randomly choose one of the example models from the analog electrical domain:

In[1]:=
Click for copyable input
Out[1]=

Show the stored plot for the model:

In[2]:=
Click for copyable input
Out[2]=

Scope  (20)

Options  (6)

Applications  (3)

Properties & Relations  (4)

Neat Examples  (1)

See Also

SystemModelSimulationData  SystemModelSimulate  Plot  ParametricPlot  SystemModel  SystemModelExamples

Tutorials

Introduced in 2018
(11.3)