diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e439dcf90..118a18197a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -82,6 +82,7 @@ ## Breaking changes +- The function `get_spatial_var` in `pybamm.QuickPlot.py` is made private. ([#3755](https://github.com/pybamm-team/PyBaMM/pull/3755)) - The parameters `GeometricParameters.A_cooling` and `GeometricParameters.V_cell` are now automatically computed from the electrode heights, widths and thicknesses if the "cell geometry" option is "pouch" and from the parameters "Cell cooling surface area [m2]" and "Cell volume [m3]", respectively, otherwise. When using the lumped thermal model we recommend using the "arbitrary" cell geometry and specifying the parameters "Cell cooling surface area [m2]", "Cell volume [m3]" and "Total heat transfer coefficient [W.m-2.K-1]" directly. ([#3707](https://github.com/pybamm-team/PyBaMM/pull/3707)) - Dropped support for the `[jax]` extra, i.e., the Jax solver when running on Python 3.8. The Jax solver is now available on Python 3.9 and above ([#3550](https://github.com/pybamm-team/PyBaMM/pull/3550)) diff --git a/pybamm/plotting/quick_plot.py b/pybamm/plotting/quick_plot.py index 17dd471792..39dc974f9b 100644 --- a/pybamm/plotting/quick_plot.py +++ b/pybamm/plotting/quick_plot.py @@ -301,7 +301,7 @@ def set_output_variables(self, output_variables, solutions): # Set the x variable (i.e. "x" or "r" for any one-dimensional variables) if first_variable.dimensions == 1: - (spatial_var_name, spatial_var_value) = self.get_spatial_var( + (spatial_var_name, spatial_var_value) = self._get_spatial_var( variable_tuple, first_variable, "first" ) self.spatial_variable_dict[variable_tuple] = { @@ -324,11 +324,11 @@ def set_output_variables(self, output_variables, solutions): ( first_spatial_var_name, first_spatial_var_value, - ) = self.get_spatial_var(variable_tuple, first_variable, "first") + ) = self._get_spatial_var(variable_tuple, first_variable, "first") ( second_spatial_var_name, second_spatial_var_value, - ) = self.get_spatial_var(variable_tuple, first_variable, "second") + ) = self._get_spatial_var(variable_tuple, first_variable, "second") self.spatial_variable_dict[variable_tuple] = { first_spatial_var_name: first_spatial_var_value, second_spatial_var_name: second_spatial_var_value, @@ -360,7 +360,7 @@ def set_output_variables(self, output_variables, solutions): self.variables[variable_tuple] = variables self.subplot_positions[variable_tuple] = (self.n_rows, self.n_cols, k + 1) - def get_spatial_var(self, key, variable, dimension): + def _get_spatial_var(self, key, variable, dimension): """Return the appropriate spatial variable(s)""" # Extract name and value @@ -465,8 +465,8 @@ def plot(self, t, dynamic=False): t : float Dimensional time (in 'time_units') at which to plot. dynamic : bool, optional + Determine whether to allocate space for a slider at the bottom of the plot when generating a dynamic plot. If True, creates a dynamic plot with a slider. - """ plt = import_optional_dependency("matplotlib.pyplot")