From 5e79dd8d14b0fd945ba57d9e3ce0298763036319 Mon Sep 17 00:00:00 2001 From: Greg Lucas Date: Tue, 2 Jul 2024 06:47:13 -0600 Subject: [PATCH] MNT: Update Matplotlib animation to use sequences --- examples/plot_surface_animation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/plot_surface_animation.py b/examples/plot_surface_animation.py index 096b56b..d528049 100644 --- a/examples/plot_surface_animation.py +++ b/examples/plot_surface_animation.py @@ -73,9 +73,9 @@ def update_surface(t): date_string = dates[t].astype("O").strftime("%H:%M") title.set_text(f"{date_string}") - time_line.set_xdata(dates[t]) + time_line.set_xdata([dates[t]]) mesh.set_array(output[t, :, :, i].T) - sun.set_data(sun_loc[t], 0) + sun.set_data([sun_loc[t]], [0]) ani = FuncAnimation(fig, update_surface, frames=range(ndates), interval=25)