Plot

class Plot

Returned by

AddTag(tag)

Add a specific tag to this step.

Parameters:
tag : str

The tag to be set

ApplySignalsFromParent()

Convenience method to plot all active signals of the parent. All generic signals are used if the parent has no special signal management.

Note:

Signals that are already defined will be overwritten.

Clone()

Call this method if you want to use API-objects in multiple contexts, e.g. if you want to insert a specific test step in multiple blocks.

Returns:

A copy of this object

Return type:

Plot

GetDescription()

Returns the description of the trace analysis element.

Returns:

The description

Return type:

str

GetDetailsConfig()

Returns the sub configuration for detail plots, i.e. those around spots and ranges.

Returns:

The sub configuration for detail plots

Return type:

PlotSubConfig

GetImageSize()

Returns the minimum size of the plot in pixels.

The default sizes are 800x600 (large), 640x480 (medium) and 320x240 (small).

Returns:

list(width, height)

Return type:

list[int]

GetIndex()

Returns the zero based index in the parent.

Returns:

Zero based index

Return type:

int

GetLegendLocation()

Returns the location of the legend.

Returns:

Number between 0 and 10. 12 means legend is hidden.

Return type:

int

GetLineNo()

Returns the trace steps line number within its trace analysis.

Returns:

Line number

Return type:

int

GetName()

Returns the name of the trace analysis element.

Returns:

The name

Return type:

str

GetOverviewConfig()

Returns the sub configuration for the overview plot.

Returns:

The sub configuration for the overview plot

Return type:

PlotSubConfig

GetPlotSignals()

Returns a merged list of all signals of the sub plots.

Returns:

The signals of the plot

Return type:

list[PlotSignalBase]

GetShowYLabels()

Returns whether y labels are shown. There are three different values possible. For the automatic mode (value 2), an y label will be hidden if there is a legend, there is only one y axis for a sub plot, and there are multiple signals assigned to this axis.

Returns:

0 if y labels are always hidden, 1 if y labels are always shown, 2 if the visibility is automatically determined for each axis

Return type:

int

GetSignalNameType()

Returns which kind of name for the signal names is shown in the plot.

Returns:

‘tracestep’, ‘generic’, ‘mapping’, ‘mappingtarget’ or ‘file’

Return type:

str

GetSubPlots()

Returns a list of all sub plots. The list of sub plots can’t be changed. The first and third one are normal sub plots of type “common”. The second plot can be of type “common” or “separate”. If the type is “separate”, for each signal of this sub plot there will be a smaller sub plot.

Returns:

The list of all sub plots

Return type:

list[PlotSubPlot]

GetTags()

Returns the tags set for this step.

Returns:

A (sorted) list of tags

Return type:

list[str]

GetTriggerRangeConfig()

Returns the sub configuration for the trigger range plots.

Returns:

The sub configuration for the trigger range plots

Return type:

PlotSubConfig

GetType()

Returns the type (class name) of the trace step, e.g.

  • ‘Episode’

  • ‘AnalysisBlock’

  • ‘TriggerBlock’

  • ‘Calculation’

  • ‘TemplateBasedTraceStep’

  • ‘TraceAnalysisReference’

  • ‘TraceAnalysisReferenceDeprecated’

Returns:

Type (class name) of the trace step

Return type:

str

GetUuid()

Returns the UUID of the trace step.

Returns:

UUID of the trace step

Return type:

str

GetXLabel()

Returns the label for the x-axis.

Returns:

The label for the x-axis.

Return type:

str

IsContainer()

Checks whether this trace step can contain trace steps.

Returns:

True if it can contain trace steps, else False

Return type:

boolean

IsEnabled()

Checks whether the trace step is enabled.

Returns:

True if trace step is enabled, else False

Return type:

boolean

IsOk()

Returns the internal state of correctness of the trace step.

Returns:

True if no problems were found, else False

Return type:

boolean

IsShowUnits()

Returns whether the units of the signals are shown in the legend.

Returns:

True if the units are shown in the legend.

Return type:

bool

IsVisible()

Checks whether the trace step is visible. This depends on the trace step itself or a parent trace step being disabled.

Returns:

True if trace step is visible, else False

Return type:

boolean

IsXGrid()

Returns whether vertical grid lines are visible.

Returns:

True if visible, else False

Return type:

boolean

RemoveTag(tag)

Remove a specific tag from this step.

Parameters:
tag : str

The tag to be removed

SetDescription(value)

Sets the description of the trace analysis element.

Parameters:
value : str

The new description

SetEnabled(enable)

Enables or disables the trace step (this also affects child trace steps).

Parameters:
enable : boolean

If True, enables the trace step, if False, disables the trace step

SetImageSize(width, height)

Sets the minimum size of the plot in pixels.

The default sizes are 800x600 (large), 640x480 (medium) and 320x240 (small).

Parameters:
width : int

The new width

height : int

The new height

SetLegendLocation(location)

Sets the location where the legend should be placed in the plot.

Parameters:
location : int

Number between 0 and 11, 12 to hide legend

Raises:

ValueError – If location is not a valid parameter

SetName(value)

Sets the name of the trace analysis element.

Parameters:
value : str

The new name

SetShowUnits(show)

Sets whether the units of the signals will be shown in the legend.

Parameters:
show : bool

True if the units should be shown in the legend.

SetShowYLabels(showYLabels)

Sets if y labels are shown.

Parameters:
showYLabels : int

0 if y labels are always hidden, 1 if y labels are always shown, 2 if the visibility is automatically determined for each axis

Raises:

ValueError – If showYLabels is not a valid parameter

SetSignalNameType(signalNameType)

Sets which kind of names for the signals are shown in the plot.

Parameters:
signalNameType : str

‘tracestep’, ‘generic’, ‘mapping’, ‘mappingTarget’ or ‘file’ - ‘tracestep’: name of the signal in the trace step template - ‘generic’: name of the generic signal - ‘mapping’: name of the signal in the mapping view - ‘mappingtarget’: name of mapping target of the signal - ‘file’: name of the signal in the recording file

SetTags(tags)

Set the list of tags for this step. The list of tags will be sorted and stored.

Parameters:
tags : list[str]

The list of tags

SetXGrid(grid)

Sets whether vertical grid lines are visible.

Parameters:
grid : boolean

True to set visible, else False.

SetXLabel(label)

Sets the label for the x-axis.

Parameters:
label : str

The new label for the x-axis.