Creating Plots Using the Variable Browser

You can use the virtual execution results in the Variable Browser to isolate the results for one or more variables, and plot the results.

Note: The Variable Browser can only be used for stand-alone Dymola behavior models.

This task shows you how to:


Before you begin:
  1. Open a model.
  2. Simulate and generate results. Note that Modelica Complete Results must be used. See Behavior Experience User's Guide: Running a Simulation: Simulating and Generating Results on how to display the Variable Browser.

Plot One or Several Variables

You can plot one or several variables.

To plot variables (scalar variables only), do any of the following:
  • To plot one variable in a new plot, from the Variable Browser, right-click the variable and select Plot Selected Variable(s) > New Plot.
    Tip: You can also double-click the variable.
  • To plot several variables in a new plot, from the Variable Browser, multiselect them using Ctrl when clicking, then right-click them and select Plot Selected Variable(s) > New Plot.

If plots are already present, you have those plots as alternatives to New Plot when using the contextual command.

Tips:
  • Using the Plot Numerical Results command: select a watchlist in the tree then, from the Scenario section of the action bar, click Plot Numerical Results .
  • From the tree: double-click a watchlist result in the tree under the Results node.

The variable or variables are displayed in a new plot. An example of one variable:

Tips:
  • You can display the origin of the signal, that is, the title of the corresponding simulation. See About XY Plot.
  • You can rename a plot. See Renaming Plots.
  • You can change the display unit for a curve. See Modifying Curve Options.
  • You can modify the variable used as the abscissa of the plot, see Changing the Abscissa.
  • You can negate a curve. See Negating Curves.
  • To find the signals to plot for an animated 3D shape, you can center the Variable Browser on the corresponding node by selecting the shape, and then, from the context toolbar, click Show in Variable Browser .

Plot the Difference Between Two Variables

You can plot two variables and plot the comparison between these two results.

  1. Plot one variable like in the previous step.


  2. From the Variable Browser, right-click a second variable and select Plot Selected Variable(s) > Plot 1.

    Tip: You can also drag the variable from the Variable Browser and drop in on the Plot 1 window.

    The second variable is added to the first plot.

  3. Right-click the same variable in the Variable Browser, then select Plot Difference With...
    The Plot Difference With... dialog box appears, in which you can select a destination for your plot.
  4. From the Destination for plot, select Plot 1 .
  5. From the Variable Browser window, select the first variable.
    The comparison between these two values is computed and added to Plot 1.

Plot All Simulations for One or Several Variables

You can plot all simulations for one or several variables. Imported simulation results are also included.

To plot all simulation for variables (scalar variables only), do any of the following:
  • To plot, in a new plot, all simulations for one variable, from the Variable Browser, right-click the variable and select Add to Plot from All Simulations > New Plot.
    Tip: You can also double-click the variable.
  • To plot, in a new plot, all simulations for several variables, from the Variable Browser, multiselect them using Ctrl when clicking, then right-click them and select Add to Plot from All Simulations > New Plot.

If plots are already present, you have those plots as alternatives to New Plot when using the contextual command.

All simulations of one or several variables are displayed in a new plot.
Tips:

Apply and Store Plot Preferences

You can customize a plot using preferences displayed in the tree under the Result node. They are saved and used when opening a new session.

  1. Plot the execution results.
  2. Double-click the Watchlist node in the tree.
    The plot appears.
  3. Modify plot options then click OK.
    The plot preferences are displayed in the tree under the Result node.

  4. Close then reopen the model.

The plot preferences are still available in the plot.