Reporte Covid19 en México y Michoacán
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
795 B

4 years ago
  1. # Preparing data
  2. clear
  3. reset
  4. set datafile separator ","
  5. set datafile missing "NaN"
  6. set bmargin at screen 0.15
  7. set lmargin at screen 0.15
  8. file="../datos/datos-inicio-mexico.csv"
  9. set linestyle 1 lc rgb 'black' pt 6 ps 2 # circle
  10. set linestyle 2 lt 0 lw 3.3
  11. # 1 Expo
  12. set terminal png
  13. set output "1-1.png"
  14. f(x) = c*exp(d*x)
  15. fit f(x) file using 2:3 via c, d
  16. set xlabel 'Días de Contagio' font ',12'
  17. set xtics font ", 11"
  18. show xlabel
  19. set ytics font ", 11"
  20. set ylabel 'Casos Confirmados' font ',14'
  21. set label sprintf("f(x)=%f*e(%f*x)", c, d) at graph 0.01,0.85 font ',12'
  22. set title 'Figura 1: Modelo Exponencial.' font ',16'
  23. show title
  24. set key left top font ',10' box 3
  25. plot file using 2:3 title 'Casos' w p ls 1, \
  26. f(x) with lines ls 2 title 'Exponencial'
  27. set output
  28. unset output
  29. unset label