Skip to content

Conversation

@r3kste
Copy link
Collaborator

@r3kste r3kste commented Nov 11, 2025

Summary of Changes

  1. Added the line_plot and grid_line_plot function for bokeh.
  2. Added a small example in the documentation to show a bokeh plot.

Plot Comparision

Plotly Bokeh
paramsplotly paramsbokeh
convergenceplotly convergencebokeh

Checklist

  • Documentation
  • Tests
  • Comparision of plot outputs

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@codecov
Copy link

codecov bot commented Nov 11, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/optimagic/config.py 100.00% <100.00%> (ø)
src/optimagic/visualization/backends.py 99.42% <100.00%> (+0.39%) ⬆️
src/optimagic/visualization/convergence_plot.py 95.65% <100.00%> (+0.19%) ⬆️
src/optimagic/visualization/history_plots.py 95.78% <ø> (ø)
src/optimagic/visualization/profile_plot.py 91.52% <ø> (ø)
src/optimagic/visualization/slice_plot.py 96.12% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

Looks great, thanks!

from bokeh.layouts import gridplot
from bokeh.plotting import figure

plots: list[list[Any]] = []
Copy link
Member

Choose a reason for hiding this comment

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

Do we have more type information than Any?

Copy link
Collaborator Author

@r3kste r3kste Nov 25, 2025

Choose a reason for hiding this comment

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

Thanks for the review!

Do we have more type information than Any?

Ideally the type hint should be list[list[figure]]. However there is something unexpected going on with both of the mypy stubtests (the independent job and the pre-commit job).

When using list[list[figure]] the independent job fails although the pre-commit job passes, with

error: No overload variant of "gridplot" matches argument types "list[list[figure]]", "int | None", "int | None", "str"  [call-overload]

Ignoring the error with a # type: ignore[call-overload] causes the pre-commit job to complain about the unused ignore statement. Unfortunately, I am not able to find a type hint (other than list[list[Any]]) that lets both these tests pass.

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