-
Notifications
You must be signed in to change notification settings - Fork 47
Implementation of backend plotting for convergence_plot
#647
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
Conversation
49b18fd to
1cbe6df
Compare
Codecov Report✅ All modified and coverable lines are covered by tests.
... and 1 file with indirect coverage changes 🚀 New features to boost your workflow:
|
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
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.
Very nice changes, thanks a lot.
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.
Very nice, thank you.
I have two tiny documentation comments. Additionally, after looking at the matplotlib gridplot, I've realized that the plotly gridplot does not have sufficient horizontal padding between the plots.
- Can you adjust the horizontal padding of the plotly gridplots such that they look good (similar to the matplotlib figures)
- Can you quickly check whether you can adjust the plotly figure sizes so that they look good in the optimagic docs? When going through the how-to guide where the convergence plot is shown, it seems like the figure goes over the page margin. But that might only be my laptop screen, if you cannot detect an issue there just ignore it.
Thanks a lot!
It occurs on my environment too. Moreover, it seems like it has been this way previously as well. One solution is to update the dimensions from 320x1000 to 320x840, so as to fit the figure within the margins. However, I also noticed that the dataframes being displayed in Convergence report also goes over the page margin. So, I believe the ideal way to fix this issue for both cases would be to enable scrolling using myst-nb's diff --git a/docs/source/conf.py b/docs/source/conf.py
index 89f9104..8c77a28 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -173,6 +173,7 @@ else:
nb_execution_mode = "force" # "off", "force", "cache", "auto"
nb_execution_allow_errors = False
nb_merge_streams = True
+nb_scroll_outputs = True
# Notebook cell execution timeout; defaults to 30.
nb_execution_timeout = 1000I would like to know your thoughts on this. Thanks! |
|
Thanks! I like your proposal as a quick fix! We can keep it like that here. However, I think for most figures / dataframe representations we actually do not want scrolling. Can you open an enhancement issue for the docs, saying that you did this change here but that, as discussed with me, we rather want to update the docs such that the margins are respected? |
|
Previously,
Accordingly, the new implementation in |
Summary of changes
grid_line_plotfunction that takes alist[list[LineData]]and returns a grid plot.line_plotto take in an optional parametersubplot. This allowsgrid_line_plotto re useline_plotfunctionality.convergence_plotto use the backend plotting.Plot Changes
Backend Comparision
PR Checklist