Skip to content

Commit

Permalink
docstring fixes to pybamm.plotting.quick_plot (pybamm-team#3970)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
neilsengupta-elysia and kratman authored Apr 10, 2024
1 parent e8d56e8 commit f050d58
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions pybamm/plotting/quick_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
"""
Expand Down

0 comments on commit f050d58

Please sign in to comment.