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

#1037 fix timescale #1041

Merged
merged 3 commits into from
Jun 9, 2020
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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