Repository: sunpy/sunpy

Issue:
Review animated examples
### Provide a general description of the issue or problem.

In https://github.com/sunpy/sunpy/pull/5870 at least one of the examples with animations was changed to show the animation in spinx gallery. We should review the all of the animated examples to make sure:

- [ ] The animations are showing up in the gallery
- [ ] The animations look good. For example, https://sunpy--5870.org.readthedocs.build/en/5870/generated/gallery/plotting/arrayanimatorwcs.html#sphx-glr-generated-gallery-plotting-arrayanimatorwcs-py doesn't look great as the second image is washed out, and there's only two images in the animation


Discussion:
I am pretty sure between #5870 and #5871, I addressed the first item (I very well could've missed one).

Re: the second item, I agree. The colorbar limit issue is certainly easy enough to address. However, it seems weird to me that for the wcsanimator examples, there is an extra progress bar (the one that indicates the progression of time, but also does not seem to update). I'm guessing this just gets dropped into the png that is rendered? Is there a way to make the slider bars in the WCS animation play nicer with the matplotlib animations?

Resolving patch:
diff --git a/examples/plotting/arrayanimatorwcs.py b/examples/plotting/arrayanimatorwcs.py
--- a/examples/plotting/arrayanimatorwcs.py
+++ b/examples/plotting/arrayanimatorwcs.py
@@ -11,6 +11,7 @@
 
 import astropy.units as u
 import astropy.wcs
+from astropy.visualization import AsinhStretch, ImageNormalize
 
 import sunpy.map
 from sunpy.data.sample import AIA_171_IMAGE, AIA_193_IMAGE
@@ -30,6 +31,9 @@
 # Now we can just cast the sequence away into a NumPy array.
 sequence_array = map_sequence.as_array()
 
+# We'll also define a common normalization to use in the animations
+norm = ImageNormalize(vmin=0, vmax=3e4, stretch=AsinhStretch(0.01))
+
 ###############################################################################
 # Now we need to create the `~astropy.wcs.WCS` header that
 # `~mpl_animators.ArrayAnimatorWCS` will need.
@@ -59,7 +63,7 @@
 # axes you want to plot on the image. All other axes should have a ``0`` and
 # sliders will be created to control the value for this axis.
 
-wcs_anim = ArrayAnimatorWCS(sequence_array, wcs, [0, 'x', 'y'], vmax=1000).get_animation()
+wcs_anim = ArrayAnimatorWCS(sequence_array, wcs, [0, 'x', 'y'], norm=norm).get_animation()
 
 plt.show()
 
@@ -85,7 +89,7 @@
 }
 
 # We have to recreate the visualization since we displayed it earlier.
-wcs_anim = ArrayAnimatorWCS(sequence_array, wcs, [0, 'x', 'y'], vmax=1000,
+wcs_anim = ArrayAnimatorWCS(sequence_array, wcs, [0, 'x', 'y'], norm=norm,
                             coord_params=coord_params).get_animation()
 
 plt.show()
diff --git a/examples/plotting/lineAnimator_examples.py b/examples/plotting/lineAnimator_examples.py
--- a/examples/plotting/lineAnimator_examples.py
+++ b/examples/plotting/lineAnimator_examples.py
@@ -45,6 +45,6 @@
 ###############################################################################
 # Generate animation object with variable x-axis data.
 
-ani = LineAnimator(data0, plot_axis_index=plot_axis0, axis_ranges=[None, xdata])
+ani = LineAnimator(data0, plot_axis_index=plot_axis0, axis_ranges=[None, xdata]).get_animation()
 
 plt.show()


Test patch: