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

🩹 Fix very slow data/residual plots #239

Merged
merged 1 commit into from
Jan 7, 2024

Conversation

s-weigand
Copy link
Member

@s-weigand s-weigand commented Jan 7, 2024

This reduces plot time of plot_residual (also used inside of plot_overview) from 3min to 3sec.
By default matplotlib tries to find the ideal position to place the legend where it least interferes with the plot itself, but since we add the line plot of the IRF on top of a 2D plot of the data or residual this wastes a lot of time without getting a conclusive result.

Change summary

Checklist

  • ✔️ Passing the tests (mandatory for all PR's)

@s-weigand s-weigand requested a review from a team as a code owner January 7, 2024 17:57
…find ideal position

This reduces plot time from 3min to 3sec
Copy link
Contributor

github-actions bot commented Jan 7, 2024

Binder 👈 Launch a binder notebook on branch s-weigand/pyglotaran-extras/fix-slow-2d-plot

Copy link

codecov bot commented Jan 7, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (82304e5) 44.94% compared to head (73d0630) 44.94%.

Files Patch % Lines
pyglotaran_extras/plotting/plot_residual.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #239   +/-   ##
=======================================
  Coverage   44.94%   44.94%           
=======================================
  Files          27       27           
  Lines        1039     1039           
  Branches      161      161           
=======================================
  Hits          467      467           
  Misses        564      564           
  Partials        8        8           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@jsnel jsnel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Who would have thought something seemingly so trivial causes such slowdowns.

@s-weigand s-weigand merged commit 5e00cb9 into glotaran:main Jan 7, 2024
31 checks passed
@s-weigand s-weigand deleted the fix-slow-2d-plot branch January 7, 2024 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants