| import numpy as np | |
| import matplotlib.pyplot as plt | |
| # ── Parameters ───────────────────────────────────────────────────────────── | |
| seed = 2904 | |
| n_points = 153 | |
| # ── Data ──────────────────────────────────────────────────────────────────── | |
| x = np.linspace(0.0, 2.0 * np.pi, n_points) | |
| y0 = 0.514431 * np.sin(1.513446 * x + 0.116435) | |
| # ── Plot ──────────────────────────────────────────────────────────────────── | |
| fig, ax = plt.subplots(figsize=(7, 4)) | |
| ax.plot(x, y0, color="tab:blue", label="A=0.51, f=1.51, φ=0.12") | |
| 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() | |