-
Notifications
You must be signed in to change notification settings - Fork 19
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
fix typing, fix 2D plotting issues #896
Conversation
text=f"{i}", | ||
xy=(i + 0.5, 1), | ||
xytext=(i + 0.5, num_states + 0.5), | ||
xycoords='data', |
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.
Adding the defaults is a bit much, but thought I might as well be explicit... thoughts?
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.
I like it!
@@ -278,15 +294,15 @@ def plot_2D_rmsd(data: list[list[float]], | |||
fig, axes = plt.subplots(nrows, 4) | |||
|
|||
for i, (arr, ax) in enumerate( | |||
zip(twod_rmsd_arrs, chain.from_iterable(axes))): | |||
zip(twod_rmsd_arrs, axes.flatten())): # type: ignore |
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.
for some reason the return type for axes can be Axes | ndarray, but in our use case we always have ndarray (because we set ncols to 4).
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #896 +/- ##
==========================================
- Coverage 93.98% 92.36% -1.62%
==========================================
Files 134 134
Lines 9790 9800 +10
==========================================
- Hits 9201 9052 -149
- Misses 589 748 +159
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ 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.
Looks nicer! I think these changes warrant a change log entry
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.
The plots look good to me!
Thanks both! @mikemhenry changelog entry is done. |
openfe.analysis.plotting.plot_2D_rmsd
does not work for fewer than 5 states #895TODO:
Checklist
news
entryDevelopers certificate of origin