1
0
Fork 0

feat: New plots also gets saved as latest

This commit is contained in:
Benedikt Bastin 2021-01-16 18:38:59 +01:00
parent 706cbe9669
commit 1719780ff7
1 changed files with 2 additions and 0 deletions

View File

@ -83,6 +83,7 @@ def plot_extrapolation_portion(percentage):
print_percentage = int(percentage * 100)
plot_filename = '{}/{}_extrapolated_to_{}_percent.pdf'.format(plots_folder, filename_stand, print_percentage)
plot_filename_latest = '{}/latest_extrapolated_to_{}_percent.pdf'.format(plots_folder, print_percentage)
if os.path.isfile(plot_filename):
print('Plot {} already exists'.format(plot_filename))
@ -128,6 +129,7 @@ def plot_extrapolation_portion(percentage):
ax2.set_ylabel('Kumulierte Impfungen')
plt.savefig(plot_filename)
plt.savefig(plot_filename_latest)
plt.close()
print('Created plot {}'.format(plot_filename))