File:HackDietDP.svg
From Wikiversity
Jump to navigation
Jump to search
Size of this PNG preview of this SVG file: 800 × 400 pixels. Other resolutions: 320 × 160 pixels | 640 × 320 pixels | 1,024 × 512 pixels | 1,280 × 640 pixels | 2,560 × 1,280 pixels | 864 × 432 pixels.
Original file (SVG file, nominally 864 × 432 pixels, file size: 57 KB)
This is a file from the Wikimedia Commons. The description on its description page there is shown below.
Commons is a freely licensed media file repository. You can help. |
Summary
DescriptionHackDietDP.svg |
English: DP losing weight following The Hacker's Diet.
Plotting code in Python: from matplotlib import pyplot as plt import datetime expMovingAvgCoef = 0.05 outFileName = "HackDietDP.svg" weightData = [ ("28.1.2005", 77), ("29.1.2005", 76), ("30.1.2005", 77), ("31.1.2005", 75.5), ("1.2.2005", 75), ("2.2.2005", 79), ("3.2.2005", 79), ("4.2.2005", 80), ("5.2.2005", 77), ("6.2.2005", 77), ("7.2.2005", 76), ("8.2.2005", 76), ("9.2.2005", 78), ("10.2.2005", 79), ("11.2.2005", 79), ("12.2.2005", 80), ("13.2.2005", 79), ("14.2.2005", 79), ("15.2.2005", 77), ("16.2.2005", 78), ("17.2.2005", 78), ("18.2.2005", 79), ("19.2.2005", 79), ("20.2.2005", 81), ("21.2.2005", 79), ("22.2.2005", 78), ("23.2.2005", 80), ("24.2.2005", 80), ("25.2.2005", 79), ("26.2.2005", 79), ("27.2.2005", 79), ("28.2.2005", 80), ("1.3.2005", 78), ("2.3.2005", 78), ("3.3.2005", 78), ("4.3.2005", 78), ("5.3.2005", 78), ("6.3.2005", 79), ("7.3.2005", 80), ("8.3.2005", 78), ("9.3.2005", 78), ("10.3.2005", 78), ("11.3.2005", 79), ("12.3.2005", 80), ("13.3.2005", 80), ("14.3.2005", 81), ("15.3.2005", 77), ("16.3.2005", 78), ("17.3.2005", 78), ("18.3.2005", 78), ("19.3.2005", 78), ("20.3.2005", 80), ("21.3.2005", 80), ("22.3.2005", 80), ("23.3.2005", 80), ("24.3.2005", 80), ("25.3.2005", 80), ("26.3.2005", 80), ("27.3.2005", 82), ("28.3.2005", 80), ("29.3.2005", 79), ("30.3.2005", 81), ("31.3.2005", 80), ("1.4.2005", 80), ("2.4.2005", 79), ("3.4.2005", 79), ("4.4.2005", 79), ("5.4.2005", 76), ("6.4.2005", 78), ("7.4.2005", 77), ("8.4.2005", 77), ("9.4.2005", 77), ("10.4.2005", 76), ("11.4.2005", 80), ("12.4.2005", 76), ("13.4.2005", 78), ("14.4.2005", 78), ("15.4.2005", 78), ("16.4.2005", 78), ("17.4.2005", 78), ("18.4.2005", 78), ("19.4.2005", 78), ("20.4.2005", 78), ("21.4.2005", 80), ("22.4.2005", 79), ("23.4.2005", 79), ("24.4.2005", 78), ("25.4.2005", 78), ("26.4.2005", 78), ("27.4.2005", 78), ("28.4.2005", 78), ("29.4.2005", 76), ("30.4.2005", 76), ("1.5.2005", 77), ("2.5.2005", 77), ("3.5.2005", 79), ("4.5.2005", 77), ("5.5.2005", 77), ("6.5.2005", 77), ("7.5.2005", 77), ("8.5.2005", 77), ("9.5.2005", 79), ("10.5.2005", 79), ("11.5.2005", 80), ("12.5.2005", 80), ("13.5.2005", 80), ("14.5.2005", 77), ("15.5.2005", 78), ("16.5.2005", 78), ("17.5.2005", 80), ("18.5.2005", 80), ("19.5.2005", 80), ("20.5.2005", 80), ("21.5.2005", 78), ("22.5.2005", 78), ("23.5.2005", 78), ("24.5.2005", 78), ("25.5.2005", 78), ("26.5.2005", 78), ("27.5.2005", 78), ("28.5.2005", 78), ("29.5.2005", 78), ("30.5.2005", 78), ("31.5.2005", 78), ("1.6.2005", 78), ("2.6.2005", 78), ("3.6.2005", 78), ("4.6.2005", 80), ("5.6.2005", 79), ("6.6.2005", 77), ("7.6.2005", 77), ("8.6.2005", 78), ("9.6.2005", 78), ("10.6.2005", 78), ("11.6.2005", 78), ("12.6.2005", 78), ("13.6.2005", 78), ("14.6.2005", 78), ("15.6.2005", 78), ("16.6.2005", 78), ("17.6.2005", 76), ("18.6.2005", 76), ("19.6.2005", 76), ("20.6.2005", 76), ("21.6.2005", 76), ("22.6.2005", 77), ("23.6.2005", 77), ("24.6.2005", 77), ("25.6.2005", 77), ("26.6.2005", 77), ("27.6.2005", 77), ("28.6.2005", 77), ("29.6.2005", 79), ("30.6.2005", 79), ("1.7.2005", 79), ("2.7.2005", 77), ("3.7.2005", 77), ("4.7.2005", 77), ("5.7.2005", 77), ("6.7.2005", 77), ("7.7.2005", 79), ("8.7.2005", 79), ("9.7.2005", 79), ("10.7.2005", 79), ("11.7.2005", 78), ("12.7.2005", 78), ("13.7.2005", 79), ("14.7.2005", 79), ("15.7.2005", 78), ("16.7.2005", 76), ("17.7.2005", 76), ("18.7.2005", 77), ("19.7.2005", 78), ("20.7.2005", 78), ("21.7.2005", 77), ("22.7.2005", 77), ("23.7.2005", 76), ("24.7.2005", 76), ("25.7.2005", 75), ("26.7.2005", 76), ("27.7.2005", 75), ("28.7.2005", 76), ("29.7.2005", 75), ("30.7.2005", 76), ("31.7.2005", 74), ("1.8.2005", 74), ("2.8.2005", 75.5), ("3.8.2005", 75.5), ("4.8.2005", 75), ("5.8.2005", 75), ("6.8.2005", 74.5), ("7.8.2005", 75), ("8.8.2005", 77), ("9.8.2005", 75.5), ("10.8.2005", 74), ("11.8.2005", 74), ("12.8.2005", 75), ("13.8.2005", 74), ("14.8.2005", 74), ("15.8.2005", 74), ("16.8.2005", 72), ("17.8.2005", 73), ("18.8.2005", 73.5), ("19.8.2005", 73), ("20.8.2005", 73), ("21.8.2005", 74), ("22.8.2005", 72), ("23.8.2005", 72.5), ("24.8.2005", 73), ("25.8.2005", 72), ("26.8.2005", 72.5), ("27.8.2005", 72), ("28.8.2005", 72), ("29.8.2005", 71.5), ("30.8.2005", 71.5), ("31.8.2005", 73), ("1.9.2005", 71.5), ("2.9.2005", 73), ("3.9.2005", 72), ("4.9.2005", 71), ("5.9.2005", 72), ("6.9.2005", 71), ("7.9.2005", 71.5), ("8.9.2005", 71.5), ("9.9.2005", 71), ("10.9.2005", 70), ("11.9.2005", 72), ("12.9.2005", 71), ("13.9.2005", 71), ("14.9.2005", 71.5), ("15.9.2005", 71.5), ("16.9.2005", 71.5), ("17.9.2005", 72), ("18.9.2005", 72), ("19.9.2005", 71.5), ("20.9.2005", 71), ("21.9.2005", 70), ("22.9.2005", 69.5), ("23.9.2005", 69), ("24.9.2005", 69), ("25.9.2005", 69.5), ("26.9.2005", 69.5), ("27.9.2005", 69), ("28.9.2005", 68), ("29.9.2005", 68.5), ("30.9.2005", 68.5), ("1.10.2005", 68), ("2.10.2005", 68), ("3.10.2005", 68), ("4.10.2005", 68), ("5.10.2005", 68), ("6.10.2005", 68), ("7.10.2005", 68), ("8.10.2005", 67.5), ("9.10.2005", 67.5), ("10.10.2005", 67.5), ("11.10.2005", 68), ("12.10.2005", 68), ("13.10.2005", 68), ("14.10.2005", 68), ("15.10.2005", 67.5), ("16.10.2005", 67.5), ("17.10.2005", 67.5), ("18.10.2005", 68), ("19.10.2005", 68), ("20.10.2005", 67.5), ("21.10.2005", 68.5), ("22.10.2005", 69), ("23.10.2005", 69), ("24.10.2005", 68), ("25.10.2005", 68), ("26.10.2005", 68), ("27.10.2005", 66.5), ("28.10.2005", 66), ("29.10.2005", 66.5), ("30.10.2005", 68.5), ("31.10.2005", 68), ("1.11.2005", 67), ("2.11.2005", 66), ("3.11.2005", 67), ("4.11.2005", 66), ("5.11.2005", 66.5), ("6.11.2005", 66.5), ("7.11.2005", 66), ("8.11.2005", 67), ("9.11.2005", 66.5), ("10.11.2005", 66.5), ("11.11.2005", 65.5), ("12.11.2005", 65.5), ("13.11.2005", 66), ("14.11.2005", 66.5), ("15.11.2005", 66), ("16.11.2005", 66), ("17.11.2005", 66), ("18.11.2005", 66), ("19.11.2005", 65.5), ("20.11.2005", 65.5), ("21.11.2005", 66), ("22.11.2005", 65), ("23.11.2005", 65), ("24.11.2005", 64.5), ("25.11.2005", 65), ("26.11.2005", 65), ("27.11.2005", 65), ("28.11.2005", 65), ("29.11.2005", 65), ("30.11.2005", 65), ("1.12.2005", 65), ("2.12.2005", 65), ("3.12.2005", 64.5), ("4.12.2005", 64.5), ("5.12.2005", 64.5), ("6.12.2005", 64), ("7.12.2005", 64), ("8.12.2005", 65), ("9.12.2005", 63), ("10.12.2005", 65), ("11.12.2005", 65), ("12.12.2005", 64.5), ("13.12.2005", 65), ("14.12.2005", 65), ("15.12.2005", 64), ("16.12.2005", 65), ("17.12.2005", 64), ("18.12.2005", 63), ("19.12.2005", 63), ("20.12.2005", 63.5), ("21.12.2005", 63), ("22.12.2005", 63), ("23.12.2005", 62.5), ("24.12.2005", 62.5), ("25.12.2005", 64), ("26.12.2005", 65), ("27.12.2005", 64.5), ("28.12.2005", 64), ("29.12.2005", 63.5), ("30.12.2005", 63), ("31.12.2005", 64), ("1.1.2006", 66), ("2.1.2006", 63.5), ("3.1.2006", 63), ("4.1.2006", 64), ("5.1.2006", 63.5), ("6.1.2006", 63.5), ("7.1.2006", 63.5), ("8.1.2006", 64.5), ("9.1.2006", 64), ("10.1.2006", 63), ("11.1.2006", 62.5), ("12.1.2006", 63), ("13.1.2006", 63.5), ("14.1.2006", 62.5), ("15.1.2006", 62), ("16.1.2006", 62), ("17.1.2006", 63), ("18.1.2006", 62.5), ("19.1.2006", 62.5), ("20.1.2006", 63), ("21.1.2006", 61.5), ("22.1.2006", 62), ("23.1.2006", 62), ("24.1.2006", 62.2), ("25.1.2006", 62.5), ("26.1.2006", 61.8), ("27.1.2006", 62), ("28.1.2006", 61.5), ("29.1.2006", 61.5), ("30.1.2006", 62), ("31.1.2006", 62), ("1.2.2006", 62), ("2.2.2006", 61.7), ("3.2.2006", 61.3), ("4.2.2006", 61), ("5.2.2006", 62), ("6.2.2006", 60.5), ("7.2.2006", 60.7), ("8.2.2006", 61), ("9.2.2006", 61), ("10.2.2006", 61), ("11.2.2006", 60.5), ("12.2.2006", 61.5), ("13.2.2006", 61), ("14.2.2006", 61), ("15.2.2006", 61), ("16.2.2006", 61.5), ("17.2.2006", 61), ("18.2.2006", 61.5), ("19.2.2006", 60.5), ("20.2.2006", 61), ("21.2.2006", 60.8), ("22.2.2006", 61.5), ("23.2.2006", 60.5), ("24.2.2006", 60), ("25.2.2006", 60), ("26.2.2006", 60.5), ("27.2.2006", 60.7), ("28.2.2006", 60.5), ("1.3.2006", 60.8), ("2.3.2006", 61), ("3.3.2006", 60), ("4.3.2006", 61), ("5.3.2006", 60), ("6.3.2006", 61), ("7.3.2006", 60), ("8.3.2006", 60.5), ("9.3.2006", 60.5), ("10.3.2006", 60.5), ("11.3.2006", 60), ("12.3.2006", 60), ("13.3.2006", 60), ("14.3.2006", 60), ("15.3.2006", 61), ("16.3.2006", 61), ("17.3.2006", 60), ("18.3.2006", 60), ("19.3.2006", 60.5), ("20.3.2006", 61.5), ("21.3.2006", 61), ("22.3.2006", 60.5), ("23.3.2006", 61), ("24.3.2006", 60), ("25.3.2006", 59.5), ("26.3.2006", 59.5), ("27.3.2006", 59), ("28.3.2006", 59.2), ("29.3.2006", 59.8), ("30.3.2006", 59), ("31.3.2006", 59), ("1.4.2006", 60.5), ("2.4.2006", 59), ("3.4.2006", 59.2), ("4.4.2006", 58.8), ("5.4.2006", 58.8), ("6.4.2006", 58.8), ("7.4.2006", 58.8), ("8.4.2006", 58.4), ("9.4.2006", 58), ("10.4.2006", 58.3), ("11.4.2006", 58), ("12.4.2006", 58), ("13.4.2006", 59), ("14.4.2006", 58), ("15.4.2006", 58), ("16.4.2006", 58), ("17.4.2006", 57.5), ("18.4.2006", 58.5), ("19.4.2006", 59), ("20.4.2006", 58.5), ("21.4.2006", 59.8), ("22.4.2006", 59.5), ("23.4.2006", 60), ("24.4.2006", 59.8), ("25.4.2006", 59), ("26.4.2006", 58.5), ("27.4.2006", 58.8), ("28.4.2006", 58.8), ("29.4.2006", 58.5), ("30.4.2006", 58.5), ("1.5.2006", 57.8), ("2.5.2006", 59), ("3.5.2006", 58.5), ("4.5.2006", 58), ("5.5.2006", 58.5), ("6.5.2006", 58), ("7.5.2006", 58.5), ("8.5.2006", 57.5), ("9.5.2006", 58.5), ("10.5.2006", 57.8), ("11.5.2006", 57), ("12.5.2006", 57.5), ("13.5.2006", 56.5), ("14.5.2006", 56.5), ("15.5.2006", 58), ("16.5.2006", 57.3), ("17.5.2006", 57.5), ("18.5.2006", 57.2), ("19.5.2006", 58), ("20.5.2006", 57.5), ("21.5.2006", 58), ("22.5.2006", 58), ("23.5.2006", 58), ("24.5.2006", 58), ("25.5.2006", 59), ("26.5.2006", 58), ("27.5.2006", 58.2), ("28.5.2006", 58), ("29.5.2006", 58), ("30.5.2006", 58), ("31.5.2006", 58), ("1.6.2006", 57.8), ("2.6.2006", 57.8), ("3.6.2006", 57.8), ("4.6.2006", 58), ("5.6.2006", 57.5), ("6.6.2006", 57.8), ("7.6.2006", 57.5), ("8.6.2006", 57.5), ("9.6.2006", 57.5), ("10.6.2006", 57.5), ("11.6.2006", 58), ("12.6.2006", 58), ("13.6.2006", 57.5), ("14.6.2006", 57.2), ("15.6.2006", 57.5), ("16.6.2006", 57.4), ("17.6.2006", 56.5), ("18.6.2006", 56.5), ("19.6.2006", 57.5), ("20.6.2006", 56.5), ("21.6.2006", 57), ("22.6.2006", 57), ("23.6.2006", 57.2), ("24.6.2006", 57), ("25.6.2006", 56.7), ("26.6.2006", 56.5), ("27.6.2006", 56.5), ("28.6.2006", 57), ("29.6.2006", 56.5), ("30.6.2006", 57) ] datax = [] datay = [] datay2 = [] datay2MvgAvg = None for (d, w) in weightData: d = datetime.datetime.strptime(d, "%d.%m.%Y").date() datax.append(d) datay.append(w) if datay2MvgAvg is None: datay2MvgAvg = w else: datay2MvgAvg = expMovingAvgCoef * w + (1 - expMovingAvgCoef) * datay2MvgAvg datay2.append(datay2MvgAvg) fig, biax = plt.subplots() figSize = fig.get_size_inches() fig.set_size_inches(figSize[0] * 3/2, figSize[1]) biax.set(xlabel="Date", ylabel="Weight (kg)", title="Dan Polansky losing weight following The Hacker's Diet" + "\nExponential moving average coefficient: " + str(expMovingAvgCoef)) plt.plot(datax, datay) plt.plot(datax, datay2) plt.ylim(50, 85) plt.grid(linewidth=0.25, color="#DDDDDD", axis="y") plt.savefig(outFileName) |
Date | |
Source | Own work |
Author | Dan Polansky |
Licensing
I, the copyright holder of this work, hereby publish it under the following license:
This file is licensed under the Creative Commons Attribution 4.0 International license.
- You are free:
- to share – to copy, distribute and transmit the work
- to remix – to adapt the work
- Under the following conditions:
- attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
This media file is uncategorized.
Please help improve this media file by adding it to one or more categories, so it may be associated with related media files (how?), and so that it can be more easily found.
Please notify the uploader with {{subst:Please link images|File:HackDietDP.svg}} ~~~~ |
Items portrayed in this file
depicts
some value
28 February 2024
image/svg+xml
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 12:40, 28 February 2024 | 864 × 432 (57 KB) | Dan Polansky | Uploaded own work with UploadWizard |
File usage
The following page uses this file:
Metadata
This file contains additional information, probably added from the digital camera or scanner used to create or digitize it.
If the file has been modified from its original state, some details may not fully reflect the modified file.
Width | 691.2pt |
---|---|
Height | 345.6pt |
Retrieved from "https://en.wikiversity.org/wiki/File:HackDietDP.svg"