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.

31 lines
895 B

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