From bb7813dbb07e9c41f3c0168bc65319a9a981596c Mon Sep 17 00:00:00 2001 From: "SK. SALAHUDDIN" <127140921+sksalahuddin2828@users.noreply.github.com> Date: Mon, 26 Jun 2023 12:33:36 +0600 Subject: [PATCH] Update 3D Earth Rotation --- 3D Earth Rotation | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/3D Earth Rotation b/3D Earth Rotation index caf67a3..a73629f 100644 --- a/3D Earth Rotation +++ b/3D Earth Rotation @@ -1,6 +1,10 @@ import matplotlib.pyplot as plt from mpl_toolkits.basemap import Basemap from matplotlib.animation import FuncAnimation +import warnings + +# Suppress warning messages +warnings.filterwarnings("ignore") # Set up the figure and axes fig = plt.figure() @@ -13,19 +17,20 @@ def update(frame): ax.cla() # Clear the axes m = Basemap(projection='ortho', lat_0=0, lon_0=frame, resolution='l') # Update lon_0 for rotation m.drawcoastlines(color='gray') - m.drawparallels(range(-90, 91, 30), labels=[1, 0, 0, 0]) - m.drawmeridians(range(-180, 181, 60), labels=[0, 0, 0, 1]) m.bluemarble() # Display the Blue Marble image ax.set_title('3D Earth Rotation') -# Set up the animation -ani = FuncAnimation(fig, update, frames=range(0, 360, 2), interval=0) +# Set up the animation with a faster rotation speed (interval=20) +ani = FuncAnimation(fig, update, frames=range(0, 360, 2), interval=20) plt.show() + #-------------------------------------------------------------------------------------------------------- -# Set up the animation slower -# ani = FuncAnimation(fig, update, frames=range(0, 360, 2), interval=20) + +# Set up the animation rotation speed you can change + +# ani = FuncAnimation(fig, update, frames=range(0, 360, 2), interval=0) # ani = FuncAnimation(fig, update, frames=range(0, 360, 2), interval=50) # plt.show()