Skip to content

Conversation

r3kste
Copy link
Collaborator

@r3kste r3kste commented Oct 4, 2025

This PR refactors profile_plot() to use the backend plotting module.

Backends

Plotly Matplotlib
newplot t

Plot Changes

  • A line is drawn at y=1. The color and linewidth of the line matches that of the axis.
Before After
newplot newplot

PR Checklist

  • Compared images before and after making changes
  • Changes made are tested.
  • Update Documentation.

Copy link

codecov bot commented Oct 4, 2025

Codecov Report

❌ Patch coverage is 97.43590% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/optimagic/visualization/profile_plot.py 96.29% 1 Missing ⚠️
Files with missing lines Coverage Δ
src/optimagic/visualization/backends.py 97.91% <100.00%> (+0.24%) ⬆️
src/optimagic/visualization/profile_plot.py 91.52% <96.29%> (+0.61%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@r3kste r3kste requested a review from timmens October 5, 2025 04:56
@r3kste
Copy link
Collaborator Author

r3kste commented Oct 6, 2025

Ping @timmens for review. I have made the suggested changes.

Copy link
Member

@timmens timmens left a comment

Choose a reason for hiding this comment

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

Very very nice!

I have a few questions / requested changes.

Copy link
Member

@timmens timmens left a comment

Choose a reason for hiding this comment

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

Very nice. Approved!

I only have a tiny comment. You can merge the PR after fixing that.

@timmens timmens merged commit 5bf11e5 into optimagic-dev:main Oct 10, 2025
65 of 68 checks passed
@r3kste
Copy link
Collaborator Author

r3kste commented Oct 10, 2025

Thanks for merging!

Information about Tidy Dataframe:

As per the previous implementation, the solution_times DataFrame returned by create_solution_times is tidy. This approach was introduced to simplify plotting with seaborn.

With the new backend plotting system, a tidy DataFrame is no longer required. Therefore, the data extraction logic could potentially be simplified. Unfortunately, I couldn't find a way to do this without effectively performing the same operations required to tidy the DataFrame, which therefore, might not provide any significant improvement in terms of complexity.

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