Merge branch 'janitaws/latex' into coryab/code
This commit is contained in:
@@ -4,6 +4,17 @@ import ast
|
||||
import seaborn as sns
|
||||
|
||||
sns.set_theme()
|
||||
params = {
|
||||
"font.family": "Serif",
|
||||
"font.serif": "Roman",
|
||||
"text.usetex": True,
|
||||
"axes.titlesize": "large",
|
||||
"axes.labelsize": "large",
|
||||
"xtick.labelsize": "large",
|
||||
"ytick.labelsize": "large",
|
||||
"legend.fontsize": "medium",
|
||||
}
|
||||
plt.rcParams.update(params)
|
||||
|
||||
def plot():
|
||||
with open("data/color_map.txt") as f:
|
||||
|
||||
38
python_scripts/colormap_alt.py
Normal file
38
python_scripts/colormap_alt.py
Normal file
@@ -0,0 +1,38 @@
|
||||
import numpy as np
|
||||
import matplotlib.pyplot as plt
|
||||
import ast
|
||||
import seaborn as sns
|
||||
|
||||
sns.set_theme()
|
||||
params = {
|
||||
"font.family": "Serif",
|
||||
"font.serif": "Roman",
|
||||
"text.usetex": True,
|
||||
"axes.titlesize": "large",
|
||||
"axes.labelsize": "large",
|
||||
"xtick.labelsize": "large",
|
||||
"ytick.labelsize": "large",
|
||||
"legend.fontsize": "medium",
|
||||
}
|
||||
plt.rcParams.update(params)
|
||||
|
||||
def plot():
|
||||
with open("data/color_map.txt") as f:
|
||||
lines = f.readlines()
|
||||
size = int(lines[0])
|
||||
for i, line in enumerate(lines[1:]):
|
||||
fig, ax = plt.subplots()
|
||||
arr = line.strip().split("\t")
|
||||
arr = np.asarray(list(map(lambda x: ((a := complex(*ast.literal_eval(x)))*a.conjugate()).real, arr)))
|
||||
|
||||
arr = arr.reshape(size,size)
|
||||
|
||||
color_map = ax.imshow(arr.T, interpolation="nearest", cmap=sns.color_palette("mako", as_cmap=True))
|
||||
fig.colorbar(color_map, ax=ax)
|
||||
plt.grid(False)
|
||||
plt.savefig(f"latex/images/color_map_{i}.pdf")
|
||||
plt.close(fig)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
plot()
|
||||
@@ -4,6 +4,17 @@ import ast
|
||||
import seaborn as sns
|
||||
|
||||
sns.set_theme()
|
||||
params = {
|
||||
"font.family": "Serif",
|
||||
"font.serif": "Roman",
|
||||
"text.usetex": True,
|
||||
"axes.titlesize": "large",
|
||||
"axes.labelsize": "large",
|
||||
"xtick.labelsize": "large",
|
||||
"ytick.labelsize": "large",
|
||||
"legend.fontsize": "medium",
|
||||
}
|
||||
plt.rcParams.update(params)
|
||||
|
||||
def plot():
|
||||
files = [
|
||||
|
||||
@@ -4,6 +4,19 @@ import matplotlib
|
||||
from matplotlib.animation import FuncAnimation
|
||||
import ast
|
||||
|
||||
import seaborn as sns
|
||||
params = {
|
||||
"font.family": "Serif",
|
||||
"font.serif": "Roman",
|
||||
"text.usetex": True,
|
||||
"axes.titlesize": "large",
|
||||
"axes.labelsize": "large",
|
||||
"xtick.labelsize": "large",
|
||||
"ytick.labelsize": "large",
|
||||
"legend.fontsize": "medium",
|
||||
}
|
||||
plt.rcParams.update(params)
|
||||
|
||||
wave_arr = []
|
||||
fig = plt.figure()
|
||||
ax = plt.gca()
|
||||
|
||||
@@ -1,6 +1,19 @@
|
||||
import numpy as np
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
import seaborn as sns
|
||||
params = {
|
||||
"font.family": "Serif",
|
||||
"font.serif": "Roman",
|
||||
"text.usetex": True,
|
||||
"axes.titlesize": "large",
|
||||
"axes.labelsize": "large",
|
||||
"xtick.labelsize": "large",
|
||||
"ytick.labelsize": "large",
|
||||
"legend.fontsize": "medium",
|
||||
}
|
||||
plt.rcParams.update(params)
|
||||
|
||||
def plot():
|
||||
files = [
|
||||
"data/probability_deviation_no_slits.txt",
|
||||
|
||||
@@ -4,6 +4,19 @@ import matplotlib
|
||||
from matplotlib.animation import FuncAnimation
|
||||
import ast
|
||||
|
||||
import seaborn as sns
|
||||
params = {
|
||||
"font.family": "Serif",
|
||||
"font.serif": "Roman",
|
||||
"text.usetex": True,
|
||||
"axes.titlesize": "large",
|
||||
"axes.labelsize": "large",
|
||||
"xtick.labelsize": "large",
|
||||
"ytick.labelsize": "large",
|
||||
"legend.fontsize": "medium",
|
||||
}
|
||||
plt.rcParams.update(params)
|
||||
|
||||
|
||||
def plot():
|
||||
with open("v.txt") as f:
|
||||
|
||||
Reference in New Issue
Block a user