dstl / Stone-Soup

A software project to provide the target tracking community with a framework for the development and testing of tracking algorithms.
https://stonesoup.rtfd.io
MIT License
406 stars 134 forks source link

Add animated variation of plotterly #789

Closed mharris-dstl closed 1 year ago

mharris-dstl commented 1 year ago

Added a new class called "AnimatedPlotterly" that has the same usage as "Plotterly", but is animated so the user can see how tracking works through time. I have changed the tutorials so that they now use this class as a plotter rather than Plotterly.

apiszcz commented 1 year ago

Animations appreciated.

FYI: QGIS (qgis.org) has a time enabled animator, and https://github.com/mitre/QgisTDC is also useful to visualize spatial data with time.

gawebb-dstl commented 1 year ago

The plots look good. If it isn't too much effort to implement but could you use a default value for timesteps. This would instead pull all the timestamps from the various states that you plot. This could similar to AnimationPlotter and #751

mharris-dstl commented 1 year ago

Additions: plot now rescales when uncertainty ellipses or particles are present (didn't before). Changed how resize works slightly. Improved association between legend and things that get plotted - fixed issue where 'turning off' tracks and groundtruth in the legend (by clicking on the specific legend item) didn't apply to ground truth and tracks that were yet to be present in the simulation.

mharris-dstl commented 1 year ago

Other additions: implemented suggested changes by gawebb. Have agreed with gawebb that using default value for timesteps isn't currently necessary as work required to implement would outstrip the benefits gained.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 89.77% and project coverage change: -0.37 :warning:

Comparison is base (bf40a9a) 94.87% compared to head (55c9793) 94.50%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #789 +/- ## ========================================== - Coverage 94.87% 94.50% -0.37% ========================================== Files 176 176 Lines 9757 10070 +313 Branches 1938 2011 +73 ========================================== + Hits 9257 9517 +260 - Misses 356 393 +37 - Partials 144 160 +16 ``` | Flag | Coverage Δ | | |---|---|---| | integration | `68.66% <87.53%> (+0.37%)` | :arrow_up: | | unittests | `89.95% <84.02%> (+0.04%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dstl#carryforward-flags-in-the-pull-request-comment) to find out more. | [Impacted Files](https://app.codecov.io/gh/dstl/Stone-Soup/pull/789?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dstl) | Coverage Δ | | |---|---|---| | [stonesoup/plotter.py](https://app.codecov.io/gh/dstl/Stone-Soup/pull/789?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dstl#diff-c3RvbmVzb3VwL3Bsb3R0ZXIucHk=) | `87.51% <89.77%> (-2.53%)` | :arrow_down: | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/dstl/Stone-Soup/pull/789/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dstl)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.