File size: 1,322 Bytes
d323f57
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import numpy as np
import matplotlib.pyplot as plt

# ── Parameters ─────────────────────────────────────────────────────────────
seed     = 2908
n_points = 131

# ── Data ────────────────────────────────────────────────────────────────────
x = np.linspace(0.0, 2.0 * np.pi, n_points)

y0 = 0.698043 * np.sin(2.606526 * x + 5.039795)
y1 = 1.662470 * np.sin(1.724687 * x + 1.478118)
y2 = 1.207486 * np.sin(2.091718 * x + 0.338356)

# ── Plot ────────────────────────────────────────────────────────────────────
fig, ax = plt.subplots(figsize=(7, 4))
ax.plot(x, y0, color="tab:blue", label="A=0.70, f=2.61, φ=5.04")
ax.plot(x, y1, color="tab:orange", label="A=1.66, f=1.72, φ=1.48")
ax.plot(x, y2, color="tab:green", label="A=1.21, f=2.09, φ=0.34")
ax.set_xlabel("x")
ax.set_ylabel("y")
ax.set_title("Sinusoidal Line Plot  (3 curve(s))")
ax.legend(fontsize=8)
ax.grid(True, alpha=0.3)
fig.tight_layout()
plt.show()