| import numpy as np | |
| import matplotlib.pyplot as plt | |
| # ── Parameters ───────────────────────────────────────────────────────────── | |
| seed = 2902 | |
| n_points = 80 | |
| # ── Data ──────────────────────────────────────────────────────────────────── | |
| x = np.linspace(0.0, 2.0 * np.pi, n_points) | |
| y0 = 0.781911 * np.sin(1.543293 * x + 4.144060) | |
| # ── Plot ──────────────────────────────────────────────────────────────────── | |
| fig, ax = plt.subplots(figsize=(7, 4)) | |
| ax.plot(x, y0, color="tab:blue", label="A=0.78, f=1.54, φ=4.14") | |
| ax.set_xlabel("x") | |
| ax.set_ylabel("y") | |
| ax.set_title("Sinusoidal Line Plot (1 curve(s))") | |
| ax.legend(fontsize=8) | |
| ax.grid(True, alpha=0.3) | |
| fig.tight_layout() | |
| plt.show() | |