Difference between revisions of "File:2020.03.12wt.png"
Line 1: | Line 1: | ||
+ | Square root of number \( n \) of daily new cases of [[coronavirus]] by [[Who]] (pink bars]] versus time \(t \) <br> |
||
+ | and the approximations from 2020.03.12. |
||
+ | ==Description== |
||
+ | Assuming that the random statistical deviation of number \(n\) of cases is of order of \( \sqrt(n) \), |
||
+ | quantify \( y = \sqrt(n) \) is chosen as ordinate axis. So, all the "error bars" are of the same length. |
||
+ | |||
+ | The four curves represent the following approximations: |
||
+ | |||
+ | {3.3258 + 70.9632 E^(-0.00329804 (-56.3936 + x)^2), 240.057, 2.28443} |
||
+ | |||
+ | {2.09163 + 64.2955 Sech[0.121898 (-51.6063 + x)], 246.714, 2.31589} |
||
+ | |||
+ | {64.9087/(1 + 0.0110225 (-50.1457 + x)^2), 303.508, 2.54119} |
||
+ | |||
+ | {0.809398 (3.3258 + 70.9632 E^(-0.00329804 (-56.3936 + x)^2)) + 12.3717/(1 + 0.0110225 (-50.1457 + x)^2), 236.332, 2.26664} |
||
+ | |||
+ | They are denoted wG, wS, wL and wM, respectively. |
||
+ | |||
+ | ==Input file== |
||
+ | <poem> |
||
+ | |||
+ | 51 03.11 37371 confirmed (4596 new) 113 areas (4 new) 1130 deaths (258 new) |
||
+ | 50 03.10 32778 confirmed (4105 new) 109 area (5 new) 872 deaths (186 new) |
||
+ | 49 03.09 28674 confirmed (3949 new) 104 countries (3 new) 686 deaths (202 new) |
||
+ | 48 03.08 24727 confirmed (3610 new) 101 Countries (8 new) 484 deaths (71 new) |
||
+ | 47 03.07 21110 confirmed (3633 new) 93 Countries (5 new) 413 deaths (78 new) |
||
+ | 46 03.06 17481 confirmed (2727 new) 88 Countries (4 new) 335 deaths (69 new) |
||
+ | 45 03.05 14768 confirmed (2098 new) 85 Countries (5 new) 267 deaths (53 new) |
||
+ | 44 03.04 12668 confirmed (2103 new) 76 countries (4 new) 214 deaths (48 new) |
||
+ | 43 03.03 10566 confirmed (1792 new) 72 countries (8 new) 166 deaths (38 new) |
||
+ | 42 03.02 8774 confirmed (1600 new) 64 countries (6 new) 128 deaths (24 new) |
||
+ | 41 03.01 7169 confirmed (1160 new) 58 countries (5 new) 104 deaths (18 new) |
||
+ | 40 02.29 6009 confirmed (1318 new) 53 countries (2 new) 86 deaths (19 new) |
||
+ | 39 02.28 4691 confirmed (1027 new) 51 countries (5 new) 67 deaths (10 new) |
||
+ | 38 02.27 3664 confirmed (746 new) 46 countries (9 new) 57 deaths (13 new) |
||
+ | 37 02.26 2918 confirmed (459 new) 37 countries (4 new) 44 deaths (10 new) |
||
+ | 36 02.25 2459 confirmed (390 new) 33 countries (4 new) 34 deaths (11 new) |
||
+ | 35 02.24 2069 confirmed (300 new) 29 countries (1 new) 23 deaths (6 new) |
||
+ | 34 02.23 1769 confirmed (367 new) 28 countries (0 new) 17 deaths (6 new) |
||
+ | 33 02.22 1402 confirmed (202 new) 28 countries (2 new) 11 deaths (3 new) |
||
+ | 32 02.21 1200 confirmed (127 new) 26 countries (0 new) 8 deaths (0 new) |
||
+ | 31 02.20 1073 confirmed (149 new) 26 countries (1 new) 8 deaths (5 new) |
||
+ | 30 02.19 924 confirmed (120 new) 25 countries (0 new) 3 deaths (0 new) |
||
+ | 29 02.18 804 confirmed (10 new) 25 countries (0 new) 3 deaths (0 new) |
||
+ | 28 02.17 794 confirmed (111 new) 25 countries (0 new) 3 deaths (0 new) |
||
+ | 27 02.16 683 confirmed (157 new) 25 countries (0 new) 3 deaths (1 new) |
||
+ | 26 02.15 526 confirmed (21 new) 25 countries (1 new) 2 deaths (0 new) |
||
+ | 25 02.14 505 confirmed (58 new) 24 countries (0 new) 2 deaths (1 new) |
||
+ | 24 02.13 447 confirmed (6 new) 24 countries (0 new) 1 deaths (0 new) |
||
+ | 23 02.12 441 confirmed (46 new) 24 countries (0 new) 1 deaths (0 new) |
||
+ | 22 02.13 395 confirmed (76 new) 24 countries (0 new) 1 deaths (0 new) |
||
+ | 21 02.10 319 confirmed (12 new) 24 countries (0 new) 1 deaths (0 new) |
||
+ | 20 02.09 288 confirmed (18 new) 24 countries (0 new) 1 deaths (0 new) |
||
+ | 19 02.08 270 confirmed (54 new) 24 countries (0 new) 1 deaths (0 new) |
||
+ | 18 02.07 216 confirmed (25 new) 24 countries (0 new) 1 deaths (0 new) |
||
+ | 17 02.06 191 confirmed (0 new) 24 countries (0 new) 1 deaths (0 new) |
||
+ | 16 02.05 191 erratum?? (31 new) 24 sh.b.32ne (1 new) 1 deaths (0 new) |
||
+ | 15 02.04 159 confirmed (6 new) 23 countries (0 new) 1 deaths (0 new) |
||
+ | 14 02.03 153 erratum?? (7 new) 23 countries (0 new) 1 deaths (0 new) |
||
+ | 13 02.02 146 confirmed (14 new) 23 countries (0 new) 1 deaths (1 new) |
||
+ | 12 02.01 132 confirmed (26 new) 23 countries (4 new) 0 deaths (0 new) |
||
+ | 11 01.31 106 confirmed (0 n) 19 countries 0 0 0 0 0 0 |
||
+ | 10 01.30 82 confirmed (0 n) 18 countries 0 0 0 0 0 0 |
||
+ | 9 1.29 68 confirmed (0 n) 15 countries 0 0 0 0 0 0 |
||
+ | 8 1.28 56 confirmed (0 n) 14 countries 0 0 0 0 0 0 |
||
+ | 7 1.27 37 confirmed (0 n) 11 ooooooooo 0 0 0 0 0 0 |
||
+ | 6 1.26 29 coooooooo (0 n) 10 ooooooooo 0 0 0 0 0 0 |
||
+ | 5 1.25 23 coooooooo (0 n) 9 oooooooooo 0 0 0 0 0 0 |
||
+ | 4 1.24 11 coooooooo (0 n) 6 oooooooooo 0 0 0 0 0 0 |
||
+ | 3 1.23 7 cooooooooo (0 n) 4 o 0 0 0 0 0 0 |
||
+ | 2 1.22 4 coo (0 n) 4 o 0 0 0 0 0 0 |
||
+ | 1 1.21 4 c (0 n) 4 o 0 0 0 0 0 0 |
||
+ | </poem> |
||
+ | |||
+ | ==[[C++]] generator of curves== |
||
+ | <poem><code> |
||
+ | #include<math.h> |
||
+ | #include<stdio.h> |
||
+ | #include<stdlib.h> |
||
+ | #define DB double |
||
+ | #define DO(x,y) for(x=0;x<y;x++) |
||
+ | int ado(FILE *O, int X, int Y) |
||
+ | { fprintf(O,"%c!PS-Adobe-2.0 EPSF-2.0\n",'%'); |
||
+ | fprintf(O,"%c%cBoundingBox: 0 0 %d %d\n",'%','%',X,Y); |
||
+ | fprintf(O,"/M {moveto} bind def\n"); |
||
+ | fprintf(O,"/L {lineto} bind def\n"); |
||
+ | fprintf(O,"/S {stroke} bind def\n"); |
||
+ | fprintf(O,"/s {show newpath} bind def\n"); |
||
+ | fprintf(O,"/C {closepath} bind def\n"); |
||
+ | fprintf(O,"/F {fill} bind def\n"); |
||
+ | fprintf(O,"/o {1 0 360 arc C F} bind def\n"); |
||
+ | // fprintf(O,"/times-Roman-Bold findfont 20 scalefont setfont\n"); |
||
+ | fprintf(O,"/Helvetica-Bold findfont 2 scalefont setfont\n"); |
||
+ | fprintf(O,"/W {setlinewidth} bind def\n"); |
||
+ | fprintf(O,"/RGB {setrgbcolor} bind def\n"); |
||
+ | return 0; |
||
+ | } |
||
+ | DB wG(DB x){ x-=56.3936; return 3.3258 + 70.9632*exp(-0.00329804*x*x);} // 240.057, 2.28443 |
||
+ | DB wS(DB x){ x-=51.6063; return 2.09163 + 64.2955/cosh(0.121898*x);} // 246.714, 2.31589 |
||
+ | DB wL(DB x){ x-=50.1457; return 64.9087/(1 + 0.0110225*x*x);} //, 303.508, 2.54119 |
||
+ | DB wM(DB x){ DB a=0.809398; return a*wG(x) + (1.-a)*wL(x);} // 236.332, 2.26664} |
||
+ | int main(){ DB x,y; |
||
+ | int j,J,k,K,m,M,n,N,p,S; float d; FILE *i,*o; char c,s[99]; |
||
+ | //o=fopen("16.eps","w"); |
||
+ | o=fopen("20200312w.eps","w"); |
||
+ | ado(o,808,746); |
||
+ | #define M(x,y) fprintf(o,"%6.4f %6.4f M\n",0.+x,0.+y); |
||
+ | #define L(x,y) fprintf(o,"%6.4f %6.4f L\n",0.+x,0.+y); |
||
+ | fprintf(o,"%6.2f %6.2f o\n",0.+x,0.+y); |
||
+ | fprintf(o,"2 2 translate 10 10 scale 1 setlinejoin\n"); |
||
+ | DO(m,16){M(5*m,0)L(5*m,70)} |
||
+ | DO(n,8){M(0,10*n)L(75,10*n)} |
||
+ | fprintf(o,"0 0 0 RGB 2 setlinecap .1 W S\n"); |
||
+ | float D[99]; |
||
+ | int e0[99]; |
||
+ | int f0[99]; |
||
+ | DB f1[99]; |
||
+ | i=fopen("who.txt","r"); |
||
+ | N=0; e0[0]=0; |
||
+ | for(k=1;k<51;k++){ |
||
+ | j=fscanf(i,"%d%f%d",&n,&d,&m); if(j<3) break; |
||
+ | printf("%2d n=%2d d=%5.2f m=%5d ",k,n,d,m); |
||
+ | j=fscanf(i,"%s",s); printf(" %10s",s); |
||
+ | j=fscanf(i,"%c",&c); printf(" %c",c); |
||
+ | j=fscanf(i,"%c",&c); printf(" %c",c); |
||
+ | j=fscanf(i,"%d",&p); printf("%5d ",p); |
||
+ | fgets(s,99,i); |
||
+ | printf("%s",s); |
||
+ | // printf("\n"); |
||
+ | if(n>0 && n<99) { D[n]=d; e0[n]=m; if(n>N) N=n;} |
||
+ | // fprintf(o,"%2d %5.2f %6d\n",n,D[n],e0[n]);} |
||
+ | } |
||
+ | fclose(i); N++; |
||
+ | for(n=5;n<N;n+=5){if(n<40) fprintf(o,"gsave %4.2f 25.2 translate 90 rotate 0 -6 M 0 0 0 RGB (2020.0%4.02f) show grestore\n",n-5.3,D[n]); |
||
+ | else fprintf(o,"gsave %4.2f 5.2 translate 90 rotate 0 -6 M 0 0 0 RGB (2020.0%4.02f) show grestore\n",n-5.3,D[n]); |
||
+ | } |
||
+ | e0[0]=0; for(n=1;n<N;n++) {f0[n]=e0[n]-e0[n-1]; f1[n]=sqrt(double(f0[n]));} |
||
+ | for(n=1;n<N;n++) {printf("%2d %04.2f %6d %5d %7.3lf\n",n,D[n],e0[n],f0[n],f1[n]);} |
||
+ | n=50; fprintf(o,"gsave %4.2f 5.2 translate 90 rotate 0 -6 M 0 0 0 RGB (2020.03.10) show grestore\n",n-5.3); |
||
+ | n=55; fprintf(o,"gsave %4.2f 5.2 translate 90 rotate 0 -6 M 0 0 0 RGB (2020.03.15) show grestore\n",n-5.3); |
||
+ | n=60; fprintf(o,"gsave %4.2f 5.2 translate 90 rotate 0 -6 M 0 0 0 RGB (2020.03.20) show grestore\n",n-5.3); |
||
+ | n=65; fprintf(o,"gsave %4.2f 5.2 translate 90 rotate 0 -6 M 0 0 0 RGB (2020.03.25) show grestore\n",n-5.3); |
||
+ | n=70; fprintf(o,"gsave %4.2f 55.5 translate 90 rotate 0 -6 M 0 0 0 RGB (2020.03.30) show grestore\n",n-5.3); |
||
+ | n=75; fprintf(o,"gsave %4.2f 55.5 translate 90 rotate 0 -6 M 0 0 0 RGB (2020.04.04) show grestore\n",n-5.3); |
||
+ | // M(0,0) for(n=1;n<N;n++) L(n,f1[n]); |
||
+ | for(n=1;n<N;n++) {y=f1[n]; M(n,y-1.5)L(n,y+1.5)}; |
||
+ | fprintf(o,"1 0 1 RGB 1 setlinecap .8 W S\n"); |
||
+ | M(0,wG(0)); for(n=1;n<82;n++) L(n,wG(n)) fprintf(o,".8 0 0 RGB .4 W S\n"); |
||
+ | M(0,wS(0)); for(n=1;n<82;n++) L(n,wS(n)) fprintf(o,"0 .7 0 RGB .4 W S\n"); |
||
+ | M(0,wL(0)); for(n=1;n<82;n++) L(n,wL(n)) fprintf(o,"0 0 .8 RGB .4 W S\n"); |
||
+ | M(0,wM(0)); for(n=1;n<82;n++) L(n,wM(n)) fprintf(o,"0 0 0 RGB .4 W S\n"); |
||
+ | fprintf(o,"showpage\n%c%cTrailer",'%','%'); fclose(o); |
||
+ | system("epstopdf 20200312w.eps"); |
||
+ | system( "open 20200312w.pdf"); |
||
+ | } |
||
+ | </code></poem> |
||
+ | |||
+ | ==[[Latex]] generator of curves== |
||
+ | \documentclass[12pt]{article} |
||
+ | \usepackage{geometry} |
||
+ | \usepackage{graphicx} |
||
+ | \usepackage{rotating} |
||
+ | \usepackage{color} |
||
+ | %\definecolor{pink}{RGB}{255,127,255} |
||
+ | \paperwidth 840pt |
||
+ | \paperheight 780pt |
||
+ | \textwidth 900pt |
||
+ | \textheight 1200pt |
||
+ | \topmargin -108pt |
||
+ | \oddsidemargin -72pt |
||
+ | \newcommand \ing {\includegraphics} |
||
+ | \newcommand \sx {\scalebox} |
||
+ | \newcommand \rot {\begin{rotate}} |
||
+ | \newcommand \ero {\end{rotate}} |
||
+ | \pagestyle{empty} |
||
+ | \begin{document} |
||
+ | \parindent 0pt |
||
+ | %\sx{1}[.9]{\begin{picture}(530,830) |
||
+ | {\begin{picture}(530,764) |
||
+ | %\put(30,10){\ing{16.pdf}} |
||
+ | \put(30,10){\ing{20200312w}} |
||
+ | %\put(30,10){\ing{2020.03.11w.pdf}} |
||
+ | %\put( 0,815){\sx{1.7}{$\sqrt{n}$}} \put(60,817){\sx{1.7}{$n$, number of new cases}} |
||
+ | \put(8,730){\sx{2.1}{$y$}} \put(56,726){\sx{1.7}{$n\!=\!y^2$, number of new cases outside China by Who}} |
||
+ | \put(4,707){\sx{2}{70}} \put(33,707){\sx{1.7}{4900}} |
||
+ | \put(4,607){\sx{2}{60}} \put(33,607){\sx{1.7}{3600}} |
||
+ | \put(4,507){\sx{2}{50}} \put(33,507){\sx{1.7}{2500}} |
||
+ | \put(4,407){\sx{2}{40}} \put(33,407){\sx{1.7}{1600}} |
||
+ | \put(4,307){\sx{2}{30}} \put(33,307){\sx{1.7}{~900}} |
||
+ | \put(4,207){\sx{2}{20}} \put(33,207){\sx{1.7}{~400}} |
||
+ | \put(4,107){\sx{2}{10}} \put(33,107){\sx{1.7}{~100}} |
||
+ | \put(4,07){\sx{2}{~0}} |
||
+ | \put(26,-7){\sx{2}{0}} |
||
+ | \put(120,-7){\sx{2}{10}} |
||
+ | \put(221,-7){\sx{2}{20}} |
||
+ | \put(321,-7){\sx{2}{30}} |
||
+ | \put(421,-7){\sx{2}{40}} |
||
+ | \put(521,-7){\sx{2}{50}} |
||
+ | \put(621,-7){\sx{2}{60}} |
||
+ | \put(721,-7){\sx{2}{70}} |
||
+ | %\put(575,-7){\sx{2}{$t$,days}} |
||
+ | \put(775,-7){\sx{2}{$t$,days}} |
||
+ | \put(696,600){\rot{-72}\sx{3}{$y\!=\!\mathrm{G}(t)$}\ero} |
||
+ | \put(652,540){\rot{-74}\sx{3}{$y\!=\!\mathrm{M}(t)$}\ero} |
||
+ | \put(620,460){\rot{-74}\sx{3}{$y\!=\!\mathrm{S}(t)$}\ero} |
||
+ | \put(592,388){\rot{-79}\sx{3}{$y\!=\!\mathrm{L}(t)$}\ero} |
||
+ | \end{picture}} |
||
+ | \end{document} |
Revision as of 14:28, 12 March 2020
Square root of number \( n \) of daily new cases of coronavirus by Who (pink bars]] versus time \(t \)
and the approximations from 2020.03.12.
Description
Assuming that the random statistical deviation of number \(n\) of cases is of order of \( \sqrt(n) \), quantify \( y = \sqrt(n) \) is chosen as ordinate axis. So, all the "error bars" are of the same length.
The four curves represent the following approximations:
{3.3258 + 70.9632 E^(-0.00329804 (-56.3936 + x)^2), 240.057, 2.28443}
{2.09163 + 64.2955 Sech[0.121898 (-51.6063 + x)], 246.714, 2.31589}
{64.9087/(1 + 0.0110225 (-50.1457 + x)^2), 303.508, 2.54119}
{0.809398 (3.3258 + 70.9632 E^(-0.00329804 (-56.3936 + x)^2)) + 12.3717/(1 + 0.0110225 (-50.1457 + x)^2), 236.332, 2.26664}
They are denoted wG, wS, wL and wM, respectively.
Input file
51 03.11 37371 confirmed (4596 new) 113 areas (4 new) 1130 deaths (258 new)
50 03.10 32778 confirmed (4105 new) 109 area (5 new) 872 deaths (186 new)
49 03.09 28674 confirmed (3949 new) 104 countries (3 new) 686 deaths (202 new)
48 03.08 24727 confirmed (3610 new) 101 Countries (8 new) 484 deaths (71 new)
47 03.07 21110 confirmed (3633 new) 93 Countries (5 new) 413 deaths (78 new)
46 03.06 17481 confirmed (2727 new) 88 Countries (4 new) 335 deaths (69 new)
45 03.05 14768 confirmed (2098 new) 85 Countries (5 new) 267 deaths (53 new)
44 03.04 12668 confirmed (2103 new) 76 countries (4 new) 214 deaths (48 new)
43 03.03 10566 confirmed (1792 new) 72 countries (8 new) 166 deaths (38 new)
42 03.02 8774 confirmed (1600 new) 64 countries (6 new) 128 deaths (24 new)
41 03.01 7169 confirmed (1160 new) 58 countries (5 new) 104 deaths (18 new)
40 02.29 6009 confirmed (1318 new) 53 countries (2 new) 86 deaths (19 new)
39 02.28 4691 confirmed (1027 new) 51 countries (5 new) 67 deaths (10 new)
38 02.27 3664 confirmed (746 new) 46 countries (9 new) 57 deaths (13 new)
37 02.26 2918 confirmed (459 new) 37 countries (4 new) 44 deaths (10 new)
36 02.25 2459 confirmed (390 new) 33 countries (4 new) 34 deaths (11 new)
35 02.24 2069 confirmed (300 new) 29 countries (1 new) 23 deaths (6 new)
34 02.23 1769 confirmed (367 new) 28 countries (0 new) 17 deaths (6 new)
33 02.22 1402 confirmed (202 new) 28 countries (2 new) 11 deaths (3 new)
32 02.21 1200 confirmed (127 new) 26 countries (0 new) 8 deaths (0 new)
31 02.20 1073 confirmed (149 new) 26 countries (1 new) 8 deaths (5 new)
30 02.19 924 confirmed (120 new) 25 countries (0 new) 3 deaths (0 new)
29 02.18 804 confirmed (10 new) 25 countries (0 new) 3 deaths (0 new)
28 02.17 794 confirmed (111 new) 25 countries (0 new) 3 deaths (0 new)
27 02.16 683 confirmed (157 new) 25 countries (0 new) 3 deaths (1 new)
26 02.15 526 confirmed (21 new) 25 countries (1 new) 2 deaths (0 new)
25 02.14 505 confirmed (58 new) 24 countries (0 new) 2 deaths (1 new)
24 02.13 447 confirmed (6 new) 24 countries (0 new) 1 deaths (0 new)
23 02.12 441 confirmed (46 new) 24 countries (0 new) 1 deaths (0 new)
22 02.13 395 confirmed (76 new) 24 countries (0 new) 1 deaths (0 new)
21 02.10 319 confirmed (12 new) 24 countries (0 new) 1 deaths (0 new)
20 02.09 288 confirmed (18 new) 24 countries (0 new) 1 deaths (0 new)
19 02.08 270 confirmed (54 new) 24 countries (0 new) 1 deaths (0 new)
18 02.07 216 confirmed (25 new) 24 countries (0 new) 1 deaths (0 new)
17 02.06 191 confirmed (0 new) 24 countries (0 new) 1 deaths (0 new)
16 02.05 191 erratum?? (31 new) 24 sh.b.32ne (1 new) 1 deaths (0 new)
15 02.04 159 confirmed (6 new) 23 countries (0 new) 1 deaths (0 new)
14 02.03 153 erratum?? (7 new) 23 countries (0 new) 1 deaths (0 new)
13 02.02 146 confirmed (14 new) 23 countries (0 new) 1 deaths (1 new)
12 02.01 132 confirmed (26 new) 23 countries (4 new) 0 deaths (0 new)
11 01.31 106 confirmed (0 n) 19 countries 0 0 0 0 0 0
10 01.30 82 confirmed (0 n) 18 countries 0 0 0 0 0 0
9 1.29 68 confirmed (0 n) 15 countries 0 0 0 0 0 0
8 1.28 56 confirmed (0 n) 14 countries 0 0 0 0 0 0
7 1.27 37 confirmed (0 n) 11 ooooooooo 0 0 0 0 0 0
6 1.26 29 coooooooo (0 n) 10 ooooooooo 0 0 0 0 0 0
5 1.25 23 coooooooo (0 n) 9 oooooooooo 0 0 0 0 0 0
4 1.24 11 coooooooo (0 n) 6 oooooooooo 0 0 0 0 0 0
3 1.23 7 cooooooooo (0 n) 4 o 0 0 0 0 0 0
2 1.22 4 coo (0 n) 4 o 0 0 0 0 0 0
1 1.21 4 c (0 n) 4 o 0 0 0 0 0 0
C++ generator of curves
#include<math.h>
#include<stdio.h>
#include<stdlib.h>
#define DB double
#define DO(x,y) for(x=0;x<y;x++)
int ado(FILE *O, int X, int Y)
{ fprintf(O,"%c!PS-Adobe-2.0 EPSF-2.0\n",'%');
fprintf(O,"%c%cBoundingBox: 0 0 %d %d\n",'%','%',X,Y);
fprintf(O,"/M {moveto} bind def\n");
fprintf(O,"/L {lineto} bind def\n");
fprintf(O,"/S {stroke} bind def\n");
fprintf(O,"/s {show newpath} bind def\n");
fprintf(O,"/C {closepath} bind def\n");
fprintf(O,"/F {fill} bind def\n");
fprintf(O,"/o {1 0 360 arc C F} bind def\n");
// fprintf(O,"/times-Roman-Bold findfont 20 scalefont setfont\n");
fprintf(O,"/Helvetica-Bold findfont 2 scalefont setfont\n");
fprintf(O,"/W {setlinewidth} bind def\n");
fprintf(O,"/RGB {setrgbcolor} bind def\n");
return 0;
}
DB wG(DB x){ x-=56.3936; return 3.3258 + 70.9632*exp(-0.00329804*x*x);} // 240.057, 2.28443
DB wS(DB x){ x-=51.6063; return 2.09163 + 64.2955/cosh(0.121898*x);} // 246.714, 2.31589
DB wL(DB x){ x-=50.1457; return 64.9087/(1 + 0.0110225*x*x);} //, 303.508, 2.54119
DB wM(DB x){ DB a=0.809398; return a*wG(x) + (1.-a)*wL(x);} // 236.332, 2.26664}
int main(){ DB x,y;
int j,J,k,K,m,M,n,N,p,S; float d; FILE *i,*o; char c,s[99];
//o=fopen("16.eps","w");
o=fopen("20200312w.eps","w");
ado(o,808,746);
#define M(x,y) fprintf(o,"%6.4f %6.4f M\n",0.+x,0.+y);
#define L(x,y) fprintf(o,"%6.4f %6.4f L\n",0.+x,0.+y);
fprintf(o,"%6.2f %6.2f o\n",0.+x,0.+y);
fprintf(o,"2 2 translate 10 10 scale 1 setlinejoin\n");
DO(m,16){M(5*m,0)L(5*m,70)}
DO(n,8){M(0,10*n)L(75,10*n)}
fprintf(o,"0 0 0 RGB 2 setlinecap .1 W S\n");
float D[99];
int e0[99];
int f0[99];
DB f1[99];
i=fopen("who.txt","r");
N=0; e0[0]=0;
for(k=1;k<51;k++){
j=fscanf(i,"%d%f%d",&n,&d,&m); if(j<3) break;
printf("%2d n=%2d d=%5.2f m=%5d ",k,n,d,m);
j=fscanf(i,"%s",s); printf(" %10s",s);
j=fscanf(i,"%c",&c); printf(" %c",c);
j=fscanf(i,"%c",&c); printf(" %c",c);
j=fscanf(i,"%d",&p); printf("%5d ",p);
fgets(s,99,i);
printf("%s",s);
// printf("\n");
if(n>0 && n<99) { D[n]=d; e0[n]=m; if(n>N) N=n;}
// fprintf(o,"%2d %5.2f %6d\n",n,D[n],e0[n]);}
}
fclose(i); N++;
for(n=5;n<N;n+=5){if(n<40) fprintf(o,"gsave %4.2f 25.2 translate 90 rotate 0 -6 M 0 0 0 RGB (2020.0%4.02f) show grestore\n",n-5.3,D[n]);
else fprintf(o,"gsave %4.2f 5.2 translate 90 rotate 0 -6 M 0 0 0 RGB (2020.0%4.02f) show grestore\n",n-5.3,D[n]);
}
e0[0]=0; for(n=1;n<N;n++) {f0[n]=e0[n]-e0[n-1]; f1[n]=sqrt(double(f0[n]));}
for(n=1;n<N;n++) {printf("%2d %04.2f %6d %5d %7.3lf\n",n,D[n],e0[n],f0[n],f1[n]);}
n=50; fprintf(o,"gsave %4.2f 5.2 translate 90 rotate 0 -6 M 0 0 0 RGB (2020.03.10) show grestore\n",n-5.3);
n=55; fprintf(o,"gsave %4.2f 5.2 translate 90 rotate 0 -6 M 0 0 0 RGB (2020.03.15) show grestore\n",n-5.3);
n=60; fprintf(o,"gsave %4.2f 5.2 translate 90 rotate 0 -6 M 0 0 0 RGB (2020.03.20) show grestore\n",n-5.3);
n=65; fprintf(o,"gsave %4.2f 5.2 translate 90 rotate 0 -6 M 0 0 0 RGB (2020.03.25) show grestore\n",n-5.3);
n=70; fprintf(o,"gsave %4.2f 55.5 translate 90 rotate 0 -6 M 0 0 0 RGB (2020.03.30) show grestore\n",n-5.3);
n=75; fprintf(o,"gsave %4.2f 55.5 translate 90 rotate 0 -6 M 0 0 0 RGB (2020.04.04) show grestore\n",n-5.3);
// M(0,0) for(n=1;n<N;n++) L(n,f1[n]);
for(n=1;n<N;n++) {y=f1[n]; M(n,y-1.5)L(n,y+1.5)};
fprintf(o,"1 0 1 RGB 1 setlinecap .8 W S\n");
M(0,wG(0)); for(n=1;n<82;n++) L(n,wG(n)) fprintf(o,".8 0 0 RGB .4 W S\n");
M(0,wS(0)); for(n=1;n<82;n++) L(n,wS(n)) fprintf(o,"0 .7 0 RGB .4 W S\n");
M(0,wL(0)); for(n=1;n<82;n++) L(n,wL(n)) fprintf(o,"0 0 .8 RGB .4 W S\n");
M(0,wM(0)); for(n=1;n<82;n++) L(n,wM(n)) fprintf(o,"0 0 0 RGB .4 W S\n");
fprintf(o,"showpage\n%c%cTrailer",'%','%'); fclose(o);
system("epstopdf 20200312w.eps");
system( "open 20200312w.pdf");
}
Latex generator of curves
\documentclass[12pt]{article} \usepackage{geometry} \usepackage{graphicx} \usepackage{rotating} \usepackage{color} %\definecolor{pink}{RGB}{255,127,255} \paperwidth 840pt \paperheight 780pt \textwidth 900pt \textheight 1200pt \topmargin -108pt \oddsidemargin -72pt \newcommand \ing {\includegraphics} \newcommand \sx {\scalebox} \newcommand \rot {\begin{rotate}} \newcommand \ero {\end{rotate}} \pagestyle{empty} \begin{document} \parindent 0pt %\sx{1}[.9]{\begin{picture}(530,830) {\begin{picture}(530,764) %\put(30,10){\ing{16.pdf}} \put(30,10){\ing{20200312w}} %\put(30,10){\ing{2020.03.11w.pdf}} %\put( 0,815){\sx{1.7}{$\sqrt{n}$}} \put(60,817){\sx{1.7}{$n$, number of new cases}} \put(8,730){\sx{2.1}{$y$}} \put(56,726){\sx{1.7}{$n\!=\!y^2$, number of new cases outside China by Who}} \put(4,707){\sx{2}{70}} \put(33,707){\sx{1.7}{4900}} \put(4,607){\sx{2}{60}} \put(33,607){\sx{1.7}{3600}} \put(4,507){\sx{2}{50}} \put(33,507){\sx{1.7}{2500}} \put(4,407){\sx{2}{40}} \put(33,407){\sx{1.7}{1600}} \put(4,307){\sx{2}{30}} \put(33,307){\sx{1.7}{~900}} \put(4,207){\sx{2}{20}} \put(33,207){\sx{1.7}{~400}} \put(4,107){\sx{2}{10}} \put(33,107){\sx{1.7}{~100}} \put(4,07){\sx{2}{~0}} \put(26,-7){\sx{2}{0}} \put(120,-7){\sx{2}{10}} \put(221,-7){\sx{2}{20}} \put(321,-7){\sx{2}{30}} \put(421,-7){\sx{2}{40}} \put(521,-7){\sx{2}{50}} \put(621,-7){\sx{2}{60}} \put(721,-7){\sx{2}{70}} %\put(575,-7){\sx{2}{$t$,days}} \put(775,-7){\sx{2}{$t$,days}} \put(696,600){\rot{-72}\sx{3}{$y\!=\!\mathrm{G}(t)$}\ero} \put(652,540){\rot{-74}\sx{3}{$y\!=\!\mathrm{M}(t)$}\ero} \put(620,460){\rot{-74}\sx{3}{$y\!=\!\mathrm{S}(t)$}\ero} \put(592,388){\rot{-79}\sx{3}{$y\!=\!\mathrm{L}(t)$}\ero} \end{picture}} \end{document}
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 14:27, 12 March 2020 | 1,162 × 1,079 (217 KB) | T (talk | contribs) |
You cannot overwrite this file.
File usage
There are no pages that use this file.