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
- SystemModelPlot is used to plot data produced by simulating system models.
- The model can have the following forms:
-
SystemModel[…] general system model StateSpaceModel[…] state-space model TransferFunctionModel[…] transfer function model AffineStateSpaceModel[…] affine state-space model NonlinearStateSpaceModel[…] nonlinear state-space model DiscreteInputOutputModel[…] discrete input-output model - Plot specifications detail the names and definitions available in simulations and models. Using sim["Plots"] and sim["PlotNames"] allows one to discover these.
- Possible values for "id" include:
-
"identifier" plot or subplot identifier "name" plot name "group/name" plot group and a plot name joined by "/" "group" plot group "variable" variable name - The first match for "id" will be the one used.
- SystemModelPlot[…,{tmin,tmax}] plots from tmin to tmax.
- SystemModelPlot[{model,args},…] generates simulation data using SystemModelSimulate[model,args].
- SystemModelPlot[sim,{{v1,p1,d1},…},…] plots variables vi and sensitivity bounds when parameter pi varies 100di%. »
- SystemModelPlot has the same options as ListLinePlot, with the following additions and changes: [List of all options]
-
AxesLabel Automatic indicate units on axis Mesh None mesh points to draw on each line PlotLegends Automatic use variable names vi ScalingFunctions Automatic how to scale individual coordinates TargetUnits Automatic plot 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 unity explicit y unit {unitx,unity} units for x and y - "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.
-
AlignmentPoint Center the default point in the graphic to align with AspectRatio 1/GoldenRatio ratio of height to width Axes True whether to draw axes AxesLabel Automatic indicate units on axis AxesOrigin Automatic where axes should cross AxesStyle {} style specifications for the axes Background None background color for the plot BaselinePosition Automatic how to align with a surrounding text baseline BaseStyle {} base style specifications for the graphic ClippingStyle None what to draw when lines are clipped ColorFunction Automatic how to determine the coloring of lines ColorFunctionScaling True whether to scale arguments to ColorFunction ContentSelectable Automatic whether to allow contents to be selected CoordinatesToolOptions Automatic detailed behavior of the coordinates tool DataRange Automatic the range of x values to assume for data Epilog {} primitives rendered after the main plot Filling None filling under each line FillingStyle Automatic style to use for filling FormatType TraditionalForm the default format type for text Frame False whether to put a frame around the plot FrameLabel None frame labels FrameStyle {} style specifications for the frame FrameTicks Automatic frame ticks FrameTicksStyle {} style specifications for frame ticks GridLines None grid lines to draw GridLinesStyle {} style specifications for grid lines ImageMargins 0. the margins to leave around the graphic ImagePadding All what extra padding to allow for labels etc. ImageSize Automatic the absolute size at which to render the graphic InterpolationOrder None the polynomial degree of curves used in joining data points IntervalMarkers Automatic how to render uncertainty IntervalMarkersStyle Automatic style for uncertainty elements LabelingFunction Automatic how to label points LabelingSize Automatic maximum size of callouts and labels LabelStyle {} style specifications for labels MaxPlotPoints Infinity the maximum number of points to include Mesh None mesh points to draw on each line MeshFunctions {#1&} how to determine the placement of mesh points MeshShading None how to shade regions between mesh points MeshStyle Automatic the style for mesh points Method Automatic methods to use MultiaxisArrangement None how to arrange multiple axes for data PerformanceGoal $PerformanceGoal aspects of performance to try to optimize PlotHighlighting Automatic highlighting effect for points PlotLabel None overall label for the plot PlotLabels None labels for data PlotLayout "Overlaid" how to position data PlotLegends Automatic use variable names vi PlotMarkers None markers to use to indicate each point PlotRange Automatic range of values to include PlotRangeClipping True whether to clip at the plot range PlotRangePadding Automatic how much to pad the range of values PlotRegion Automatic the final display region to be filled PlotStyle Automatic graphics directives to determine the style of each line PlotTheme $PlotTheme overall theme for the plot PreserveImageOptions Automatic whether to preserve image options when displaying new versions of the same graphic Prolog {} primitives rendered before the main plot RotateLabel True whether to rotate y labels on the frame ScalingFunctions Automatic how to scale individual coordinates TargetUnits Automatic plot in display units from model Ticks Automatic axes ticks TicksStyle {} style specifications for axes ticks
List of all options
Examples
open allclose allBasic 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:
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:
Variable Specification (2)
Time Specification (2)
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)
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:
A legend is automatically shown for plots with multiple variables:
Turn off PlotLegends:
Events can be illustrated with Mesh points:
Use any expressions in plot legends:
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:
TargetUnits (5)
Applications (3)
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:
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:
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