Files
test987/test.ipynb
2026-04-10 03:28:08 +00:00

43 KiB

In [1]:
import matplotlib.pyplot as plt
import numpy as np

# 1. 准备数据
x = np.linspace(0, 10, 100)
y = np.sin(x)

# 2. 创建图表
plt.figure(figsize=(8, 4))
plt.plot(x, y, label='Sine Wave', color='blue', linestyle='--')

# 3. 添加装饰
plt.title("Simple Sine Wave")
plt.xlabel("Time (s)")
plt.ylabel("Amplitude")
plt.grid(True)
plt.legend()

# 4. 在 Notebook 中直接显示
plt.show()
No description has been provided for this image
In [ ]: