File:Catagolue still life scatterplot b3s23 C1.png
Jump to navigation
Jump to search
Size of this preview: 600 × 600 pixels. Other resolution: 640 × 640 pixels.
Original file (640 × 640 pixels, file size: 31 KB, MIME type: image/png)
Pattern | Semilog scatterplot of still life counts vs. populations, based on Catagolue data for B3/S23/C1 from 2016-10-01. Generated using Python/numpy/matplotlib/statsmodels.
Script: #!/usr/bin/python3 import numpy as np import matplotlib.pyplot as plt import statsmodels.api as sm # read data file datafile=open("xs_scatterplot.dat","rb") x, y=np.loadtxt(datafile,delimiter="\t",skiprows=1,unpack=True) # generate a scatter plot fig, ax=plt.subplots() ax.scatter(x, y, label='Count') ax.set_yscale('symlog', linthreshy=1) ax.set_xlabel('Population', fontsize=15) ax.set_ylabel("Count", fontsize=15) ax.set_title('Total still lifes by population', fontsize=20) plt.ylim(ymin=0) #plt.xlim(xmin=4) ax.grid(True) fig.tight_layout() # plot linear fit logy=np.log(y) coefficients=np.polyfit(x, logy, 1) polynomial=np.poly1d(coefficients) ys=polynomial(x) plt.plot(x, np.exp(ys), label='Linear fit') # plot LOWESS fit lowess=sm.nonparametric.lowess z=lowess(logy, x, frac=0.3, it=3, return_sorted=False) plt.plot(x, np.exp(z), label=r'LOWESS fit, $\alpha=0.3$') # add legend plt.legend(loc='upper right') # save plot to file fig.set_size_inches(8, 8) plt.savefig("xs_scatterplot.png", dpi=80) Input data: Population Count 4 59226634956040 5 8300152601291 6 36287875579390 7 9589041751021 8 1831061627671 9 9752130654 10 6648614605 11 1966944907 12 296645053864 13 250781922 14 113637861417 15 672983961 16 4250963305 17 223747639 18 799747551 19 28055058 20 100004321 21 2322435 22 14770842 23 722422 24 651844 25 333072 26 226630 27 48939 28 4663087 29 14302 30 69920 31 27084 32 11145 33 290 34 458 35 40 36 82 37 11 38 608 39 8 40 8048 41 2 42 102 45 1 46 1 56 1 | |||
---|---|---|---|---|
Date | 2017-01-06 | |||
Made by | User:Apple Bottom | |||
License |
|
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 13:34, 15 July 2017 | 640 × 640 (31 KB) | Apple Bottom (talk | contribs) | Regenerated from 2017-07-15 data | |
13:17, 8 January 2017 | 640 × 640 (34 KB) | Apple Bottom (talk | contribs) | Updated from 2017-01-06 data | ||
10:54, 18 November 2016 | 640 × 640 (34 KB) | Apple Bottom (talk | contribs) | Updated from 2016-11-17 data | ||
22:28, 4 October 2016 | 640 × 640 (35 KB) | Apple Bottom (talk | contribs) | Regenerated from 2016-10-01 data. | ||
18:31, 10 September 2016 | 640 × 640 (34 KB) | Apple Bottom (talk | contribs) | Regenerated from 2016-09-10 data | ||
11:44, 4 September 2016 | 640 × 640 (34 KB) | Apple Bottom (talk | contribs) | Regenerated from 2016-09-04 data | ||
15:46, 12 August 2016 | 640 × 640 (34 KB) | Apple Bottom (talk | contribs) | Regenerated from 2016-08-12 data | ||
22:43, 28 July 2016 | 640 × 640 (33 KB) | Apple Bottom (talk | contribs) | {{AppleBottomImage|patternnolink=Semilog scatterplot of still life counts vs. populations, based on Catagolue data for B3/S23/C1 from 2016-07-28. Generated using Python/numpy/matplotlib/statsmodels.|date=2016-07-28}} |
You cannot overwrite this file.
File usage
The following page uses this file: