-
Notifications
You must be signed in to change notification settings - Fork 27
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
Converts notebook plots to pure Plotly #411
Converts notebook plots to pure Plotly #411
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #411 +/- ##
===========================================
+ Coverage 98.82% 99.01% +0.18%
===========================================
Files 52 52
Lines 3582 3555 -27
===========================================
- Hits 3540 3520 -20
+ Misses 42 35 -7 ☔ View full report in Codecov by Sentry. |
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.
Hi Brady! I am not sure I follow what this PR changes (mostly because I am not too familiar with plotly). It seems the main change is to use a log scale in the plots, but there are still some issues with the exponents (see https://github.com/pybop-team/PyBOP/blob/7bae73c60da37932851f8373cc567f8f35e8a078/examples/notebooks/multi_model_identification.ipynb)
… ipython plots no longer 'svg'
…rendering-formu-in-notebooks # Conflicts: # examples/notebooks/LG_M50_ECM/1-single-pulse-circuit-model.ipynb # examples/notebooks/comparing_cost_functions.ipynb # examples/notebooks/equivalent_circuit_identification.ipynb # examples/notebooks/multi_model_identification.ipynb # examples/notebooks/multi_optimiser_identification.ipynb # examples/notebooks/optimiser_calibration.ipynb # examples/notebooks/optimiser_interface.ipynb # examples/notebooks/pouch_cell_identification.ipynb # examples/notebooks/spm_AdamW.ipynb # examples/notebooks/spm_electrode_design.ipynb
c81af4b
to
431a862
Compare
I've now refactored this PR quite a bit, after hitting a few blockers with Kaleido and the GitHub notebook renderer, I've changed direction and reverted notebook plotting to the standard |
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.
Hi @BradyPlanden, when I try to view the figures on nbviewer (e.g. 1-single-pulse-circuit-model), it only shows me one figure and the rest are black rectangles. I am using Firefox on Windows, same on Chrome. Will this issue be fixed by merging?
…rendering-formu-in-notebooks # Conflicts: # examples/notebooks/multi_model_identification.ipynb # examples/notebooks/spm_electrode_design.ipynb
Yes it will be fixed by merging, here's the link to this branch which has the fixed plots: https://nbviewer.org/github/pybop-team/PyBOP/blob/410-bug-incorrect-axis-symbol-rendering-formu-in-notebooks/examples/notebooks/equivalent_circuit_identification.ipynb |
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.
Looks good to me, thanks!
…rendering-formu-in-notebooks # Conflicts: # examples/notebooks/ecm_trust-constr.ipynb
…rendering-formu-in-notebooks
…rendering-formu-in-notebooks
Description
This PR removes the svg based plotting methods for jupyter notebooks, changing to standard to the
plotly.show()
method. As this remove the rendered figures in GitHub, I've added a README.md to the examples directory which points users to the nbviewer rendered notebooks, which is the recommend method for plotly.As a result of the above, this PR removes kaleido as a dependency.
Issue reference
Fixes #410
Review
Before you mark your PR as ready for review, please ensure that you've considered the following:
Type of change
Key checklist:
$ pre-commit run
(or$ nox -s pre-commit
) (see CONTRIBUTING.md for how to set this up to run automatically when committing locally, in just two lines of code)$ nox -s tests
$ nox -s doctest
You can run integration tests, unit tests, and doctests together at once, using
$ nox -s quick
.Further checks:
Thank you for contributing to our project! Your efforts help us to deliver great software.