File:Catagolue still life scatterplot b3s23 (higher symmetries).png

From LifeWiki
Jump to navigation Jump to search
Original file (640 × 640 pixels, file size: 21 KB, MIME type: image/png)
Pattern Semilog scatterplot of still life counts vs. populations, based on Catagolue data for B3/S23 (higher symmetries) 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_higher.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=0)
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. This needs to come after everything's been plotted.
plt.legend(loc='upper right')

# save plot to file
fig.set_size_inches(8, 8)
plt.savefig('xs_scatterplot_higher.png', dpi=80)

Input data:

Population	Count
4	5180543090754
5	726602489548
6	2979629024985
7	949900456082
8	260244225449
9	1193784429
10	18900916841
11	392938895
12	43201752228
13	147821810
14	29812240639
15	89435047
16	5082227706
17	49710668
18	5923498495
19	14890725
20	765467826
21	5717633
22	281151486
23	2924790
24	588821555
25	1610140
26	44370722
27	968969
28	135529261
29	1219313
30	20869267
31	161886
32	342247554
33	155728
34	4200788
35	33679
36	69574059
37	27639
38	974828
39	26880
40	41412945
41	4642
42	543682
43	2564
44	5823956
45	1142
46	228597
47	1012
48	51420005
49	377
50	40397
51	262
52	3384928
53	71
54	21462
55	86
56	228373512
57	32
58	9687
59	19
60	3104803
61	12
62	4681
63	15
64	27979985
65	3
66	2395
67	12
68	1915148
70	837
71	2
72	21833469
74	460
76	1469988
78	243
80	3067027
82	127
83	1
84	275502
86	86
88	4899570
90	39
91	1
92	138132
94	34
96	3529580
97	1
98	6
100	95726
102	2
104	809023
106	2
108	88839
110	2
112	732729
116	117579
120	1024653
123	1
124	22553
128	288489
132	6696
136	76358
140	4915
144	41871
148	2030
152	44793
156	897
160	11810
164	475
168	6490
172	254
176	3880
180	205
184	1536
188	92
192	788
196	47
200	344
204	17
208	144
212	12
216	104
220	12
224	67
228	2
232	27
236	1
240	14
248	9
256	1
264	1
272	1
Date 2017-01-06
Made by User:Apple Bottom
License
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.

This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.


File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current13:34, 15 July 2017Thumbnail for version as of 13:34, 15 July 2017640 × 640 (21 KB)Apple Bottom (talk | contribs)Regenerated from 2017-07-15 data
13:17, 8 January 2017Thumbnail for version as of 13:17, 8 January 2017640 × 640 (22 KB)Apple Bottom (talk | contribs)Updated from 2017-01-06 data
10:55, 18 November 2016Thumbnail for version as of 10:55, 18 November 2016640 × 640 (22 KB)Apple Bottom (talk | contribs)Updated from 2016-11-17 data
22:31, 4 October 2016Thumbnail for version as of 22:31, 4 October 2016640 × 640 (35 KB)Apple Bottom (talk | contribs){{AppleBottomImage|patternnolink=Semilog scatterplot of still life counts vs. populations, based on Catagolue data for B3/S23 (higher symmetries) from 2016-10-01. Generated using Python/numpy/matplotlib/statsmodels. Script: <pre> #!/usr/bin/python3...

The following page uses this file:

Metadata