aboutsummaryrefslogtreecommitdiffstats
path: root/buch/papers/zeta/python/plot_zeta2.py
diff options
context:
space:
mode:
authorf1bi1n <109807532+f1bi1n@users.noreply.github.com>2022-08-15 20:21:26 +0200
committerGitHub <noreply@github.com>2022-08-15 20:21:26 +0200
commit13e80fa4f6ca5fb0551e2e3adca931d32091cab1 (patch)
tree2793c654e5d5f4556a32c7dfea915fd37c74f59b /buch/papers/zeta/python/plot_zeta2.py
parent2.Uerbarbeitung, bruch (diff)
parentMerge pull request #50 from ntobler/master (diff)
downloadSeminarSpezielleFunktionen-13e80fa4f6ca5fb0551e2e3adca931d32091cab1.tar.gz
SeminarSpezielleFunktionen-13e80fa4f6ca5fb0551e2e3adca931d32091cab1.zip
Merge branch 'master' into master
Diffstat (limited to 'buch/papers/zeta/python/plot_zeta2.py')
-rw-r--r--buch/papers/zeta/python/plot_zeta2.py31
1 files changed, 31 insertions, 0 deletions
diff --git a/buch/papers/zeta/python/plot_zeta2.py b/buch/papers/zeta/python/plot_zeta2.py
new file mode 100644
index 0000000..b730703
--- /dev/null
+++ b/buch/papers/zeta/python/plot_zeta2.py
@@ -0,0 +1,31 @@
+import numpy as np
+from mpmath import zeta
+import matplotlib.pyplot as plt
+import matplotlib
+matplotlib.use("pgf")
+matplotlib.rcParams.update(
+ {
+ "pgf.texsystem": "pdflatex",
+ "font.family": "serif",
+ "font.size": 8,
+ "text.usetex": True,
+ "pgf.rcfonts": False,
+ "axes.unicode_minus": False,
+ }
+)
+# const re plot
+re_values = [-1, 0, 0.5]
+im_values = np.arange(0, 40, 0.04)
+buf = np.zeros((len(re_values), len(im_values), 2))
+for im_i, im in enumerate(im_values):
+ print(im_i)
+ for re_i, re in enumerate(re_values):
+ z = complex(zeta(re + 1j*im))
+ buf[re_i, im_i] = [np.real(z), np.imag(z)]
+
+for i in range(len(re_values)):
+ plt.figure()
+ plt.plot(buf[i,:,0], buf[i,:,1], label=f"$\Re={re_values[i]}$")
+ plt.xlabel("$\Re$")
+ plt.ylabel("$\Im$")
+ plt.savefig(f"zeta_re_{re_values[i]}_plot.pgf")