Skip to content
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

Added a function to plot "summary variables" #1678

Merged

Conversation

Saransh-cpp
Copy link
Member

Description

Added a function to plot and compare summary variables.

Fixes # (issue)

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.

  • New feature (non-breaking change which adds functionality)
  • Optimization (back-end change that speeds up the code)
  • Bug fix (non-breaking change which fixes an issue)

Key checklist:

  • No style issues: $ flake8
  • All tests pass: $ python run-tests.py --unit
  • The documentation builds: $ cd docs and then $ make clean; make html

You can run all three at once, using $ python run-tests.py --quick.

Further checks:

  • Code is commented, particularly in hard-to-understand areas
  • Tests added that prove fix is effective or that feature works

@codecov
Copy link

codecov bot commented Sep 16, 2021

Codecov Report

Merging #1678 (d077706) into develop (261f6c4) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #1678   +/-   ##
========================================
  Coverage    99.27%   99.27%           
========================================
  Files          342      343    +1     
  Lines        18720    18742   +22     
========================================
+ Hits         18585    18607   +22     
  Misses         135      135           
Impacted Files Coverage Δ
pybamm/__init__.py 94.91% <100.00%> (+0.04%) ⬆️
pybamm/plotting/plot_summary_variables.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 261f6c4...d077706. Read the comment docs.

Copy link
Sponsor Member

@brosaplanella brosaplanella left a comment

Choose a reason for hiding this comment

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

Looks good, thanks Saransh!

Copy link
Member

@valentinsulzer valentinsulzer left a comment

Choose a reason for hiding this comment

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

Thanks, looks good!


Parameters
----------
solutions : (iter of) :class:`pybamm.Solution`
Copy link
Member

Choose a reason for hiding this comment

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

can this be made to work if only a single solution is provided not in a list, e.g.

if isinstance(solutions, pybamm.Solution):
    solutions = [solutions]

@valentinsulzer valentinsulzer merged commit 0612406 into pybamm-team:develop Sep 17, 2021
@Saransh-cpp Saransh-cpp deleted the plot-summary-variables branch October 5, 2021 14:50
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.

None yet

3 participants