Creating Plots

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: This task only describes basic signal plot creation. For more alternatives, see Modifying Plot Content.

This task shows you how to:


Before you begin: A Variable Browser must be displayed. See any of: Dymola Behavior Modeling User's Guide: Performing a Virtual Execution: Defining a Virtual Execution: Defining Execution Parameters Initial Conditions or Dymola Behavior Modeling User's Guide: Performing a Virtual Execution: Running a Virtual Execution: Executing a Behavior.

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.

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

Tips:
  • To find the signals to plot for a component, a connection, or an animated 3D shape, you can center the Variable Browser on the node corresponding to that item the following way:
    • For a component or a connection, right-click it in the diagram and select Center Tree on Preselected Objects.
      Note: For components, you can always have this option activated if you, from the Variable Browser header, the Show Preferences , activate Automatic Center Tree.
    • For an animated 3D shape, select it, and then, from the context toolbar, click Show in Variable Browser .
  • 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.

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:

Update Plot Results

Provided that you selected the Update plotters after virtual execution preference (from Me > Preferences > App Preferences > 3D Modeling > Systems Modeling and Execution > Dymola Behavior Modeling , the Results tab), the Plot window is updated after a parameter modification and simulation replay.

  1. Perform a virtual execution.
  2. Plot the execution results.
  3. Modify a parameter in the Parameter and Variable Editor.
  4. Perform the virtual execution again.

The results are updated within the existing Plot window.