You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from PIL import Image
import os
if not os.path.exists('save_fig'):
os.makedirs(save_fig)
else:
[os.remove(os.path.join('save_fig',f)) for f in os.listdir('save_fig') if f.endswith('.png')]
frames = []
for i in range(200):
start_time = time.time()
# Flow Accumulator
fr.run_one_step()
# Stream Power
spr.run_one_step(dt)
# linear Diffuser
dd.run_one_step(dt)
frame = grid.at_node["topographic__elevation"][:].reshape(grid.shape)
plt.imshow(frame)
plt.colorbar()
plt.savefig(f'save_fig/{i}.png')
plt.close()
frames.append(Image.open(f'save_fig/{i}.png'))
frames[0].save('output.gif', format='GIF', append_images=frames[1:], save_all=True, duration=50, loop=0)
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: