Commit new graphs

This commit is contained in:
Joshua Coles 2023-03-19 21:56:58 +00:00
parent da4d5a38aa
commit cf8fb79331
11 changed files with 11404 additions and 1031880 deletions

BIN
1-5000.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

5003
1-5000.svg Normal file

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 311 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 28 KiB

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 24 MiB

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 41 KiB

View File

@ -6,11 +6,11 @@
<rdf:RDF xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:RDF xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<cc:Work> <cc:Work>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
<dc:date>2023-03-17T21:04:54.987817</dc:date> <dc:date>2023-03-19T17:50:24.307870</dc:date>
<dc:format>image/svg+xml</dc:format> <dc:format>image/svg+xml</dc:format>
<dc:creator> <dc:creator>
<cc:Agent> <cc:Agent>
<dc:title>Matplotlib v3.7.0, https://matplotlib.org/</dc:title> <dc:title>Matplotlib v3.7.1, https://matplotlib.org/</dc:title>
</cc:Agent> </cc:Agent>
</dc:creator> </dc:creator>
</cc:Work> </cc:Work>
@ -19941,7 +19941,7 @@ L 69.30995 185.298806
L 69.27936 184.051652 L 69.27936 184.051652
L 69.248771 203.146032 L 69.248771 203.146032
z z
" clip-path="url(#pfd703b4266)" style="fill: #1f77b4; fill-opacity: 0.2"/> " clip-path="url(#p7359cb4da0)" style="fill: #1f77b4; fill-opacity: 0.2"/>
</g> </g>
<g id="PolyCollection_2"> <g id="PolyCollection_2">
<path d="M 69.248771 141.251975 <path d="M 69.248771 141.251975
@ -39847,18 +39847,18 @@ L 69.30995 141.251975
L 69.27936 141.251975 L 69.27936 141.251975
L 69.248771 141.251975 L 69.248771 141.251975
z z
" clip-path="url(#pfd703b4266)" style="fill: #ff7f0e; fill-opacity: 0.2"/> " clip-path="url(#p7359cb4da0)" style="fill: #ff7f0e; fill-opacity: 0.2"/>
</g> </g>
<g id="matplotlib.axis_1"> <g id="matplotlib.axis_1">
<g id="xtick_1"> <g id="xtick_1">
<g id="line2d_1"> <g id="line2d_1">
<defs> <defs>
<path id="maff3ead017" d="M 0 0 <path id="mb417bdf40e" d="M 0 0
L 0 3.5 L 0 3.5
" style="stroke: #000000; stroke-width: 0.8"/> " style="stroke: #000000; stroke-width: 0.8"/>
</defs> </defs>
<g> <g>
<use xlink:href="#maff3ead017" x="67.688716" y="384.48" style="stroke: #000000; stroke-width: 0.8"/> <use xlink:href="#mb417bdf40e" x="67.688716" y="384.48" style="stroke: #000000; stroke-width: 0.8"/>
</g> </g>
</g> </g>
<g id="text_1"> <g id="text_1">
@ -39894,7 +39894,7 @@ z
<g id="xtick_2"> <g id="xtick_2">
<g id="line2d_2"> <g id="line2d_2">
<g> <g>
<use xlink:href="#maff3ead017" x="128.867337" y="384.48" style="stroke: #000000; stroke-width: 0.8"/> <use xlink:href="#mb417bdf40e" x="128.867337" y="384.48" style="stroke: #000000; stroke-width: 0.8"/>
</g> </g>
</g> </g>
<g id="text_2"> <g id="text_2">
@ -39936,7 +39936,7 @@ z
<g id="xtick_3"> <g id="xtick_3">
<g id="line2d_3"> <g id="line2d_3">
<g> <g>
<use xlink:href="#maff3ead017" x="190.045957" y="384.48" style="stroke: #000000; stroke-width: 0.8"/> <use xlink:href="#mb417bdf40e" x="190.045957" y="384.48" style="stroke: #000000; stroke-width: 0.8"/>
</g> </g>
</g> </g>
<g id="text_3"> <g id="text_3">
@ -39973,7 +39973,7 @@ z
<g id="xtick_4"> <g id="xtick_4">
<g id="line2d_4"> <g id="line2d_4">
<g> <g>
<use xlink:href="#maff3ead017" x="251.224577" y="384.48" style="stroke: #000000; stroke-width: 0.8"/> <use xlink:href="#mb417bdf40e" x="251.224577" y="384.48" style="stroke: #000000; stroke-width: 0.8"/>
</g> </g>
</g> </g>
<g id="text_4"> <g id="text_4">
@ -40021,7 +40021,7 @@ z
<g id="xtick_5"> <g id="xtick_5">
<g id="line2d_5"> <g id="line2d_5">
<g> <g>
<use xlink:href="#maff3ead017" x="312.403198" y="384.48" style="stroke: #000000; stroke-width: 0.8"/> <use xlink:href="#mb417bdf40e" x="312.403198" y="384.48" style="stroke: #000000; stroke-width: 0.8"/>
</g> </g>
</g> </g>
<g id="text_5"> <g id="text_5">
@ -40078,7 +40078,7 @@ z
<g id="xtick_6"> <g id="xtick_6">
<g id="line2d_6"> <g id="line2d_6">
<g> <g>
<use xlink:href="#maff3ead017" x="373.581818" y="384.48" style="stroke: #000000; stroke-width: 0.8"/> <use xlink:href="#mb417bdf40e" x="373.581818" y="384.48" style="stroke: #000000; stroke-width: 0.8"/>
</g> </g>
</g> </g>
<g id="text_6"> <g id="text_6">
@ -40160,12 +40160,12 @@ z
<g id="ytick_1"> <g id="ytick_1">
<g id="line2d_7"> <g id="line2d_7">
<defs> <defs>
<path id="mcc85fcd9c7" d="M 0 0 <path id="med592cd34a" d="M 0 0
L -3.5 0 L -3.5 0
" style="stroke: #000000; stroke-width: 0.8"/> " style="stroke: #000000; stroke-width: 0.8"/>
</defs> </defs>
<g> <g>
<use xlink:href="#mcc85fcd9c7" x="54" y="349.49529" style="stroke: #000000; stroke-width: 0.8"/> <use xlink:href="#med592cd34a" x="54" y="349.49529" style="stroke: #000000; stroke-width: 0.8"/>
</g> </g>
</g> </g>
<g id="text_8"> <g id="text_8">
@ -40190,7 +40190,7 @@ z
<g id="ytick_2"> <g id="ytick_2">
<g id="line2d_8"> <g id="line2d_8">
<g> <g>
<use xlink:href="#mcc85fcd9c7" x="54" y="280.080852" style="stroke: #000000; stroke-width: 0.8"/> <use xlink:href="#med592cd34a" x="54" y="280.080852" style="stroke: #000000; stroke-width: 0.8"/>
</g> </g>
</g> </g>
<g id="text_9"> <g id="text_9">
@ -40206,7 +40206,7 @@ z
<g id="ytick_3"> <g id="ytick_3">
<g id="line2d_9"> <g id="line2d_9">
<g> <g>
<use xlink:href="#mcc85fcd9c7" x="54" y="210.666413" style="stroke: #000000; stroke-width: 0.8"/> <use xlink:href="#med592cd34a" x="54" y="210.666413" style="stroke: #000000; stroke-width: 0.8"/>
</g> </g>
</g> </g>
<g id="text_10"> <g id="text_10">
@ -40234,7 +40234,7 @@ z
<g id="ytick_4"> <g id="ytick_4">
<g id="line2d_10"> <g id="line2d_10">
<g> <g>
<use xlink:href="#mcc85fcd9c7" x="54" y="141.251975" style="stroke: #000000; stroke-width: 0.8"/> <use xlink:href="#med592cd34a" x="54" y="141.251975" style="stroke: #000000; stroke-width: 0.8"/>
</g> </g>
</g> </g>
<g id="text_11"> <g id="text_11">
@ -40250,7 +40250,7 @@ z
<g id="ytick_5"> <g id="ytick_5">
<g id="line2d_11"> <g id="line2d_11">
<g> <g>
<use xlink:href="#mcc85fcd9c7" x="54" y="71.837536" style="stroke: #000000; stroke-width: 0.8"/> <use xlink:href="#med592cd34a" x="54" y="71.837536" style="stroke: #000000; stroke-width: 0.8"/>
</g> </g>
</g> </g>
<g id="text_12"> <g id="text_12">
@ -44173,12 +44173,12 @@ L 373.367693 83.888254
L 373.398282 83.979329 L 373.398282 83.979329
L 373.52064 84.31475 L 373.52064 84.31475
L 373.581818 84.183869 L 373.581818 84.183869
" clip-path="url(#pfd703b4266)" style="fill: none; stroke: #1f77b4; stroke-width: 1.5; stroke-linecap: square"/> " clip-path="url(#p7359cb4da0)" style="fill: none; stroke: #1f77b4; stroke-width: 1.5; stroke-linecap: square"/>
</g> </g>
<g id="line2d_13"> <g id="line2d_13">
<path d="M 69.218182 175.959194 <path d="M 69.218182 175.959194
L 373.581818 175.959194 L 373.581818 175.959194
" clip-path="url(#pfd703b4266)" style="fill: none; stroke: #ff0000; stroke-width: 1.5; stroke-linecap: square"/> " clip-path="url(#p7359cb4da0)" style="fill: none; stroke: #ff0000; stroke-width: 1.5; stroke-linecap: square"/>
</g> </g>
<g id="patch_3"> <g id="patch_3">
<path d="M 54 384.48 <path d="M 54 384.48
@ -44203,10 +44203,10 @@ L 388.8 51.84
<g id="legend_1"> <g id="legend_1">
<g id="patch_7"> <g id="patch_7">
<path d="M 61 379.48 <path d="M 61 379.48
L 197.296875 379.48 L 197.682813 379.48
Q 199.296875 379.48 199.296875 377.48 Q 199.682813 379.48 199.682813 377.48
L 199.296875 319.7675 L 199.682813 319.7675
Q 199.296875 317.7675 197.296875 317.7675 Q 199.682813 317.7675 197.682813 317.7675
L 61 317.7675 L 61 317.7675
Q 59 317.7675 59 319.7675 Q 59 317.7675 59 319.7675
L 59 377.48 L 59 377.48
@ -44460,63 +44460,29 @@ L 83 355.222188
" style="fill: none; stroke: #ff0000; stroke-width: 1.5; stroke-linecap: square"/> " style="fill: none; stroke: #ff0000; stroke-width: 1.5; stroke-linecap: square"/>
</g> </g>
<g id="text_16"> <g id="text_16">
<!-- Theory --> <!-- Literature -->
<g transform="translate(91 358.722188) scale(0.1 -0.1)"> <g transform="translate(91 358.722188) scale(0.1 -0.1)">
<defs> <defs>
<path id="DejaVuSans-54" d="M -19 4666 <path id="DejaVuSans-4c" d="M 628 4666
L 3928 4666 L 1259 4666
L 3928 4134 L 1259 531
L 2272 4134 L 3531 531
L 2272 0 L 3531 0
L 1638 0 L 628 0
L 1638 4134 L 628 4666
L -19 4134
L -19 4666
z
" transform="scale(0.015625)"/>
<path id="DejaVuSans-68" d="M 3513 2113
L 3513 0
L 2938 0
L 2938 2094
Q 2938 2591 2744 2837
Q 2550 3084 2163 3084
Q 1697 3084 1428 2787
Q 1159 2491 1159 1978
L 1159 0
L 581 0
L 581 4863
L 1159 4863
L 1159 2956
Q 1366 3272 1645 3428
Q 1925 3584 2291 3584
Q 2894 3584 3203 3211
Q 3513 2838 3513 2113
z
" transform="scale(0.015625)"/>
<path id="DejaVuSans-79" d="M 2059 -325
Q 1816 -950 1584 -1140
Q 1353 -1331 966 -1331
L 506 -1331
L 506 -850
L 844 -850
Q 1081 -850 1212 -737
Q 1344 -625 1503 -206
L 1606 56
L 191 3500
L 800 3500
L 1894 763
L 2988 3500
L 3597 3500
L 2059 -325
z z
" transform="scale(0.015625)"/> " transform="scale(0.015625)"/>
</defs> </defs>
<use xlink:href="#DejaVuSans-54"/> <use xlink:href="#DejaVuSans-4c"/>
<use xlink:href="#DejaVuSans-68" x="61.083984"/> <use xlink:href="#DejaVuSans-69" x="55.712891"/>
<use xlink:href="#DejaVuSans-65" x="124.462891"/> <use xlink:href="#DejaVuSans-74" x="83.496094"/>
<use xlink:href="#DejaVuSans-6f" x="185.986328"/> <use xlink:href="#DejaVuSans-65" x="122.705078"/>
<use xlink:href="#DejaVuSans-72" x="247.167969"/> <use xlink:href="#DejaVuSans-72" x="184.228516"/>
<use xlink:href="#DejaVuSans-79" x="288.28125"/> <use xlink:href="#DejaVuSans-61" x="225.341797"/>
<use xlink:href="#DejaVuSans-74" x="286.621094"/>
<use xlink:href="#DejaVuSans-75" x="325.830078"/>
<use xlink:href="#DejaVuSans-72" x="389.208984"/>
<use xlink:href="#DejaVuSans-65" x="428.072266"/>
</g> </g>
</g> </g>
<g id="patch_9"> <g id="patch_9">
@ -44528,32 +44494,36 @@ z
" style="fill: #ff7f0e; fill-opacity: 0.2"/> " style="fill: #ff7f0e; fill-opacity: 0.2"/>
</g> </g>
<g id="text_17"> <g id="text_17">
<!-- Theory error band --> <!-- Literature error band -->
<g transform="translate(91 373.400312) scale(0.1 -0.1)"> <g transform="translate(91 373.400312) scale(0.1 -0.1)">
<use xlink:href="#DejaVuSans-54"/> <use xlink:href="#DejaVuSans-4c"/>
<use xlink:href="#DejaVuSans-68" x="61.083984"/> <use xlink:href="#DejaVuSans-69" x="55.712891"/>
<use xlink:href="#DejaVuSans-65" x="124.462891"/> <use xlink:href="#DejaVuSans-74" x="83.496094"/>
<use xlink:href="#DejaVuSans-6f" x="185.986328"/> <use xlink:href="#DejaVuSans-65" x="122.705078"/>
<use xlink:href="#DejaVuSans-72" x="247.167969"/> <use xlink:href="#DejaVuSans-72" x="184.228516"/>
<use xlink:href="#DejaVuSans-79" x="288.28125"/> <use xlink:href="#DejaVuSans-61" x="225.341797"/>
<use xlink:href="#DejaVuSans-20" x="347.460938"/> <use xlink:href="#DejaVuSans-74" x="286.621094"/>
<use xlink:href="#DejaVuSans-65" x="379.248047"/> <use xlink:href="#DejaVuSans-75" x="325.830078"/>
<use xlink:href="#DejaVuSans-72" x="440.771484"/> <use xlink:href="#DejaVuSans-72" x="389.208984"/>
<use xlink:href="#DejaVuSans-72" x="480.134766"/> <use xlink:href="#DejaVuSans-65" x="428.072266"/>
<use xlink:href="#DejaVuSans-6f" x="518.998047"/> <use xlink:href="#DejaVuSans-20" x="489.595703"/>
<use xlink:href="#DejaVuSans-72" x="580.179688"/> <use xlink:href="#DejaVuSans-65" x="521.382812"/>
<use xlink:href="#DejaVuSans-20" x="621.292969"/> <use xlink:href="#DejaVuSans-72" x="582.90625"/>
<use xlink:href="#DejaVuSans-62" x="653.080078"/> <use xlink:href="#DejaVuSans-72" x="622.269531"/>
<use xlink:href="#DejaVuSans-61" x="716.556641"/> <use xlink:href="#DejaVuSans-6f" x="661.132812"/>
<use xlink:href="#DejaVuSans-6e" x="777.835938"/> <use xlink:href="#DejaVuSans-72" x="722.314453"/>
<use xlink:href="#DejaVuSans-64" x="841.214844"/> <use xlink:href="#DejaVuSans-20" x="763.427734"/>
<use xlink:href="#DejaVuSans-62" x="795.214844"/>
<use xlink:href="#DejaVuSans-61" x="858.691406"/>
<use xlink:href="#DejaVuSans-6e" x="919.970703"/>
<use xlink:href="#DejaVuSans-64" x="983.349609"/>
</g> </g>
</g> </g>
</g> </g>
</g> </g>
</g> </g>
<defs> <defs>
<clipPath id="pfd703b4266"> <clipPath id="p7359cb4da0">
<rect x="54" y="51.84" width="334.8" height="332.64"/> <rect x="54" y="51.84" width="334.8" height="332.64"/>
</clipPath> </clipPath>
</defs> </defs>

Before

Width:  |  Height:  |  Size: 1.0 MiB

After

Width:  |  Height:  |  Size: 1.0 MiB

View File

@ -0,0 +1,52 @@
import numpy as np
from matplotlib import pyplot as plt
from lib.lib import mean_across, read_xyz_alt, read_load
c_direct_neighbours = read_load("../data/c-3d-direct-neighbours", read_xyz_alt)
direct_meaned_by_N = mean_across(c_direct_neighbours)
rust_direct = read_load("../data/rust-3d", read_xyz_alt)
rust_direct_meaned_by_N = mean_across(rust_direct)
rust_offaxis = read_load("../data/rust-3d-offaxis", read_xyz_alt)
rust_offaxis_meaned_by_N = mean_across(rust_direct)
fig, ax = plt.subplots(figsize=(6, 6))
def nc_fd(df, label, color=None, ignore_prefix=0, no_error=False, **kwargs):
if not no_error:
plt.fill_between(
df.N,
# TODO Check error math here
(df[ignore_prefix:]['fd']['mean'] - df[ignore_prefix:]['fd']['stderr']),
(df[ignore_prefix:]['fd']['mean'] + df[ignore_prefix:]['fd']['stderr']),
color=color,
alpha=0.2,
label=f"{label}, standard error band"
)
plt.plot(
df.N,
df['fd']['mean'],
color=color,
label=f"{label}, fd mean",
**kwargs
)
# %%
nc_fd(direct_meaned_by_N, label="IPC + 3D Direct", color="tab:blue", no_error=True)
nc_fd(rust_direct_meaned_by_N, label="NF 3D Direct", color="tab:orange", no_error=True)
nc_fd(rust_offaxis_meaned_by_N, label="NF 3D Off-axis", color="tab:purple", linestyle='dashdot', no_error=True)
plt.plot([np.min(c_direct_neighbours.N), np.max(c_direct_neighbours.N)], [2.5, 2.5], color='tab:red', label='Literature')
# plt.fill_between(c_direct_neighbours.N, 2.5 - 0.01, 2.5 + 0.01, alpha=0.2, color='tab:red', label='Literature error band')
plt.xlabel("$N_C$")
plt.ylabel("$fd$ (instantaneous)")
plt.legend()
plt.savefig('../figures/3d-nc-fd-convergence.svg')
plt.savefig('../figures/3d-nc-fd-convergence.png')

View File

@ -24,8 +24,8 @@ plt.plot(
color='tab:blue', label='fd mean, seeds = 20' color='tab:blue', label='fd mean, seeds = 20'
) )
plt.plot([50, 10000], [1.71, 1.71], color='red', label='Theory') plt.plot([50, 10000], [1.71, 1.71], color='red', label='Literature')
plt.fill_between(without_prefix.N, 1.71 - 0.01, 1.71 + 0.01, alpha=0.2, label='Theory error band') plt.fill_between(without_prefix.N, 1.71 - 0.01, 1.71 + 0.01, alpha=0.2, label='Literature error band')
plt.xlabel("$N_C$") plt.xlabel("$N_C$")
plt.ylabel("$fd$ (instantaneous)") plt.ylabel("$fd$ (instantaneous)")

View File

@ -2,17 +2,19 @@ from matplotlib import pyplot as plt
from lib.lib import read_sp, aggregate_sp_fd from lib.lib import read_sp, aggregate_sp_fd
data_2d_sp = read_sp("../data/stick-probability") data_2d_sp = read_sp("../data/rust-stick-probability")
data_2d_sp_low_p = read_sp("../data/rust-sp-low-p")
sp_fd_data = aggregate_sp_fd(data_2d_sp) sp_fd_data = aggregate_sp_fd(data_2d_sp)
# %% # %%
plt.fill_between(sp_fd_data.index, sp_fd_data.fd - sp_fd_data.fd_std, sp_fd_data.fd + sp_fd_data.fd_std, alpha=0.2, label=f"Standard error band") plt.fill_between(sp_fd_data.index, sp_fd_data.fd - sp_fd_data.fd_std, sp_fd_data.fd + sp_fd_data.fd_std, alpha=0.2, label=f"Standard error band")
plt.plot(sp_fd_data.index, sp_fd_data.fd, color='tab:blue', label='fd mean, seeds = 100') plt.plot(sp_fd_data.index, sp_fd_data.fd, color='tab:blue', label='NF, fd mean, seeds = 100')
plt.xlabel("$p_{stick}$") plt.xlabel("$p_{stick}$")
plt.ylabel("$fd$") plt.ylabel("$fd$")
plt.legend() plt.legend()
# %%
plt.savefig('../figures/sp-fd.svg') plt.savefig('../figures/sp-fd.svg')
plt.savefig('../figures/sp-fd.png') plt.savefig('../figures/sp-fd.png')
plt.show() plt.show()

5003
lowp.svg Normal file

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 310 KiB

View File

@ -1,5 +1,12 @@
{ {
"cells": [ "cells": [
{
"cell_type": "markdown",
"source": [],
"metadata": {
"collapsed": false
}
},
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 1, "execution_count": 1,