From f050d58912b6535b20713ac1fa04befb08c9a3e6 Mon Sep 17 00:00:00 2001 From: Neil Sengupta <139366515+neilsengupta-elysia@users.noreply.github.com> Date: Wed, 10 Apr 2024 20:30:09 +0100 Subject: [PATCH] docstring fixes to pybamm.plotting.quick_plot (#3970) * docstring fixes to pybamm.plotting.quick_plot add "optional" keyword to "step" argument in dynamic_plot function. Removed round brackets around optional keywords in the arguments "number_of_images", "duration", "output_filename" in create_gif function. * updated description to pybamm.plotting.quick_plot - plot function Added "optional" tag to dynamic variable and added a small description --------- Co-authored-by: Eric G. Kratz --- pybamm/plotting/quick_plot.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pybamm/plotting/quick_plot.py b/pybamm/plotting/quick_plot.py index c2ffa38127..17dd471792 100644 --- a/pybamm/plotting/quick_plot.py +++ b/pybamm/plotting/quick_plot.py @@ -464,6 +464,9 @@ def plot(self, t, dynamic=False): ---------- t : float Dimensional time (in 'time_units') at which to plot. + dynamic : bool, optional + If True, creates a dynamic plot with a slider. + """ plt = import_optional_dependency("matplotlib.pyplot") @@ -647,7 +650,7 @@ def dynamic_plot(self, show_plot=True, step=None): Parameters ---------- - step : float + step : float, optional For notebook mode, size of steps to allow in the slider. Defaults to 1/100th of the total time. show_plot : bool, optional @@ -764,11 +767,11 @@ def create_gif(self, number_of_images=80, duration=0.1, output_filename="plot.gi Parameters ---------- - number_of_images : int (optional) + number_of_images : int, optional Number of images/plots to be compiled for a GIF. - duration : float (optional) + duration : float, optional Duration of visibility of a single image/plot in the created GIF. - output_filename : str (optional) + output_filename : str, optional Name of the generated GIF file. """