From 553918fb881d32a87ed2f07a14aeb606a124a3fe Mon Sep 17 00:00:00 2001 From: luke <2736230899@qq.com> Date: Fri, 6 Jan 2023 16:21:47 +0800 Subject: [PATCH 1/3] add ref --- examples/animation/simple_anim.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/animation/simple_anim.py b/examples/animation/simple_anim.py index 3bb3c4d952ba..58670459387f 100644 --- a/examples/animation/simple_anim.py +++ b/examples/animation/simple_anim.py @@ -3,6 +3,7 @@ Animated line plot ================== +Output generate via :ref:`matplotlib.animation.Animation.to_jshtml`. """ import numpy as np @@ -11,7 +12,7 @@ fig, ax = plt.subplots() -x = np.arange(0, 2*np.pi, 0.01) +x = np.arange(0, 2 * np.pi, 0.01) line, = ax.plot(x, np.sin(x)) From 826f64f10efb98cb4bd2c5a264ce562f45d8c366 Mon Sep 17 00:00:00 2001 From: luke <2736230899@qq.com> Date: Fri, 6 Jan 2023 23:11:18 +0800 Subject: [PATCH 2/3] fix error --- examples/animation/simple_anim.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/animation/simple_anim.py b/examples/animation/simple_anim.py index 58670459387f..4fe404521b7c 100644 --- a/examples/animation/simple_anim.py +++ b/examples/animation/simple_anim.py @@ -3,7 +3,7 @@ Animated line plot ================== -Output generate via :ref:`matplotlib.animation.Animation.to_jshtml`. +Output generate via `matplotlib.animation.Animation.to_jshtml`. """ import numpy as np @@ -12,7 +12,7 @@ fig, ax = plt.subplots() -x = np.arange(0, 2 * np.pi, 0.01) +x = np.arange(0, 2*np.pi, 0.01) line, = ax.plot(x, np.sin(x)) From b1b2796c083f3047ae50b63b3e4ce78395b149a9 Mon Sep 17 00:00:00 2001 From: luke <2736230899@qq.com> Date: Sat, 7 Jan 2023 16:45:03 +0800 Subject: [PATCH 3/3] add-for-every-under-examples/ --- examples/animation/animate_decay.py | 2 ++ examples/animation/animated_histogram.py | 2 ++ examples/animation/animation_demo.py | 2 ++ examples/animation/bayes_update.py | 2 ++ examples/animation/double_pendulum.py | 2 ++ examples/animation/dynamic_image.py | 1 + examples/animation/frame_grabbing_sgskip.py | 2 ++ examples/animation/multiple_axes.py | 2 ++ examples/animation/pause_resume.py | 2 ++ examples/animation/rain.py | 2 ++ examples/animation/random_walk.py | 1 + examples/animation/simple_scatter.py | 1 + examples/animation/strip_chart.py | 2 ++ examples/animation/unchained.py | 2 ++ 14 files changed, 25 insertions(+) diff --git a/examples/animation/animate_decay.py b/examples/animation/animate_decay.py index 272fe46be43e..a96dd2a5952a 100644 --- a/examples/animation/animate_decay.py +++ b/examples/animation/animate_decay.py @@ -7,6 +7,8 @@ - using a generator to drive an animation, - changing axes limits during an animation. + +Output generate via `matplotlib.animation.Animation.to_jshtml`. """ import itertools diff --git a/examples/animation/animated_histogram.py b/examples/animation/animated_histogram.py index 737d4c9a3833..254155b62a5e 100644 --- a/examples/animation/animated_histogram.py +++ b/examples/animation/animated_histogram.py @@ -45,6 +45,8 @@ def animate(frame_number): # ``prepare_animation`` will define ``animate`` function working with supplied # `.BarContainer`, all this is used to setup `.FuncAnimation`. +# Output generate via `matplotlib.animation.Animation.to_jshtml`. + fig, ax = plt.subplots() _, _, bar_container = ax.hist(data, HIST_BINS, lw=1, ec="yellow", fc="green", alpha=0.5) diff --git a/examples/animation/animation_demo.py b/examples/animation/animation_demo.py index ed88e2d9a418..d9d0225ebb00 100644 --- a/examples/animation/animation_demo.py +++ b/examples/animation/animation_demo.py @@ -10,6 +10,8 @@ examples that use it. Note that calling `time.sleep` instead of `~.pyplot.pause` would *not* work. + +Output generate via `matplotlib.animation.Animation.to_jshtml`. """ import matplotlib.pyplot as plt diff --git a/examples/animation/bayes_update.py b/examples/animation/bayes_update.py index 6ac226d0d023..3874cef5aa9b 100644 --- a/examples/animation/bayes_update.py +++ b/examples/animation/bayes_update.py @@ -7,6 +7,8 @@ new data arrives. The vertical line represents the theoretical value to which the plotted distribution should converge. + +Output generate via `matplotlib.animation.Animation.to_jshtml`. """ import math diff --git a/examples/animation/double_pendulum.py b/examples/animation/double_pendulum.py index fba7ea4ec9e2..6009245d12df 100644 --- a/examples/animation/double_pendulum.py +++ b/examples/animation/double_pendulum.py @@ -7,6 +7,8 @@ Double pendulum formula translated from the C code at http://www.physics.usyd.edu.au/~wheat/dpend_html/solve_dpend.c + +Output generate via `matplotlib.animation.Animation.to_jshtml`. """ from numpy import sin, cos diff --git a/examples/animation/dynamic_image.py b/examples/animation/dynamic_image.py index cbec62607b2c..41bc7e54e908 100644 --- a/examples/animation/dynamic_image.py +++ b/examples/animation/dynamic_image.py @@ -3,6 +3,7 @@ Animated image using a precomputed list of images ================================================= +Output generate via `matplotlib.animation.Animation.to_jshtml`. """ import numpy as np diff --git a/examples/animation/frame_grabbing_sgskip.py b/examples/animation/frame_grabbing_sgskip.py index e74576249aa0..1cdd47f0d70a 100644 --- a/examples/animation/frame_grabbing_sgskip.py +++ b/examples/animation/frame_grabbing_sgskip.py @@ -6,6 +6,8 @@ Use a MovieWriter directly to grab individual frames and write them to a file. This avoids any event loop integration, and thus works even with the Agg backend. This is not recommended for use in an interactive setting. + +Output generate via `matplotlib.animation.Animation.to_jshtml`. """ import numpy as np diff --git a/examples/animation/multiple_axes.py b/examples/animation/multiple_axes.py index ca75bea6169d..4a45aa28ea8c 100644 --- a/examples/animation/multiple_axes.py +++ b/examples/animation/multiple_axes.py @@ -7,6 +7,8 @@ - how animation across multiple subplots works, - using a figure artist in the animation. + +Output generate via `matplotlib.animation.Animation.to_jshtml`. """ import numpy as np diff --git a/examples/animation/pause_resume.py b/examples/animation/pause_resume.py index 7bed65140263..4f9dc3c39d99 100644 --- a/examples/animation/pause_resume.py +++ b/examples/animation/pause_resume.py @@ -15,6 +15,8 @@ You can copy and paste individual parts, or download the entire example using the link at the bottom of the page. + +Output generate via `matplotlib.animation.Animation.to_jshtml`. """ import matplotlib.pyplot as plt diff --git a/examples/animation/rain.py b/examples/animation/rain.py index 9de510c41dfa..affa1d33867c 100644 --- a/examples/animation/rain.py +++ b/examples/animation/rain.py @@ -7,6 +7,8 @@ of 50 scatter points. Author: Nicolas P. Rougier + +Output generate via `matplotlib.animation.Animation.to_jshtml`. """ import numpy as np diff --git a/examples/animation/random_walk.py b/examples/animation/random_walk.py index f49c099a5c2d..e7e539f8884e 100644 --- a/examples/animation/random_walk.py +++ b/examples/animation/random_walk.py @@ -3,6 +3,7 @@ Animated 3D random walk ======================= +Output generate via `matplotlib.animation.Animation.to_jshtml`. """ import numpy as np diff --git a/examples/animation/simple_scatter.py b/examples/animation/simple_scatter.py index 1d18039dcf11..c0bfa8bfa535 100644 --- a/examples/animation/simple_scatter.py +++ b/examples/animation/simple_scatter.py @@ -3,6 +3,7 @@ Animated scatter saved as GIF ============================= +Output generate via `matplotlib.animation.Animation.to_jshtml`. """ import numpy as np import matplotlib.pyplot as plt diff --git a/examples/animation/strip_chart.py b/examples/animation/strip_chart.py index 9b6e814c66ef..77ea65b35fc2 100644 --- a/examples/animation/strip_chart.py +++ b/examples/animation/strip_chart.py @@ -4,6 +4,8 @@ ============ Emulates an oscilloscope. + +Output generate via `matplotlib.animation.Animation.to_jshtml`. """ import numpy as np diff --git a/examples/animation/unchained.py b/examples/animation/unchained.py index b242aeffd7ce..8a241ebfd61c 100644 --- a/examples/animation/unchained.py +++ b/examples/animation/unchained.py @@ -7,6 +7,8 @@ (mostly known because of the cover for Joy Division's Unknown Pleasures). Author: Nicolas P. Rougier + +Output generate via `matplotlib.animation.Animation.to_jshtml`. """ import numpy as np