Create Plots Using the Simulation Data Inspector
Plots can help showcase important features or trends in your data and allow you to share
your findings with others. The Simulation Data Inspector allows you to select from a variety
of visualization types and layouts and customize plot and signal appearances to present your
data most effectively. This topic uses simulation data generated from a simulation of the
slexAircraftExample model that logs the output of the Actuator Model
block and the
alpha, rad, and
Select a Plot Layout
You can select from three types of layouts under the layout menu in the Simulation Data Inspector.
Basic Layouts offer templates for layouts including up to four subplots.
Overlays have overlay subplots in two corners of a main plot.
Grid layouts create a grid of subplots according to dimensions you specify from
Select the plot layout that best highlights the characteristics of your data. For example, with a basic three-plot layout, you can use the large plot to show a main result and show intermediate signals on the smaller plots.
Moving Between Subplot Layouts
When you plot a signal on a subplot, the Simulation Data Inspector links the signal to the subplot, identifying the subplot with a number. As you move between subplot layouts, the association between the signal and subplot remains, even as the shape or visibility of the subplot may change.
Subplots of Grid layouts follow columnwise numbering, from
1 at the top left subplot to
8 in the bottom left,
64 at the bottom right. The number system is fixed, regardless of
which subplot configuration you select. For example, if you display four subplots in a
2×2 configuration, the bottom right subplot of the configuration
4. The number is
10 because in the largest possible
matrix, that subplot is numbered
10 when you count the subplots in a
Basic Layouts subplots also use the fixed
8×8 columnwise numbering as a base. For example, the top plot in
this three-subplot layout is subplot
1, and the two subplots below it
In this three-subplot layout, the index for the right subplot is
and the indices for the two subplots on the left are
For the Overlays layouts, the index for the main plot is always
1, and the indices for the overlaid plots are
You can choose from several visualizations to use for your data in the Simulation Data Inspector. To view available visualizations, open the Visualization Gallery by clicking Edit View on the layout menu.
You can drag the visualization you want to add to the plot where you want to add it. You can choose a Time Plot, Map, Text Editor, or XY visualization for each subplot in your layout. For more information about using Map and XY visualizations, see
Add a text editor to your plot layout when you want to present conclusions, descriptions, or observations alongside your data. The text editor includes a toolbar for rich text formatting, including:
Customize Time Plot Appearance
After you choose a plot layout, you can customize the appearance of each visualization using the visualization settings menu . The number of menu tabs depends on the visualizations present in your layout. When your layout does not include a Map or XY visualization, the corresponding settings tabs are not shown.
You can customize the appearance of Time Plot visualizations in the Simulation Data Inspector, including choosing custom colors, choosing to show or hide attributes such as the grid or legend, and specifying axes limits. To maximize the area in the visualization available for the plot, you can move the tick marks, tick mark labels, and legend inside the plot or hide them.
The Limits section gives you control over the limits of the t- and y-axes for individual subplots. You may also choose to normalize the y-axis. Except for the t-axis limits, the settings you configure in the Limits section apply to the active subplot. To configure t-axis limits individually for a subplot, unlink the subplot. For more information, see Linked Subplots.
To improve the basic layout plot created in the previous section, change the y-axis limits of the left graph to match those on the right.
q, rad/secplot to view its y-axis limits in the Limits tab.
Actuator Model: 1plot as the active plot.
In the Limits section, change the y-axis limits of the
Actuator Model: 1plot to match the limits of the
You can clear the active subplot or all subplots using the clear subplots menu on the toolbar.
Customize Signal Appearance
The Simulation Data Inspector allows you to modify the color and style of each signal
individually. For each signal, you can select from a palette of standard colors or specify a
custom color with
You can access the line style menu for a signal in the Simulation Data Inspector or in the Simulink® Editor:
In the Simulation Data Inspector, click the graphic representation in the Line column of the work area or the Line row in the Properties pane.
From the Simulink Editor, right-click the logging badge for a signal, and select Properties to open the Instrumentation Properties for the signal. Then, click the graphic representation of the Line.
From the Instrumentation Properties, you can also select subplots where you want to plot the signal. Changes made through the Instrumentation Properties take effect for subsequent simulations.
If a signal is connected to a Dashboard Scope block, you can also modify the signal line style and color through the Dashboard Scope block dialog box. Changes to line style and color made in the Simulink Editor remain consistent for a signal. When you change the line style and color in the Simulation Data Inspector, the signal line style and color do not change in the Simulink Editor.
Line style customization can help emphasize differences between signals in your plot.
For example, change the line style of the
Stick signal to dashed to
visually indicate that it is an ideal, rather than simulated, signal.
Click the Line column for the
Select the dashed option (third in the list).
alpha, rad and
Actuator Model: 1 signals are
very close in color. You can select bold, easily distinguishable colors for all of the
signals in your plot.
Actuator Model: 1signal in the work area.
Click the Line row entry in the Properties pane.
Specify the desired color. This example uses the dark purple (fourth option) in the standard palette.
Shade Signal Regions
You can shade an area of a time plot to draw attention to a region of interest in the plotted data. For example, you can highlight the area around a signal transition. First, add two cursors to the plot area by clicking the arrow next to the Show/hide cursors button and selecting Two cursors.
Next, click the arrow again and configure the Cursor Options to match your requirements. You can specify whether to emphasize or de-emphasize the shaded area, the area to shade relative to the cursors, and the shading color and opacity. You can specify separate color and opacity settings for the Emphasize and De-emphasize options.
For this example, select the De-emphasize and Lead and lag options. Click in the plot area to close the Cursor Options dialog. The gray shading obscures the area outside of the cursors and highlights the signal region between the cursors. Move the cursors to highlight an area of interest, like the first rising edge of the waveform.
You can use the Zoom in Time option to zoom in synchronously on the region of interest. Select Zoom in Time from the Zoom In menu.
Then click and drag to select a time span.
You can use the Snapshot menu to save snapshots of highlighted signal regions. For more information, see Save and Share Simulation Data Inspector Data and Views.
You can rename signals in the Simulation Data Inspector when a more descriptive name can help convey information. Changing a signal name in the Simulation Data Inspector does not affect signal names used in models. You cannot rename bus signals in the Simulation Data Inspector.
To change a signal name, double-click the signal name in the work area or archive, or
edit the Name field in the Properties pane. Change
the name of the
Actuator Model: 1 signal to