aboutsummaryrefslogtreecommitdiffstats
path: root/buch/papers/lambertw/Bilder/Strategie.py
diff options
context:
space:
mode:
authorerik-loeffler <100943759+erik-loeffler@users.noreply.github.com>2022-08-15 09:54:10 +0200
committerGitHub <noreply@github.com>2022-08-15 09:54:10 +0200
commit504d47a5a03f60cd54425cfd97fbff750a3f9061 (patch)
tree74aef248a603bad26b825371af8526b008807950 /buch/papers/lambertw/Bilder/Strategie.py
parentMerge pull request #3 from haddoucher/sturmliouville/erik-branch (diff)
parentMerge pull request #49 from HeadAndToes/master (diff)
downloadSeminarSpezielleFunktionen-504d47a5a03f60cd54425cfd97fbff750a3f9061.tar.gz
SeminarSpezielleFunktionen-504d47a5a03f60cd54425cfd97fbff750a3f9061.zip
Merge branch 'AndreasFMueller:master' into master
Diffstat (limited to '')
-rw-r--r--buch/papers/lambertw/Bilder/Strategie.py53
1 files changed, 53 insertions, 0 deletions
diff --git a/buch/papers/lambertw/Bilder/Strategie.py b/buch/papers/lambertw/Bilder/Strategie.py
new file mode 100644
index 0000000..975e248
--- /dev/null
+++ b/buch/papers/lambertw/Bilder/Strategie.py
@@ -0,0 +1,53 @@
+# -*- coding: utf-8 -*-
+"""
+Created on Fri Jul 29 09:40:11 2022
+
+@author: yanik
+"""
+import pylatex
+
+import numpy as np
+import matplotlib.pyplot as plt
+
+N = np.array([0, 0])
+V = np.array([1, 4])
+Z = np.array([5, 5])
+VZ = Z-V
+vzScale = 0.4
+
+
+a = [N, N, V]
+b = [V, Z, vzScale*VZ]
+
+X = np.array([i[0] for i in a])
+Y = np.array([i[1] for i in a])
+U = np.array([i[0] for i in b])
+W = np.array([i[1] for i in b])
+
+xlim = 6
+ylim = 6
+fig, ax = plt.subplots(1,1)
+ax.set_xlim([0, xlim]) #<-- set the x axis limits
+ax.set_ylim([0, ylim]) #<-- set the y axis limits
+#plt.figure(figsize=(xlim, ylim))
+ax.quiver(X, Y, U, W, angles='xy', scale_units='xy', scale=1, headwidth=5, headlength=7, headaxislength=5.5)
+
+ax.plot([V[0], (VZ+V)[0]], [V[1], (VZ+V)[1]], 'k--')
+ax.plot(np.vstack([V, Z])[:, 0], np.vstack([V, Z])[:,1], 'bo', markersize=10)
+ax.set_xlabel("x", size=20)
+ax.set_ylabel("y", size=20)
+
+ax.text(2.5, 4.5, "Visierlinie", size=20, rotation=10)
+
+plt.rcParams.update({
+ "text.usetex": True,
+ "font.family": "serif",
+ "font.serif": ["New Century Schoolbook"],
+})
+
+ax.text(1.6, 4.3, r"$\dot{v}$", size=20)
+ax.text(0.65, 3.9, r"$V$", size=20, c='b')
+ax.text(5.15, 4.85, r"$Z$", size=20, c='b')
+
+
+