Print a clear message when grid is ready

Also use plt.pause before plotting, ensuring plot is updated in real time
This commit is contained in:
Gael-de-Sailly 2020-11-15 11:13:42 +01:00
parent 52766e8918
commit 1f41423104
2 changed files with 4 additions and 1 deletions

View File

@ -142,4 +142,6 @@ with open('size', 'w') as sfile:
sfile.write('{:d}\n{:d}'.format(mapsize+1, mapsize+1))
terrainlib.stats(model.dem, model.lakes)
terrainlib.plot(model.dem, model.lakes, title='Final map')
print()
print('Grid is ready for use!')
terrainlib.plot(model.dem, model.lakes, title='Final grid, ready for use!')

View File

@ -55,6 +55,7 @@ if has_matplotlib:
def plot(*args, **kwargs):
plt.clf()
view_map(*args, **kwargs)
plt.pause(0.01)
plt.show()
else: