1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-08-30 09:27:58 +00:00

skyplot: improve program exit

This commit is contained in:
Carles Fernandez
2025-08-25 11:28:15 +02:00
parent 6d1ad02b73
commit 114823f59a

View File

@@ -875,7 +875,11 @@ def plot_satellite_tracks(satellites, obs_lat, obs_lon, obs_alt,
plt.savefig(output_name, format=output_format, bbox_inches='tight')
print(f"Image saved as {output_name}")
if show_plot:
plt.show()
try:
plt.show()
except KeyboardInterrupt:
print("\nExecution interrupted by the user. Exiting.")
plt.close()
else:
plt.close()