SystemModelPlot

SystemModelPlot[sim]

shows default plots from the SystemModelSimulationData object sim.

SystemModelPlot[sim,"id"]

shows model plot with identifier or name "id".

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

Examples

open allclose all

Basic Examples  (3)

Plot a default model plot from a model simulation:

Plot a model plot from a model simulation:

Choose one of the example models from the analog electrical domain:

Show the model plot:

Scope  (26)

Models  (4)

Plot a default model plot from a SystemModel:

Plot a variable from the simulation of an AffineStateSpaceModel:

Plot all variables from the simulation of a NonlinearStateSpaceModel:

Simulate a DiscreteInputOutputModel:

Plot all simulation results:

Variable Specification  (2)

Plot variables from a model simulation:

Show bounds when varying a parameter:

Show the estimated capacitor voltage variation when varying the frequency by 5%:

Time Specification  (2)

Simulate a model for 10 seconds:

Plot the variable x1 for the whole interval:

If no interval argument is given, the whole simulation interval is plotted:

Plot only a certain interval:

Simulation Specification  (4)

Simulate and plot a model from 0 to 5:

Different simulations can be compared in the same plot:

The plot legends are prepended with the simulation number:

Simulate a model with given initial values and plot the result:

Simulate an oscillating mass on a spring, with a damper acting on the spring:

Compare the oscillation of the mass with the different levels of damping:

Model Plots  (4)

Models can have defined plots:

Get names of the model plots:

Show a model plot:

Find the model plot identifiers:

Show a model plot using its identifier:

Model plots may contain multiple subplots:

Show a model plot:

Model plots may contain groupings of plots:

Groups are indicated by the / separator:

All plots in a group can be plotted at once:

Presentation  (10)

Multiple variables are automatically colored to be distinct:

Use PlotStyle to change the plot colors:

Filling can be used to specify fill regions and styles:

Fill between the two curves:

A legend is automatically shown for plots with multiple variables:

Turn off PlotLegends:

Style legends:

Events can be illustrated with Mesh points:

For multiple simulations:

Use any expressions in plot legends:

Do multiple simulations:

The plot legends show which simulation the curve belongs to:

SystemModelPlot sets the option AxesLabel:

Override by setting AxesLabel:

Wrappers like Style can be used for styling variables:

Set a custom Tooltip:

Plots are shown in display units defined in the model:

Use TargetUnits to choose a different unit:

Options  (6)

PlotLegends  (1)

Use variable names as PlotLegends:

Use variable descriptions:

TargetUnits  (5)

Plot different units in the same plot:

Variables of the same physical dimension are converted to the same unit:

Use "IndividualDisplayUnit" to use the given display unit for each variable:

Use an explicitly given unit:

Plot in a common base unit from the model:

Use the individual base units without converting to a common unit:

Turn off unit handling completely for maximum performance:

Applications  (3)

Do a parameter sweep:

Compare the different simulations to a first-order system:

Find out which of three parameters a model is most sensitive to:

A 5% sensitivity bound on the output shows that "sine.f" has the highest impact:

Show a custom explanatory legend:

Properties & Relations  (5)

SystemModelPlot is related to Plot:

Select the variables you want to plot:

Plot using SystemModelPlot:

Plot using Plot:

SystemModel can define a plot in a model:

Simulate and show the newly defined plot:

Use Plot to show variables of different magnitude in the same plot:

Retrieve results from a simulation:

Scale the rotational angle by a factor of 50 and show it with the rotational velocity:

Simulate a rolling wheel:

Get the and positions of the wheel axis:

Plot the position with a ParametricPlot:

Use SystemModelUncertaintyPlot to plot model variables when parameter values, initial values or inputs are uncertain:

Possible Issues  (1)

When plotting from a simulation, the interval in SystemModelPlot narrows the time interval plotted:

When plotting a model, the interval in SystemModelPlot determines the simulation start and stop time:

Neat Examples  (1)

Simulate a Newton's cradle:

Show the position of each of the five balls:

Wolfram Research (2018), SystemModelPlot, Wolfram Language function, https://reference.wolfram.com/language/ref/SystemModelPlot.html (updated 2022).

Text

Wolfram Research (2018), SystemModelPlot, Wolfram Language function, https://reference.wolfram.com/language/ref/SystemModelPlot.html (updated 2022).

CMS

Wolfram Language. 2018. "SystemModelPlot." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2022. https://reference.wolfram.com/language/ref/SystemModelPlot.html.

APA

Wolfram Language. (2018). SystemModelPlot. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SystemModelPlot.html

BibTeX

@misc{reference.wolfram_2024_systemmodelplot, author="Wolfram Research", title="{SystemModelPlot}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/SystemModelPlot.html}", note=[Accessed: 24-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_systemmodelplot, organization={Wolfram Research}, title={SystemModelPlot}, year={2022}, url={https://reference.wolfram.com/language/ref/SystemModelPlot.html}, note=[Accessed: 24-November-2024 ]}