Plotting
function plot_ate
plot_ate(
ate_results: Union[trajectopy.core.evaluation.ate_result.ATEResult, List[trajectopy.core.evaluation.ate_result.ATEResult]],
plot_settings: trajectopy.core.settings.mpl_settings.MPLPlotSettings = MPLPlotSettings(scatter_cbar_show_zero=True, scatter_cbar_steps=4, scatter_no_axis=False, scatter_max_std=3.0, ate_unit_is_mm=False, hist_as_stairs=False, directed_ate=False, scatter_pos_dim=2)
) → Figure
Plots ATE for the given ATEResult(s) as a line plot using matplotlib. If available, the plot contains the position and rotation deviations. The x-axis depends on the sorting of the trajectory.
Args:
ate_results
(Union[ATEResult, List[ATEResult]]): ATE result(s) to plot.plot_settings
(MPLPlotSettings, optional): Plot settings. Defaults to MPLPlotSettings().
Returns:
Figure
: Figure containing the plot.
function plot_ate_bars
plot_ate_bars(
ate_results: List[trajectopy.core.evaluation.ate_result.ATEResult],
plot_settings: trajectopy.core.settings.mpl_settings.MPLPlotSettings = MPLPlotSettings(scatter_cbar_show_zero=True, scatter_cbar_steps=4, scatter_no_axis=False, scatter_max_std=3.0, ate_unit_is_mm=False, hist_as_stairs=False, directed_ate=False, scatter_pos_dim=2),
mode: str = 'positions'
) → Figure
Plots multiple ATE results as bars for different characteristics (min, max, mean, median, rms, std) using matplotlib.
Args:
ate_result
(List[ATEResult]): List of ATE results.plot_settings
(MPLPlotSettings, optional): Plot settings. Defaults to MPLPlotSettings().mode
(str, optional): Mode to plot. Either 'positions' or 'rotations'. Defaults to 'positions'.
Returns:
Figure
: Bar plot figure.
function plot_ate_edf
plot_ate_edf(
ate_results: Union[trajectopy.core.evaluation.ate_result.ATEResult, List[trajectopy.core.evaluation.ate_result.ATEResult]],
plot_settings: trajectopy.core.settings.mpl_settings.MPLPlotSettings = MPLPlotSettings(scatter_cbar_show_zero=True, scatter_cbar_steps=4, scatter_no_axis=False, scatter_max_std=3.0, ate_unit_is_mm=False, hist_as_stairs=False, directed_ate=False, scatter_pos_dim=2)
) → Figure
Plots ATE EDF for the given ATEResult(s) as a line plot using matplotlib. The EDF (Empirical Distribution Function) shows the cummulative probability of the deviations. Using this plot, one can easily see how many percent of the deviations are below a certain value.
Args:
ate_results
(Union[ATEResult, List[ATEResult]]): ATE result to plot.plot_settings
(MPLPlotSettings, optional): Plot settings. Defaults to MPLPlotSettings().
Returns:
Figure
: Figure containing the plot.
function plot_compact_ate_hist
plot_compact_ate_hist(
ate_result: trajectopy.core.evaluation.ate_result.ATEResult,
plot_settings: trajectopy.core.settings.mpl_settings.MPLPlotSettings = MPLPlotSettings(scatter_cbar_show_zero=True, scatter_cbar_steps=4, scatter_no_axis=False, scatter_max_std=3.0, ate_unit_is_mm=False, hist_as_stairs=False, directed_ate=False, scatter_pos_dim=2)
) → Figure
Plots compact ATE histograms for the given ATEResult. The plot contains histograms for the position deviations and, if available, the rotation deviations.
Args:
ate_result
(ATEResult): ATE result to plot.plot_settings
(MPLPlotSettings, optional): Plot settings. Defaults to MPLPlotSettings().
Returns:
Figure
: Figure containing the plot.
function plot_correlation_heatmap
plot_correlation_heatmap(
estimated_parameters: trajectopy.core.alignment.parameters.AlignmentParameters,
enabled_only: bool = True
) → Figure
Plots the correlation heatmap of the alignment parameters using matplotlib.
Args:
estimated_parameters
(AlignmentParameters): Estimated parameters.enabled_only
(bool, optional): Whether to consider only enabled parameters. Defaults to True.
Returns:
plt.Figure
: Correlation heatmap figure.
function plot_covariance_heatmap
plot_covariance_heatmap(
estimated_parameters: trajectopy.core.alignment.parameters.AlignmentParameters,
enabled_only: bool = True
) → Figure
Plots the covariance heatmap of the alignment parameters using matplotlib.
Args:
estimated_parameters
(AlignmentParameters): Estimated parameters.enabled_only
(bool, optional): Whether to consider only enabled parameters. Defaults to True.
Returns:
plt.Figure
: Covariance heatmap figure.
function plot_rpe
plot_rpe(
rpe_results: List[trajectopy.core.evaluation.rpe_result.RPEResult]
) → Tuple[matplotlib.figure.Figure, matplotlib.figure.Figure]
Plots the RPE results as a line plot with violin plots for the position and rotation deviations.
Depending on the pair distance unit, the unit of the position deviations is either in meters/meters (%) or meters/seconds. The unit of the rotation deviations is respectively in degrees/m or degrees/second.
Args:
rpe_results
(list[RelativeTrajectoryDeviations]): list of RelativeTrajectoryDeviations
Returns:
Tuple[Figure, Figure]
: metric and time RPE plots
function plot_trajectories
plot_trajectories(
trajectories: List[trajectopy.core.trajectory.Trajectory],
dim: int = 2
) → Tuple[matplotlib.figure.Figure, matplotlib.figure.Figure, Optional[matplotlib.figure.Figure]]
Plots the trajectories in 2d or 3d using matplotlib.
Args:
trajectories
(List[Trajectory]): List of trajectories to plot.dim
(int, optional): Dimension of the plot. Defaults to 2.
This function creates one 2D or 3D plot for the xy(z) coordinates of the trajectories, one subplot for the xyz coordinates and one subplot for the rpy angles.
Returns:
Tuple[Figure, Figure, Union[Figure, None]]
: Figures for the position, xyz and rpy plots.
function scatter_ate
scatter_ate(
ate_result: trajectopy.core.evaluation.ate_result.ATEResult,
plot_settings: trajectopy.core.settings.mpl_settings.MPLPlotSettings = MPLPlotSettings(scatter_cbar_show_zero=True, scatter_cbar_steps=4, scatter_no_axis=False, scatter_max_std=3.0, ate_unit_is_mm=False, hist_as_stairs=False, directed_ate=False, scatter_pos_dim=2)
) → Tuple[matplotlib.figure.Figure, matplotlib.figure.Figure]
Plots the ATE results as a scatter plot with color-coded deviations.
Args:
ate_result
(ATEResult): ATE result to plot.plot_settings
(MPLPlotSettings, optional): Plot settings. Defaults to MPLPlotSettings().