Skip to content

Conversation

r3kste
Copy link
Collaborator

@r3kste r3kste commented Sep 23, 2025

This PR adds documentation on using different plotting backends.

Note: This PR should go after #641, as this relies on some fixes made to criterion_plot()

Summary of Changes

  1. Created how_to_change_plotting_backend.ipynb with information on:

    • Supported backends
    • Type of the returned figure object
    • Simple usage example for criterion_plot() for each backend.
  2. Updated how_to_visualize_histories.ipynb with a small section on changing backends.

To-do

  • Add fix for matplotlib not rendering the figure upon re-running cell.
  • Should we document 'advanced' usage (customizing plots after generated by optimagic)?

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Copy link

codecov bot commented Sep 23, 2025

Codecov Report

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

Files with missing lines Patch % Lines
src/optimagic/visualization/backends.py 75.00% 1 Missing ⚠️

❌ Your patch status has failed because the patch coverage (75.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Files with missing lines Coverage Δ
src/optimagic/visualization/backends.py 97.67% <75.00%> (-2.33%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@r3kste r3kste requested a review from timmens September 24, 2025 05:00
@r3kste
Copy link
Collaborator Author

r3kste commented Sep 24, 2025

The failing test is unrelated to the changes.

Resolved after re-running the test.

@r3kste
Copy link
Collaborator Author

r3kste commented Sep 27, 2025

Codecov is failing because plotting is not being tested in an interactive environment. I could try and add a simple smoke test for test coverage. Thoughts? @timmens

@timmens
Copy link
Member

timmens commented Sep 28, 2025

No, if the PR is ready, I'll try to merge it without the checks passing. Makes no sense in this case. Thank you!

Is it ready for review? @r3kste

@r3kste
Copy link
Collaborator Author

r3kste commented Sep 29, 2025

Yes. It is ready for review @timmens

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! I have two relatively small remarks. Once these are done, this is ready to be merged! Thanks a lot.

@timmens timmens changed the title Documentation for changing plotting backends. Add how-to change plotting backends guide Sep 29, 2025
@timmens timmens merged commit 0f65cb4 into optimagic-dev:main Sep 29, 2025
25 of 26 checks passed
@r3kste r3kste deleted the backends_documentation branch October 1, 2025 12:17
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