Skip to content

Plot

LatencyStackedBar #

Class that provides latency stacked bar data.

to_dataframe(xaxis_type='system_time') #

Get latency stacked bar data in pandas DataFrame format.

Parameters:

Name Type Description Default
xaxis_type str

X axis value's type , by default 'system_time'.

'system_time'

Returns:

Type Description
DataFrame

Latency dataframe.

to_stacked_bar_data(xaxis_type='system_time') #

Get stacked bar dict and columns.

Parameters:

Name Type Description Default
xaxis_type str

X axis value's type , by default 'system_time'.

'system_time'

Returns:

Type Description
(dict[str, list[int]], list[str])

Stacked bar dict. Columns (not include 'start time').

Plot #

Facade class for plot.

create_callback_scheduling_plot(target_objects, lstrip_s=0, rstrip_s=0) staticmethod #

Get CallbackSchedulingPlot instance.

Parameters:

Name Type Description Default
target_objects CallbackGroupTypes

CallbackGroupTypes = (Application | Executor | Path | Node | CallbackGroup | Sequence[CallbackGroup]) Instances that are the sources of the plotting.

required
lstrip_s float

Start time of cropping range, 0 by default.

0
rstrip_s float

End point of cropping range, 0 by default.

0

Returns:

Type Description
CallbackSchedulingPlot

create_frequency_histogram_plot(*target_objects) staticmethod #

Get frequency histogram plot instance.

Parameters:

Name Type Description Default
*target_objects CallbackBase | Communication | Publisher | Subscription

Instances that are the sources of the plotting. This also accepts multiple inputs by unpacking.

()

Returns:

Type Description
PlotBase

create_frequency_timeseries_plot(*target_objects) staticmethod #

Get frequency timeseries plot instance.

Parameters:

Name Type Description Default
*target_objects CallbackBase | Communication | Publisher | Subscription

Instances that are the sources of the plotting. This also accepts multiple inputs by unpacking.

()

Returns:

Type Description
PlotBase

create_latency_histogram_plot(*target_objects) staticmethod #

Get latency histogram plot instance.

Parameters:

Name Type Description Default
*target_objects CallbackBase | Communication

Instances that are the sources of the plotting. This also accepts multiple inputs by unpacking.

()

Returns:

Type Description
PlotBase

create_latency_timeseries_plot(*target_objects) staticmethod #

Get latency timeseries plot instance.

Parameters:

Name Type Description Default
*target_objects CallbackBase | Communication

Instances that are the sources of the plotting. This also accepts multiple inputs by unpacking.

()

Returns:

Type Description
PlotBase

create_message_flow_plot(target_path, granularity=None, treat_drop_as_delay=False, lstrip_s=0, rstrip_s=0) staticmethod #

Get MessageFlowPlot instance.

Parameters:

Name Type Description Default
target_path Path

Target path to be plotted.

required
granularity str | None

Granularity of chain with two value; [raw/node], None by default.

None
treat_drop_as_delay bool

If there is a drop, the flow is drawn by connecting it to the next one, False by default.

False
lstrip_s float

Start time of cropping range, 0 by default.

0
rstrip_s float

End point of cropping range, 0 by default.

0

Returns:

Type Description
MessageFlowPlot

create_period_histogram_plot(*target_objects) staticmethod #

Get period histogram plot instance.

Parameters:

Name Type Description Default
*target_objects CallbackBase | Communication | Publisher | Subscription

Instances that are the sources of the plotting. This also accepts multiple inputs by unpacking.

()

Returns:

Type Description
PlotBase

create_period_timeseries_plot(*target_objects) staticmethod #

Get period timeseries plot instance.

Parameters:

Name Type Description Default
*target_objects CallbackBase | Communication | Publisher | Subscription

Instances that are the sources of the plotting. This also accepts multiple inputs by unpacking.

()

Returns:

Type Description
PlotBase

create_response_time_histogram_plot(*target_objects, case='all') staticmethod #

Get response time histogram plot instance.

Parameters:

Name Type Description Default
*target_objects Path

Instances that are the sources of the plotting. This also accepts multiple inputs by unpacking.

()
case str

Response time calculation method, all by default. supported case: [all/best/worst/worst-with-external-latency].

'all'

Returns:

Type Description
PlotBase

create_response_time_stacked_bar_plot(target_object, metrics='latency', case='all') staticmethod #

Get StackedBarPlot instance.

Parameters:

Name Type Description Default
target_object Path

Target path

required
metrics str

Metrics for stacked bar graph. supported metrics: [latency]

'latency'
case str

Response time calculation method, all by default. supported case: [all/best/worst/worst-with-external-latency].

'all'

Returns:

Type Description
StackedBarPlot

create_response_time_timeseries_plot(*target_objects, case='all') staticmethod #

Get response time timeseries plot instance.

Parameters:

Name Type Description Default
*target_objects Path

Instances that are the sources of the plotting. This also accepts multiple inputs by unpacking.

()
case str

Response time calculation method, all by default. supported case: [all/best/worst/worst-with-external-latency].

'all'

Returns:

Type Description
PlotBase

PlotBase #

Plot base class.

figure(xaxis_type, ywheel_zoom, full_legends) abstractmethod #

Get bokeh.plotting.Figure object.

Parameters:

Name Type Description Default
xaxis_type str | None

Type of time for timestamp.

required
ywheel_zoom bool | None

If True, the drawn graph can be expanded in the y-axis direction.

required
full_legends bool | None

If True, all legends are drawn even if the number of legends exceeds the threshold.

required

Returns:

Type Description
Figure

save(export_path, title='', xaxis_type=None, ywheel_zoom=None, full_legends=None) #

Export a graph using the bokeh library.

Parameters:

Name Type Description Default
export_path str

The graph will be saved as a file.

required
title str

Title of the graph, by default ''.

''
xaxis_type str

Type of x-axis of the graph to be plotted. "system_time", "index", or "sim_time" can be specified.

None
ywheel_zoom bool

If True, the drawn graph can be expanded in the y-axis direction by the mouse wheel.

None
full_legends bool

If True, all legends are drawn even if the number of legends exceeds the threshold.

None

Raises:

Type Description
UnsupportedTypeError

Argument xaxis_type is not "system_time", "index", or "sim_time".

show(xaxis_type=None, ywheel_zoom=None, full_legends=None) #

Draw a graph using the bokeh library.

Parameters:

Name Type Description Default
xaxis_type str

Type of x-axis of the graph to be plotted. "system_time", "index", or "sim_time" can be specified.

None
ywheel_zoom bool

If True, the drawn graph can be expanded in the y-axis direction by the mouse wheel.

None
full_legends bool

If True, all legends are drawn even if the number of legends exceeds the threshold.

None

Raises:

Type Description
UnsupportedTypeError

Argument xaxis_type is not "system_time", "index", or "sim_time".

to_dataframe(xaxis_type) abstractmethod #

Get data in pandas DataFrame format.

Parameters:

Name Type Description Default
xaxis_type str

Type of time for timestamp.

required

Returns:

Type Description
DataFrame