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

plot voltage components has correct legend order #2061

Merged
merged 3 commits into from
May 19, 2022

Conversation

dion-w
Copy link
Contributor

@dion-w dion-w commented May 15, 2022

Description

Fixed the order of legend entries in plot_voltage_components.py. Now every color matches the legend entry. Before Voltage referred to the OCV, OCV to reaction overpotential, etc.

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.

  • Optimization (back-end change that speeds up the code)
  • New feature (non-breaking change which adds functionality)
  • 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

@dion-w dion-w marked this pull request as ready for review May 15, 2022 20:28
@codecov
Copy link

codecov bot commented May 15, 2022

Codecov Report

Merging #2061 (b6ce3df) into develop (7fd5155) will decrease coverage by 0.00%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##           develop    #2061      +/-   ##
===========================================
- Coverage    99.36%   99.35%   -0.01%     
===========================================
  Files          346      346              
  Lines        19033    19033              
===========================================
- Hits         18912    18911       -1     
- Misses         121      122       +1     
Impacted Files Coverage Δ
pybamm/plotting/plot_voltage_components.py 100.00% <ø> (ø)
pybamm/expression_tree/symbol.py 98.53% <0.00%> (-0.25%) ⬇️

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 7fd5155...b6ce3df. Read the comment docs.

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!

@valentinsulzer valentinsulzer merged commit 134585f into pybamm-team:develop May 19, 2022
@valentinsulzer
Copy link
Member

Actually the order is now wrong for me, and correct if I change it back ... maybe it behaves differently on different computers??

@valentinsulzer
Copy link
Member

We should just use label= to be safe

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