Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import numpy as np
- import matplotlib
- import matplotlib.pyplot as plt
- #S3 5610 https://www.futuremark.com/hardware/mobile/Samsung+Galaxy+S3+%28MSM8960%29/review
- #S4: 18443 https://www.futuremark.com/hardware/mobile/Samsung+Galaxy+S4+4G_+%28MSM8974AA+v2%29/review
- #S5: 18437 https://www.futuremark.com/hardware/mobile/Samsung+Galaxy+S5+LTE-A/review
- #S6: 21488 https://www.futuremark.com/hardware/mobile/Samsung+Galaxy+S6+Edge/review
- #S7: 28510 https://www.tek.no/artikler/test-samsung-galaxy-s9/431900/2
- #S8: 28940 https://www.tek.no/artikler/test-samsung-galaxy-s9/431900/2
- #S9: 39365 https://www.tek.no/artikler/test-samsung-galaxy-s9/431900/2
- samsung_scores = np.array([5610, 18433, 18437, 21488, 28510, 28940, 39365])
- # Release dates of Galaxy S (Rounded down to month)
- # (source: google "Samsung Galaxy S<version> release date")
- samsung_versions = np.array([2012+5./12, 2013+4/12., 2014+4/12., 2015+4/12.,
- 2016+3./12, 2017+4/12., 2018+3/12.])
- p_samsung = plt.plot(samsung_versions, samsung_scores, '-*',
- label='Samsung Galaxy S <Year>')
- # Now we fit the data, except the latest, and see how good a prediction it is
- samsung_poly_coeff = np.polyfit(samsung_versions[:-1], samsung_scores[:-1], 1)
- plt.plot(samsung_versions,
- samsung_poly_coeff[0]*samsung_versions + samsung_poly_coeff[1],
- '--', color = p_samsung[0].get_color(),
- label='$%.3f\\mathrm{Year} %.3f$' % (samsung_poly_coeff[0], samsung_poly_coeff[1]))
- # iphone 4s 2351 https://www.futuremark.com/hardware/mobile/Apple+iPhone+4s/review
- # iphone 5 6005 https://www.futuremark.com/hardware/mobile/Apple+iPhone+5/review
- # iphone 5s 14819 https://www.futuremark.com/hardware/mobile/Apple+iPhone+5s/review
- # iphone 6 17281 https://www.futuremark.com/hardware/mobile/Apple+iPhone+6/review
- # iphone 6s 28051 https://www.futuremark.com/hardware/mobile/Apple+iPhone+6s/review
- # iphone 7 36132 https://www.tek.no/artikler/test-samsung-galaxy-s9/431900/2
- # iphone 8 64785 https://www.tek.no/artikler/test-samsung-galaxy-s9/431900/2
- iphone_scores = np.array([2351, 6005, 14819, 17281, 28051, 36132, 64785])
- # Release dates of iPhone (Rounded down to month)
- # (source: google "Iphone <version> release date")
- iphone_versions = np.array(
- [2011. + 10/12., 2012 + 9/12., 2013+ 9/12., 2014+9/12.,
- 2015+9/12., 2016+9/12., 2017+9/12.])
- p_apple = plt.plot(iphone_versions, iphone_scores,
- '-o', label='Apple iPhone <Year>')
- apple_poly_coeff = np.polyfit(iphone_versions[:-1], iphone_scores[:-1], 1)
- plt.plot(iphone_versions,
- apple_poly_coeff[0]*iphone_versions + apple_poly_coeff[1],
- '--', color=p_apple[0].get_color(),
- label='$%.3f\\mathrm{Year} %.3f$' % (apple_poly_coeff[0], apple_poly_coeff[1]))
- plt.xlabel('Year')
- plt.ylabel('3D Mark ice storm unlimited')
- plt.legend()
- plt.grid("on")
- plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement