Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add conv measurements option to AnimatedPlotterly #856

Merged
merged 2 commits into from
Oct 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions stonesoup/plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -2128,7 +2128,8 @@ def plot_ground_truths(self, truths, mapping, truths_label="Ground Truth",
self.plotting_function_called = True

def plot_measurements(self, measurements, mapping, measurement_model=None,
resize=True, measurements_label="Measurements", **kwargs):
resize=True, measurements_label="Measurements",
convert_measurements=True, **kwargs):
"""Plots measurements

Plots detections and clutter, generating a legend automatically. Detections are plotted as
Expand All @@ -2151,6 +2152,9 @@ def plot_measurements(self, measurements, mapping, measurement_model=None,
If True, will resize figure to ensure measurements are in view
measurements_label : str
Label for the measurements. Default is "Measurements".
convert_measurements : bool
Should the measurements be converted from measurement space to state space before
being plotted. Default is True
\\*\\*kwargs: dict
Additional arguments to be passed to scatter function for detections. Defaults are
``marker=dict(color="#636EFA")``.
Expand All @@ -2165,7 +2169,8 @@ def plot_measurements(self, measurements, mapping, measurement_model=None,
measurements_set = measurements
plot_detections, plot_clutter = self._conv_measurements(measurements_set,
mapping,
measurement_model)
measurement_model,
convert_measurements)
plot_combined = {'Detection': plot_detections,
'Clutter': plot_clutter} # for later reference

Expand Down