feat: New plots also gets saved as latest
This commit is contained in:
parent
706cbe9669
commit
1719780ff7
1 changed files with 2 additions and 0 deletions
2
plot.py
2
plot.py
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue