From e776ce788f45ab85c54b2583403c406f2823f4a0 Mon Sep 17 00:00:00 2001 From: Gavin S Date: Sun, 11 Aug 2024 22:24:35 -0700 Subject: [PATCH 1/3] Add Returns documentation to `to_jshtml` function --- lib/matplotlib/animation.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/matplotlib/animation.py b/lib/matplotlib/animation.py index 00b16d240740..67a0198f8f51 100644 --- a/lib/matplotlib/animation.py +++ b/lib/matplotlib/animation.py @@ -1311,6 +1311,12 @@ def to_jshtml(self, fps=None, embed_frames=True, default_mode=None): What to do when the animation ends. Must be one of ``{'loop', 'once', 'reflect'}``. Defaults to ``'loop'`` if the *repeat* parameter is True, otherwise ``'once'``. + + Returns + ------- + str + An HTML representation of the animation embedded as a js object as + produced with the ``HTMLWriter``. """ if fps is None and hasattr(self, '_interval'): # Convert interval in ms to frames per second From 07731096d34e5a939d674b6118bcaab7c7568d21 Mon Sep 17 00:00:00 2001 From: Gavin S Date: Sun, 11 Aug 2024 22:30:49 -0700 Subject: [PATCH 2/3] Fix return to match docstring standards --- lib/matplotlib/animation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/matplotlib/animation.py b/lib/matplotlib/animation.py index 67a0198f8f51..515a9eaa15ad 100644 --- a/lib/matplotlib/animation.py +++ b/lib/matplotlib/animation.py @@ -1316,7 +1316,7 @@ def to_jshtml(self, fps=None, embed_frames=True, default_mode=None): ------- str An HTML representation of the animation embedded as a js object as - produced with the ``HTMLWriter``. + produced with the *HTMLWriter*. """ if fps is None and hasattr(self, '_interval'): # Convert interval in ms to frames per second From 0946afe6ae2d4f9fe687b95355da15d7a71f43ad Mon Sep 17 00:00:00 2001 From: Ruth Comer <10599679+rcomer@users.noreply.github.com> Date: Sat, 7 Sep 2024 13:03:21 +0100 Subject: [PATCH 3/3] Link to HTMLWriter docs Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> --- lib/matplotlib/animation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/matplotlib/animation.py b/lib/matplotlib/animation.py index 515a9eaa15ad..0f6811a3bab9 100644 --- a/lib/matplotlib/animation.py +++ b/lib/matplotlib/animation.py @@ -1316,7 +1316,7 @@ def to_jshtml(self, fps=None, embed_frames=True, default_mode=None): ------- str An HTML representation of the animation embedded as a js object as - produced with the *HTMLWriter*. + produced with the `.HTMLWriter`. """ if fps is None and hasattr(self, '_interval'): # Convert interval in ms to frames per second