omnetpp.scave.chart

Provides access to the properties of the current chart for the chart script.

Note that this module is stateful. It is set up appropriately by the OMNeT++ IDE or opp_charttool before the chart script is run.

Exceptions

ChartScriptError

Raised by chart scripts when they encounter an error.

Functions

get_properties()

Returns the currently set properties of the chart as a dict

get_property(key)

Returns the value of a single property of the chart, or None if there is

get_name()

Returns the name of the chart as a string.

get_chart_type()

Returns the chart type, which is one of the strings "BAR", "LINE", "HISTOGRAM", and "MATPLOTLIB".

is_native_chart()

Returns True if this chart uses the IDE's built-in plotting widgets.

set_suggested_chart_name(name)

Sets a proposed name for the chart. The IDE may offer this name to the user

set_observed_column_names(column_names)

Sets the DataFrame column names observed during the chart script.

Module Contents

exception ChartScriptError[source]

Raised by chart scripts when they encounter an error. A message parameter can be passed to the constructor, which will be displayed on the plot area in the IDE.

get_properties()[source]

Returns the currently set properties of the chart as a dict whose keys and values are both strings.

get_property(key)[source]

Returns the value of a single property of the chart, or None if there is no property with the given name (key) set on the chart.

get_name()[source]

Returns the name of the chart as a string.

get_chart_type()[source]

Returns the chart type, which is one of the strings “BAR”, “LINE”, “HISTOGRAM”, and “MATPLOTLIB”.

is_native_chart()[source]

Returns True if this chart uses the IDE’s built-in plotting widgets.

set_suggested_chart_name(name)[source]

Sets a proposed name for the chart. The IDE may offer this name to the user when saving the chart.

set_observed_column_names(column_names)[source]

Sets the DataFrame column names observed during the chart script. The IDE may use them for content assist when the user edits the legend format string.