File talk:Diseased Ebola 2014.png

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Source code in Mathematica (r) Unexy[x_,y_] := Partition[Riffle[x,y],2]; dates = {{2014, 3, 25}, {2014, 3, 26}, {2014, 3, 27}, {2014, 3,

   31}, {2014, 4, 1}, {2014, 4, 2}, {2014, 4, 7}, {2014, 4, 
   10}, {2014, 4, 17}, {2014, 4, 21}, {2014, 4, 23}, {2014, 4, 
   30}, {2014, 05, 05}, {2014, 05, 14}, {2014, 05, 23}, {2014, 05, 
   27}, {2014, 06, 2}, {2014, 06, 5}, {2014, 06, 10}, {2014, 06, 
   18}, {2014, 06, 24}, {2014, 07, 2}, {2014, 07, 8}, {2014, 7, 
   10}, {2014, 7, 15}, {2014, 7, 18}, {2014, 7, 20}, {2014, 7, 
   23}, {2014, 7, 27}, {2014, 7, 30}, {2014, 8, 1}, {2014, 8, 
   4}, {2014, 8, 6}, {2014, 8, 9}, {2014, 8, 11}, {2014, 8, 
   13}, {2014, 8, 16}, {2014, 8, 18}, {2014, 8, 20}, {2014, 8, 
   25}, {2014, 8, 31}, {2014, 9, 3}, {2014, 9, 7}, {2014, 9, 
   10}, {2014, 9, 14}, {2014, 9, 17}, {2014, 9, 21}, {2014, 9, 
   23}, {2014, 9, 25}, {2014, 9, 28}, {2014, 10, 1}, {2014, 10, 
   5}, {2014, 10, 7}, {2014, 10, 12}, {2014, 10, 14}, {2014, 10,
   17}, {2014, 10, 19}, {2014, 10, 24}, {2014, 10, 30}, {2014, 11,
   2}, {2014, 11, 4}, {2014, 11, 7}, {2014, 11, 9}, {2014, 11, 11}, 
   {2014, 11, 16}, {2014, 11, 18}, {2014, 11, 23}, {2014, 11, 25},
   {2014, 11, 28}, {2014, 11, 30}, {2014, 12, 3}, {2014, 12, 7}, 
   {2014, 12, 9}, {2014, 12, 14}, {2014, 12, 21}, {2014, 12, 24, 
   {2014, 12, 28}, {2015, 1, 4}, {2015, 1, 11}, {2014, 1, 17}};

cases = {86, 86, 103, 114, 130, 135, 163, 169, 209, 215, 220, 233,

  243, 245, 270, 309, 354, 438, 474, 528, 599, 759, 844, 888, 964, 
  1048, 1093, 1201, 1323, 1440, 1603, 1711, 1779, 1848, 1975, 2127, 
  2240, 2473, 2615, 3071, 3707, 4001, 4366, 4846, 5339, 5762, 6263, 
  6574, 6808, 7192, 7492, 8033, 8399, 8996, 9216, 9693, 9936, 11895,
  12674, 13041, 13227, 13662, 14098, 14413, 15145, 15351, 15963, 
  16204, 16903, 17145}, 17590, 17978, 18184, 18603, 19500, 19844, 
  20206, 20761, 21296, 21649};

deaths = {59, 60, 66, 70, 82, 88, 102, 108, 129, 136, 143, 153, 162,

  164, 181, 200, 208, 231, 252, 337, 338, 467, 518, 539, 603, 632, 
  660, 672, 729, 826, 887, 932, 961, 1013, 1069, 1145, 1229, 1350, 
  1427, 1553, 1808, 2089, 2177, 2375, 2586, 2746, 2900, 3043, 3159, 
  3286, 3439, 3865, 4033, 4485, 4555, 4812, 4900, 5036, 5097, 5201,
  5285, 5386, 5390, 5505, 5741, 5790, 6003, 6275, 6334, 6412, 6556, 
  6791, 6948, 7303, 7597, 7737, 7905, 8244, 8428, 8609};

datess = Table[

  AbsoluteTime[datesi], {i, 1, Dimensions[dates]1}];

Fig1 = DateListPlot[{Unexy[dates, cases], Unexy[dates, deaths]},

 Joined -> True, 
 PlotStyle -> {Directive[Thick, Red], Directive[Black, Thick]}, 
 PlotLegends -> Placed[LineLegend[{"Cases", "Deaths"}], {0.2, Top}], 
 Frame -> True, FrameLabel -> {"Date, up to 17/Jan", "Casualties"}, 
 LabelStyle -> {Medium}, ImageMargins -> 6]

Fig2 = DateListLogPlot[{Unexy[dates, cases], Unexy[dates, deaths]},

 Joined -> True, 
 PlotStyle -> {Directive[Thick, Red], Directive[Black, Thick]}, 
 PlotLegends -> Placed[LineLegend[{"Cases", "Deaths"}], {0.2, Top}], 
 Frame -> True, 
 FrameLabel -> {"Date, up to 17/Jan", "Casualties (log scale)"}, 
 LabelStyle -> {Medium}, ImageMargins -> 6]

Fig3 = DateListPlot[{Unexy[Drop[datess, 1],

   Differences[cases]/Differences[datess]*1.*3600*24], 
  Unexy[Drop[datess, 1], 
   Differences[deaths]/Differences[datess]*1.*3600*24]}, 
 PlotRange -> All, Frame -> True, 
 FrameLabel -> {"Date, up to 17/Jan", "Casualties per day"}, 
 LabelStyle -> {Medium}, Joined -> True, 
 PlotLegends -> 
  Placed[LineLegend[{"Cases per day", "Deaths per day"}], {0.2, 
    Top}], PlotStyle -> {Directive[Thick, Red], 
   Directive[Black, Thick]}, ImageMargins -> 6]


Export["Ebola0117.png", Fig1, Background -> White,

 ImageResolution -> 200];

Export["LogEbola0117.png", Fig2, Background -> White,

 ImageResolution -> 200];

Export["DEbola0117.png", Fig3, Background -> White,

 ImageResolution -> 200];

Request for changing to Vector Graphics

[edit]

Can you change the file to Vector Graphics? Benfxmth (talk) 18:25, 14 January 2015 (UTC)[reply]