Working with traces
Traces are data series depicted in plots. The data can be simulation values or functions based on simulation values. You can add, remove, and rearrange traces.
Traces are used to evaluate a simulation .
Selecting traces
You select a trace by clicking it or clicking its entry in the legend below the plot. You can select multiple traces by shift-clicking or control-clicking them. (Both methods have the same effect.)
Adding and removing traces
When the Waveform Viewer first opens, it contains traces for the signals you have specified when setting up the simulation. You can add more traces or remove traces that you do not need.
To remove a trace, click it in the plot to select it and press the Del key or click the
toolbar button. To delete all traces in the
selected plot
, click
in the toolbar. If you have accidentally deleted one or more traces, you can choose
to undo this action.
You can add different types of traces to the
selected plot
:
To add a signal, double-click it in the
Output Variables
view, select it and click the
Add
button at the bottom of the view, or drag it from that view to the desired plot. The options below the list of signals let you filter it. (If the view is not displayed, click
in the toolbar to show it.)
You can check the
In new X plot
option at the bottom of the view before double-clicking the signal or clicking
Add
to display the trace in a new plot instead of the selected plot. That new plot has an independent (unsynchronized) x-axis.
You can also add a trace using the
command or clicking
in the toolbar. This opens the
Add Trace(s)
dialog where you can select one or – by control- or shift-clicking – multiple signals or variables that are added when you click
OK
.
Choosing
adds all signals and variables from the
Output Variables
view to the selected plot.
If the plot to which you add a trace has multiple y-axes, the traces are added to the
selected y-axis
.
To add a trace based on an equation, click the
Trace Functions
button at the bottom of the
Output Variables
view. This opens the
Evaluate Goal Function
dialog, in which you can enter the desired equation. Click
OK
to display the equation results as a trace in the selected plot. If you are adding traces using the
Add Trace(s)
dialog, you can click
Eval Goal Function
instead.
Similar to adding signal traces ( described above), you can choose
in new X plot
from the list in the bottom right corner of the dialog to place the trace in a new plot with an independent x-axis. In the
Add Trace(s)
dialog, you get the same result by checking
Place in New X Plot
.
Any equations you create are saved as variables in the list in the
Output Variables
view and can be thereafter placed in the same way as signals.
Moving traces
You can move traces between plots:
To move a trace to a different plot, select it and drag it to the desired plot. When you drop it, the y-axes of the target plot is automatically adapted: If necessary, the range of the axis is increased to accommodate the value range of the trace.
To duplicate the trace instead of moving it, hold down the Ctrl key while dragging it to another plot.
You can also move a trace by copying and pasting it, using the
Cut Trace
,
Copy Trace
, and
Paste Trace
commands from the
Trace
menu or the equivalent toolbar buttons
,
, and
. Note that pasted traces are inserted into the
selected plot
.
To collect all traces in one plot, choose
or click
in the toolbar. All traces are collected in a single plot, and the other plots are removed.
To display each trace in a plot of its own, choose
or click
in the toolbar. This creates for each trace a plot with auto-sized y-axis. If you prefer instead to use the y-axis from the original plot in each generated plot, choose
instead. Note that both commands affect all plots in the Waveform Viewer window, not just the selected one.
Modifying the appearance of traces
You can change both the color of the trace and the shape if the marks indicating the simulated or calculated values.
By default, both colors and shapes are assigned automatically. If you want to use different appearances, select the trace and choose
to open the
Trace Properties
dialog. In that dialog can you click
Custom Color
to assign a different color to the trace by clicking on the color swatch or
Custom Mark
to assign a different shape by clicking on the shape symbol.
The chosen color and shape is assigned to the trace when you click OK. If you first check the
Apply to all the same traces
option, all other traces that display the same signal or variable are displayed with the same color and shape.
If you want to revert the color or mark shape of an individual trace to the defaults, open the
Trace Properties
dialog and choose
Current Color Scheme
,
Current Mark Scheme
, or both. If you want to reset the colors or mark shapes of all traces in all plots, choose
,
, or both.
You can toggle the display of the connecting lines in the traces by choosing
. To toggle the display of the marks, choose
. Note that either the lines or the marks must be visible. Therefore, if the lines a re hidden and you choose
Hide Marks
, the lines are automatically displayed, and vice versa.
Renaming traces
It is not possible to rename a trace, but you can give it a display name under which it is listed in the
Output Variables
view. The same display name is also used for labeling traces in plot legends.
To assign a display name, choose
and enter the desired name in the right-hand column beside the signal or variable name.