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

[Bug]: Variables names missing from plot #4620

Closed
rtimms opened this issue Nov 26, 2024 · 6 comments · Fixed by #4622
Closed

[Bug]: Variables names missing from plot #4620

rtimms opened this issue Nov 26, 2024 · 6 comments · Fixed by #4622
Labels
bug Something isn't working difficulty: easy A good issue for someone new. Can be done in a few hours

Comments

@rtimms
Copy link
Contributor

rtimms commented Nov 26, 2024

PyBaMM Version

24.11.1

Python Version

3.11

Describe the bug

Dynamic plot has no variable labels and shows the legend entries as t=0.00h for all plots

Image

Steps to Reproduce

import pybamm

model = pybamm.lithium_ion.SPM()

sim = pybamm.Simulation(model)
sim.solve([0, 3600])


sim.plot()

Relevant log output

@rtimms rtimms added the bug Something isn't working label Nov 26, 2024
@rtimms
Copy link
Contributor Author

rtimms commented Nov 26, 2024

From #4529

@arjxn-py arjxn-py added the difficulty: easy A good issue for someone new. Can be done in a few hours label Nov 26, 2024
@kratman
Copy link
Contributor

kratman commented Nov 26, 2024

@rtimms Sorry missed in the review

@agriyakhetarpal
Copy link
Member

cc: @medha-14, this might be worth a look!

@medha-14
Copy link
Contributor

Ah, I must have missed this , will get to fixing this in a few days.

@brosaplanella
Copy link
Member

brosaplanella commented Nov 27, 2024

Another issue that I believe is related: when plotting 2D variables the colourbar range is wrong.

Edit: digging a bit, I suspect the issue for the colourmaps is also to do with the plotting multiple times in the same plot. For 2D this should not be possible so the fix there only requires reverting that code to the previous version and throwing an error if multiple times are passed for a 2D variable.

24.9

Image

24.11

Image

@brosaplanella
Copy link
Member

Digging a bit deeper, there also some inconsistencies when plotting multiple solutions in one plot. Given that there are multiple issues to fix (basically the issue is a lot harder than I anticipated in #4271 😅) and plotting is quite a major feature, I suggest reverting #4529 and making a minor release. We can then address this for the next major release.

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working difficulty: easy A good issue for someone new. Can be done in a few hours
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants