|
# Preparing data
|
|
clear
|
|
reset
|
|
set datafile separator ","
|
|
set datafile missing "NaN"
|
|
set bmargin at screen 0.15
|
|
set lmargin at screen 0.15
|
|
file="../datos/datos-inicio-mexico.csv"
|
|
set linestyle 1 lc rgb 'black' pt 6 ps 2 # circle
|
|
set linestyle 2 lt 0 lw 3.3
|
|
# 1 Expo
|
|
set terminal png
|
|
set output "1-1.png"
|
|
f(x) = c*exp(d*x)
|
|
fit f(x) file using 2:3 via c, d
|
|
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)", c, d) 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 file using 2:3 title 'Casos' w p ls 1, \
|
|
f(x) with lines ls 2 title 'Exponencial'
|
|
set output
|
|
unset output
|
|
unset label
|