Skip to content

Commit

Permalink
Merge pull request #1041 from pybamm-team/issue-1037-slider-bug
Browse files Browse the repository at this point in the history
#1037 fix timescale
  • Loading branch information
rtimms authored Jun 9, 2020
2 parents 814f5d9 + c693933 commit 672a512
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ New SEI models, simplification of submodel structure, as well as optimisations a

## Bug fixes

- Fix a bug where slider plots do not update properly in notebooks ([#1041](https://github.com/pybamm-team/PyBaMM/pull/1041))
- Fix storing and plotting external variables in the solution ([#1026](https://github.com/pybamm-team/PyBaMM/pull/1026))
- Fix running a simulation with a model that is already discretized ([#1025](https://github.com/pybamm-team/PyBaMM/pull/1025))
- Fix CI not triggering for PR. ([#1013](https://github.com/pybamm-team/PyBaMM/pull/1013))
Expand Down
8 changes: 4 additions & 4 deletions pybamm/plotting/quick_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,14 +465,14 @@ def plot(self, t):
Parameters
----------
t : float
Dimensional time (in hours) at which to plot.
Dimensional time (in 'time_units') at which to plot.
"""

import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
from matplotlib import cm, colors

t_in_seconds = t / self.time_scaling_factor
t_in_seconds = t * self.time_scaling_factor
self.fig = plt.figure(figsize=self.figsize)

self.gridspec = gridspec.GridSpec(self.n_rows, self.n_cols)
Expand Down Expand Up @@ -526,8 +526,8 @@ def plot(self, t):
ax.set_ylim(y_min, y_max)
(self.time_lines[key],) = ax.plot(
[
t_in_seconds * self.time_scaling_factor,
t_in_seconds * self.time_scaling_factor,
t_in_seconds / self.time_scaling_factor,
t_in_seconds / self.time_scaling_factor,
],
[y_min, y_max],
"k--",
Expand Down

0 comments on commit 672a512

Please sign in to comment.