WOLFRAM SYSTEMMODELER TUTORIAL

Simulation CenterPlot Windows

Introduction | Options | Experiment Browser | Plot Windows | 3D Animation | Initializing Experiments | FFT Analysis | Importing and Exporting | Keyboard Shortcuts | Input Variable Data Files | CombiTimeTable File | Simulation Settings Files | Simulation Result Files | Communication with Simulation

The main purpose of Simulation Center is to plot and study the results of a simulation. There are two kinds of plot windows: the Y(T) plot window and the Y(X) plot window. The Y(T) plot window shows how the values of one or more variables change over time, whereas the Y(X) plot window shows how the point (x(t),y(t)) changes over time. The plotted variables may all be from the same experiment or from different experiments. When you move the mouse cursor over a plot window, the current xy coordinate of the cursor is shown in the status bar.

Arranging the Windows

If you have more than one plot window open, you can view all windows at the same time. To display the windows side by side, choose Tile from the Window menu. To arrange the windows so that the title bar of every window is visible, choose Cascade from the Window menu.

Creating a New Plot Window

When creating a new experiment, an empty Y(T) plot window is automatically created. If more plot windows are needed, choose Plot New Y(T) Plot Window or Plot New Y(X) Plot Window in the toolbar to create new plot windows. You can also use the buttons available on the toolbar.

1.gif

The New Y(T) Plot Window and New Y(X) Plot Window buttons.

Creating a New Subplot

An alternative to creating new plot windows is to use a subplot, i.e. create several plots in the same window. To create a new subplot, choose Plot New Subplot or click the New Subplot button on the Plot toolbar.

2.gif

The New Subplot button on the Plot toolbar.

Removing a Subplot

Select the subplot by clicking somewhere in it and choose Plot Remove Subplot or click the Remove Subplot button in the toolbar.

3.gif

The Remove Subplot button in the toolbar.

Zooming In and Out

It is possible to zoom by pressing the mouse button and dragging the mouse inside the window to create a rectangle. When releasing the mouse button, the window will zoom to the specified rectangle. To go back to the previous zoom level, press the Backspace key. Double-clicking within the plot window resets the diagram coordinates to default.

Restricting the Plotted Time Interval

It is possible to restrict the plotted time interval by right-clicking in the plot window and choosing Restrict time interval. The plotted time interval is then controlled by adjusting the slider at the bottom of the plot window. This slider is by default visible in all Y(X) plot windows.

Exporting Plots

To save the contents of the active plot window to a file, choose File Export Plot as Image or File Export Plot as CSV. In the file selector window, choose a location and specify a file name. Images can be saved in BMP, JPEG, or PNG format, while choosing plot as CSV (comma-separated values) will result in a text file.

Storing Plots

The definitions for a plot can be stored in the model, to easily reproduce the same plot from a future simulation. This feature can also be used to make it easier to communicate the plots that are interesting to look at for a specific model. To add a plot to a model, choose Plot Add Plot to Model, or right-click the plot and choose Add Plot to Model.

4.gif

The Add Plot dialog.

In the resulting dialog, you choose in what model to store the plot, a name for the plot, what group you want to store it under, and if it should be a Preferred Plot.

A preferred plot will automatically be plotted when a new experiment is first simulated, and is indicated by a bold name in the Stored Plots widget.

A stored plot that is changed from its stored state (zoom, new variables added, different legends, etc.) will have a * in the window title. If this is the case, there will be additional alternatives in the Plot menu and when right-clicking. Update Plot in Model will update the model with the new state. Reset to Stored will reset the plot window to the configuration stored in the model. Add Plot to Model will add the changed plot under a new name in the model.

Note that stored plots are stored in the model, but the model is only saved to a file by going to Model Center and choosing File Save for the specific model.

Printing Plots

To print the active plot window, choose File Print.

Copying Plots

To copy the contents of the active plot window to the clipboard as an image, choose Edit Copy or right-click in the plot window and choose Copy as Image. To copy the contents of a plot window to the clipboard as tab-delimited data suitable for pasting into, for example, Excel, right-click in the plot window and choose Copy as Data.

Plot Data Setup

To open the Plot Data Setup dialog, choose Plot Plot Data Setup. From this dialog it is possible to plot the same variable from several experiments. First select the experiments of interest in the list of experiments. The Common Variables view will then show the common set of variables in the selected experiments. The experiments do not need to be from the same model; they only have to contain some common variable. Select the variables to plot by checking their Y-Data checkbox and clicking the Add button. This will add one plot for each variable from all of the selected experiments. It is also possible to create Y(X) plots from this dialog by selecting Y(X) from the plot type combo box.

The plot data view in the dialog shows all datasets from the plot. It is possible to remove datasets from the plot by selecting them and pressing the Delete key.

5.gif

The Plot Data Setup dialog.

Plot Properties

To change the properties of a plot, choose Plot Properties or right-click somewhere in the plot window and choose Properties. This will open the Plot Properties dialog.

Axis Properties

To change the axis properties for a plot window, open the Plot Properties dialog and select the appropriate axis tab. For quick access to the axis properties, it is possible to double-click the axis in the plot window. Here you can specify an axis label and set up the axis scale. An automatic label will be generated if the Auto label checkbox is checked. To specify an axis label, uncheck the Auto label checkbox and write the label text in the Label text box.

6.gif

The Plot Properties dialog box with the X Axis tab opened.

If the plot is in a plot window that contains subplots, it is possible to enable Synchronize with subplots. When that is enabled, all scale changes to the selected axis will be propagated to the other subplots.

The Plot Properties dialog box with the X Axis tab opened and the Synchronize with subplots checkbox enabled.

Grid Properties

To change the grid properties for a plot window, open the Plot Properties dialog and select the Grid tab. Here you can turn on and off the different grid lines as well as change their line style and color.

8.gif

The Plot Properties dialog box with Grid tab opened.

Dataset Properties

To change the dataset properties for a plot window, open the Plot Properties dialog and select the Datasets tab. For quick access to the dataset properties, click the legend item for the dataset that you want to edit. Here you can specify line properties for each dataset. To change the same property for multiple datasets, press and hold down the Ctrl key and mark multiple datasets by clicking the desired datasets. To edit the legend text for a dataset, double-click in the Legend column for that dataset. To turn off the legend for a dataset, uncheck the checkbox in the Legend column for that dataset.

9.gif

The Plot Properties dialog box with the Datasets tab opened.

Plot Themes

To apply predefined themes to a plot, click the Plot Themes button on the Plot toolbar or choose Themes in the Plot menu. In the Select Plot Theme dialog that opens, select one of the themes to apply it to the plot.

10.gif

The Plot Themes button on the Plot toolbar.

Removing All Plotted Variables

To remove all plotted variables from a plot window, right-click in the plot window and choose Clear from the popup menu that appears.

Publishing Plots

Using the publisher tool from within Model Center, it is possible to generate documentation for Modelica classes that can be viewed in any web browser; see this section for more information on how to publish classes. Using the publisher tool from within Simulation Center, it is possible to publish plots to accompany the published documentation. To publish the active plot window, choose File Publish Plots. This will open the publisher configuration dialog box.

11.gif

The publisher configuration dialog box.

  • Publishing Root Directory: the directory in which all files and folders generated by the publisher are saved; it should be set to the directory that was used when publishing from Model Center.
  • Target Folder: selects the folder within the publishing root directory where the plot should be published.
  • Target Model: selects which model the plot should be associated with.
  • Title: a custom title for the plot; by default it will be set to a comma-separated list of all the variables in the plot.
  • Show published result in web browser: shows the published model in the default web browser.

Introduction | Options | Experiment Browser | Plot Windows | 3D Animation | Initializing Experiments | FFT Analysis | Importing and Exporting | Keyboard Shortcuts | Input Variable Data Files | CombiTimeTable File | Simulation Settings Files | Simulation Result Files | Communication with Simulation