aboutsummaryrefslogtreecommitdiffstats
path: root/buch/papers/laguerre/scripts
diff options
context:
space:
mode:
authorPatrik Müller <patrik.mueller@ost.ch>2022-05-19 16:11:27 +0200
committerPatrik Müller <patrik.mueller@ost.ch>2022-05-19 16:11:27 +0200
commit56cc6c1fbae271c16c78935384b52e047cdd6f27 (patch)
tree500b686c4016b5f6c27b7072c738b18901c0bbfc /buch/papers/laguerre/scripts
parentMerge branch 'AndreasFMueller:master' into master (diff)
downloadSeminarSpezielleFunktionen-56cc6c1fbae271c16c78935384b52e047cdd6f27.tar.gz
SeminarSpezielleFunktionen-56cc6c1fbae271c16c78935384b52e047cdd6f27.zip
Error correction & add gamma integrand plot
Diffstat (limited to 'buch/papers/laguerre/scripts')
-rw-r--r--buch/papers/laguerre/scripts/integrand.py34
1 files changed, 34 insertions, 0 deletions
diff --git a/buch/papers/laguerre/scripts/integrand.py b/buch/papers/laguerre/scripts/integrand.py
new file mode 100644
index 0000000..89b9256
--- /dev/null
+++ b/buch/papers/laguerre/scripts/integrand.py
@@ -0,0 +1,34 @@
+#!/usr/bin/env python3
+# -*- coding:utf-8 -*-
+"""Plot for integrand of gamma function with shifting terms."""
+
+import os
+from pathlib import Path
+
+import matplotlib.pyplot as plt
+import numpy as np
+
+EPSILON = 1e-12
+xlims = np.array([-3, 3])
+
+root = str(Path(__file__).parent)
+img_path = f"{root}/../images"
+os.makedirs(img_path, exist_ok=True)
+
+t = np.logspace(*xlims, 1001)[:, None]
+z = np.arange(-5, 5)[None] + 0.5
+
+
+r = t ** z
+
+fig, ax = plt.subplots(num=1, clear=True, constrained_layout=True, figsize=(6, 4))
+ax.semilogx(t, r)
+ax.set_xlim(*(10.**xlims))
+ax.set_ylim(1e-3, 40)
+ax.set_xlabel(r"$t$")
+ax.set_ylabel(r"$t^z$")
+ax.grid(1, "both")
+labels = [f"$z={zi:.1f}$" for zi in np.squeeze(z)]
+ax.legend(labels, ncol=2, loc="upper left")
+fig.savefig(f"{img_path}/integrands.pdf")
+# plt.show()