forked from TRACE-LAC/covid19-waves-bogota
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfigure_1.py
56 lines (46 loc) · 1.29 KB
/
figure_1.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# -*- coding: utf-8 -*-
"""
Created on Mon Nov 28 2022
@author: davidsantiagoquevedo
@author: ntorresd
"""
import warnings
warnings.filterwarnings('ignore')
import sys
import yaml
import matplotlib.pyplot as plt
config = yaml.load(open("config.yml", "r"))["default"]
SCRIPTS_PATH = config['PATHS']['PLOT_PATH']
FIG_PATH = config['PATHS']['FIG_PATH'].format(dir = 'plots')
sys.path.append(SCRIPTS_PATH)
import results_rt as results_rt
import results_genomics as results_genomics
import results_waves as results_waves
import overview as overview
fig, ax = plt.subplots(2,2, figsize = (14,8))
axi = ax[0][0]
overview.plot_cases_death_cum(ax = axi)
results_waves.draw_waves(axi)
axi.set_title('a.')
axi = ax[0][1]
overview.plot_pyramid(ax = axi)
axi.set_xlim(left=-270000)
axi.set_xlabel('Casos')
axi.set_ylabel('Grupo de edad')
axi.set_title('b.')
axi.legend(loc = 'upper left')
axi = ax[1][0]
results_rt.plot_rt(ax = axi)
results_waves.draw_waves(axi)
axi.set_xlabel('')
axi.set_ylabel('R(t)')
axi.set_ylim(top = 2.4)
axi.tick_params(axis = 'x', rotation = 90)
axi.set_title('c.')
axi = ax[1][1]
results_genomics.plot_prevalence(ax = axi)
axi.tick_params(axis = 'x', rotation = 90)
axi.set_xlabel('')
axi.set_ylabel('Prevalencia')
axi.set_title('d.', loc = 'left')
fig.savefig(FIG_PATH + 'figure_1.png')