-
Notifications
You must be signed in to change notification settings - Fork 12
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
Plotting wrappers: Head Trajectory #394
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #394 +/- ##
=======================================
Coverage 99.80% 99.81%
=======================================
Files 14 16 +2
Lines 1025 1080 +55
=======================================
+ Hits 1023 1078 +55
Misses 2 2 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some stylistic comments here from me.
As for testing, I'll copy what I put in our chat here so it's visible for everyone:
You can't really test "images" per se, so I'd follow the advice of the StackOverflow hive mind like in this article here: use trajectory
to create a figure on some (small) custom dataset, then examine the data stored in the returned Figure
object.
Maybe make a DataArray with 3 keypoints (left
, centre
, and right
) that all move in parallel lines, with centre
being the midpoint of the other two.
Then you can check that if you pass the left
and right
keypoints, the figure contains data that matches the centre
points? Likewise you can also check that if you only pass one of the keypoints, the data in the returned plot matches the raw data for that keypoint?
May be able to use some of the |
Possibly, if they're simple enough to compute and work with then definitely re-use them. My original idea was something like 3 "parallel lines" for the keypoints:
but if something like this already exists then go with that! |
Co-authored-by: Will Graham <willGraham01@users.noreply.github.com>
Co-authored-by: Will Graham <willGraham01@users.noreply.github.com>
Co-authored-by: Will Graham <willGraham01@users.noreply.github.com>
Description
What is this PR
Why is this PR needed?
To conveniently plot results with a single line of code.
What does this PR do?
Introduces a
plot
module with atrajectory
function.References
#387
How has this PR been tested?
Checked the updated documentation locally.
Is this a breaking change?
No.
Does this PR require an update to the documentation?
Yes. I've updated the first part of the Express 2D vectors in polar coordinates example.
Checklist: