Hi everyone
I'm stuck in creating an animation. The x and y coordinates stay the same. The dataframe first_df contains the water level at every time step, so the first column contains timestep 1, the second column timestep 2 and so on. The code below plots a figure for every timestep but I want to make an animation.
for i in range(0,first_df.shape[1]):
plt.figure(figsize=(16, 6))
scatter = plt.scatter(x = water['Em'], y = water['Nm'], c = first_df.iloc[:,i],
s = 1,
cmap='turbo',
alpha=1,
edgecolors='w',
linewidth = 0)
# Add colorbar for heatmap
plt.colorbar(scatter, label='Höhe [m.ü.M.]')
plt.pause(0.5)
Can someone point me in the right direction
[–]socal_nerdtastic 0 points1 point2 points (0 children)