Implement create_gif in QuickPlot - #1754
Conversation
|
Can you merge in develop? |
| self.C_rates = C_rates | ||
| self.repeats = repeats | ||
| self.permutations = permutations | ||
| self.quick_plot = None |
There was a problem hiding this comment.
Not sure if this is the best way to implement this but I had to check if an object of QuickPlot has been created by the user (for calling the QuickPlot.create_gif method, same for the Simulation class)
|
Also I think I messed something up while resolving conflicts, I'll check locally |
Codecov Report
@@ Coverage Diff @@
## develop #1754 +/- ##
========================================
Coverage 99.28% 99.28%
========================================
Files 343 343
Lines 18868 18894 +26
========================================
+ Hits 18733 18759 +26
Misses 135 135
Continue to review full report at Codecov.
|
| """ | ||
|
|
||
| if self.quick_plot is None: | ||
| self.quick_plot = pybamm.QuickPlot(self.sims) |
There was a problem hiding this comment.
I thought of 3 options here (when the user hasn't called the plot method) -
- raise an error
- pass in
kwargsmaybe, and then create aQuickPlotobject (didn't try) - create a
QuickPlotobject with default parameters (current implementation)
(same for the Simulation class)
8c699e3 to
8b34425
Compare
TomTranter
left a comment
There was a problem hiding this comment.
Looks good to me thanks
| ): | ||
| input_solutions = solutions | ||
| solutions = [] | ||
| self.solutions = [] |
There was a problem hiding this comment.
how come you need to store solutions as an attribute now?
There was a problem hiding this comment.
My bad, I don't really remember why I did this 😅. Thanks!
Description
QuickPlotpybamm.Simulationandpybamm.BatchStudyimageioFixes #1752
Type of change
Please add a line in the relevant section of CHANGELOG.md to document the change (include PR #) - note reverse order of PR #s. If necessary, also add to the list of breaking changes.
Key checklist:
$ flake8$ python run-tests.py --unit$ cd docsand then$ make clean; make htmlYou can run all three at once, using
$ python run-tests.py --quick.Further checks: