|                                                                                                                                         |  | # Preparing dataclearresetset datafile separator ","set datafile missing "NaN"set bmargin at screen 0.15set lmargin at screen 0.15file="../datos/datos-covid-mexico.csv"set linestyle 1 lc rgb 'black' pt 6 ps 2  # circleset linestyle 2 lt 0 lw 3.3FIT_LIMIT = 1e-6# 1 Exposet terminal png# set output "1-1.png"# f(x) = a*exp(b*x)# fit f(x) file using 2:3 via a,b# set xlabel 'Días de Contagio' font ',12'# set xtics font ", 11"# show xlabel# set ytics font ", 11"# set ylabel 'Casos Confirmados' font ',14'# set label sprintf("f(x)=%f*e(%f*x)", a, b) at graph 0.01,0.85 font ',12'# set title 'Figura 1: Modelo Exponencial.' font ',16'# show title# set key left top font ',10'  box 3# plot [1:][]file using 2:3 title 'Casos' w p ls 1, \#      f(x) with lines ls 2 title 'Exponencial'# set output # unset output# unset label# # 2 Polinomico# clear# set output "1-2.png"# f(x) = a*x*x+b*x+c# fit f(x) file using 2:3 via a,b,c# set xtics font ", 13"# show xlabel# set ytics font ", 11"# set ylabel 'Casos confirmados' font ',14'# set label sprintf("f(x)=%f*x^2-%f*x+%f", a, b, c) at graph 0.01,0.85 font ',12'# set title 'Figura 2: Modelo polinomial' font ',16'# show title# set key left top font ',10'  box 3# plot file using 2:3 title 'Casos' w p ls 1, \#      f(x) with lines ls 2 title 'Polinomial'# set output # unset output# unset label# 3 Logaritmico clearset output "1-3.png"f(x) = a*x+bfit f(x) file using 2:9 via a, bset xlabel 'Días de contagio' font ',14'set xtics font ", 13"show xlabelset ytics font ", 11"set ylabel 'Casos confirmados' font ',14'set label sprintf("log(f(x))=%f*x+%f", a, b) at graph 0.01,0.85 font ',12'set title 'Figura 3: Modelo logarítmico' font ',16'show titleset key left top font ',10'  box 3plot file using 2:(log($3)) title 'Casos' w p ls 1, \     f(x) with lines ls 2 title 'Log'set output unset outputunset label# 4 Factor de crecimiento mexicoclearset output "1-4.png"set linestyle 1 lc rgb 'black' pt 6 ps 2  # circleset linestyle 2 lt 0 lw 3.3set xlabel 'Días de contagio' font ',14'set xtics font ", 13"show xlabelset ytics font ", 11"set ylabel 'Factor de crecimiento' font ',14'set title 'Figura 4: Factor de crecimeinto díario de COVID19 en México' font ',14'show titleset key offplot [1:][] file using 2:4 w lp ls 1set outputunset outputunset label# 5 Incremento diarioclearset output "1-5.png"g(x) = c*exp(d*x)fit g(x) file using 2:6 via c, dset xlabel 'Días de contagio' font ',14'set xtics font ", 13"show xlabelset ytics font ", 11"set ylabel 'Incremento de casos diario' font ',14'set label sprintf("f(x)=%+-f*exp(%+-f*x)", c, d) at graph 0.01,0.85 font ',12'set title 'Figura 5: Modelo lineal para incrmento de los casos diarios en México' font ',14'show titleset key left top font ',10'  box 3plot file using 2:6 title 'Incremento' w lp ls 1, \     g(x) with lines ls 2 title 'Regresor'set output unset outputunset label# 6 Modelo lineal Michoacanclearfile2="../datos/datos-covid-michoacan.csv"set output "1-6.png"f(x) = a*x+bfit f(x) file2  using 2:3 via a, bset xlabel 'Días de contagio' font ',14'set xtics font ", 13"show xlabelset ytics font ", 11"set ylabel 'Casos confirmados' font ',14'set label sprintf("f(x)=%+-f*x%+-f", a, b) at graph 0.01,0.85 font ',12'set title 'Figura 6: Modelo lineal para los casos en Michoacán' font ',14'show titleset key left top font ',10'  box 3plot file2 using 2:3 title 'Casos' w p ls 1, \     f(x) with lines ls 2 title 'Modelo'set output unset outputunset label
# Factor de crecimiento Michoacanclearset output "1-7.png"set xlabel 'Días de contagio' font ',14'set xtics font ", 13"show xlabelset ytics font ", 11"set ylabel 'Factor de crecimiento' font ',14'set title 'Figura 7: Factor de crecimeinto díario de COVID19 en Michoacán' font ',14'show titleset key offplot [1:][] file2 using 2:6 w lp ls 1set output unset outputunset label
 |