Plotter Metric

class stonesoup.metricgenerator.plotter.TwoDPlotter(track_indices: Tuple[int, int], gtruth_indices: Tuple[int, int], detection_indices: Tuple[int, int], uncertainty: bool = False, particle: bool = False)[source]

Bases: stonesoup.metricgenerator.base.PlotGenerator

MetricManager for the plotting data

Plots of Track, Detection and GroundTruthPath objects in two dimensions.

Parameters
  • track_indices (Tuple[int, int]) – Elements of track state vector to plot as x and y

  • gtruth_indices (Tuple[int, int]) – Elements of ground truth path state vector to plot as x and y

  • detection_indices (Tuple[int, int]) – Elements of detection state vector to plot as x and y

  • uncertainty (bool, optional) – If True the plot includes uncertainty ellipses

  • particle (bool, optional) – If True the plot includes particles

track_indices: Tuple[int, int]

Elements of track state vector to plot as x and y

gtruth_indices: Tuple[int, int]

Elements of ground truth path state vector to plot as x and y

detection_indices: Tuple[int, int]

Elements of detection state vector to plot as x and y

uncertainty: bool

If True the plot includes uncertainty ellipses

particle: bool

If True the plot includes particles

compute_metric(manager, *args, **kwargs)[source]

Compute the metric using the data in the metric manager

Parameters

manager (MetricManager) – Containing the data to be used to create the metric(s)

Returns

Contains a matplotlib figure

Return type

TimeRangePlottingMetric

plot_tracks_truth_detections(tracks, groundtruth_paths, detections, uncertainty=False, particle=False)[source]

Plots tracks, truths and detections onto a 2d matplotlib figure

Parameters
  • tracks (set of Track) – Objects to be plotted as tracks

  • groundtruth_paths (set of GroundTruthPath) – Objects to be plotted as truths

  • detections (set of Detection) – Objects to be plotted as detections

  • uncertainty (bool) – If True, function plots uncertainty ellipses.

  • particle (bool) – If True, function plots particles.

Returns

Contains the produced plot

Return type

TimeRangePlottingMetric