WSMPlot

WSMPlot[sd]
shows preferred plots from the WSMSimulationData object sd.

WSMPlot[sd,"name"]
shows stored plot "name" from the WSMSimulationData object sd.

WSMPlot[sd,{"v1","v2",}]
generates a plot of the variables vi.

WSMPlot[sd,{"v1","v2",},{tmin,tmax}]
generates a plot from tmin to tmax.

WSMPlot[{sd1,sd2,},]
plots variables from several WSMSimulationData objects.

WSMPlot["mmodel",]
plots from a new simulation of "mmodel".

DetailsDetails

  • WSMPlot[{"mmodel",args},] generates simulation data using WSMSimulate["mmodel",args].
  • WSMPlot[conn,] takes simulation data from a WSMSimulationConnection.
  • WSMPlot[sd,{{"v1","p1",di},},] plots variables vi and sensitivity bounds when parameter pi varies 100di%. »
  • The shortest unique model name mmodel can be used where WSMNames["*.mmodel"] gives a unique match.
  • A list of stored plots for WSMSimulationData sd is available with sd["PlotNames"].
  • WSMPlot has the same options as ListLinePlot.
  • WSMPlot defaults to PlotLegends->Automatic and uses variable names vi in the legend.
  • 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.

ExamplesExamplesopen allclose all

Basic Examples  (5)Basic Examples  (5)

Load Wolfram SystemModeler Link:

In[1]:=
Click for copyable input

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]=

Simulate a model for 10 seconds:

In[1]:=
Click for copyable input

Plot the variable x1 for the whole interval:

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

Different simulations can be compared in the same plot:

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

The tooltip is prepended with the simulation number:

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