You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
import matplotlib.pyplot as plt
|
|
|
|
# 示例数据
|
|
x = [1, 2, 3, 4, 5]
|
|
y = [2, 4, 1, 5, 3]
|
|
|
|
# 绘制折线图
|
|
plt.plot(x, y)
|
|
|
|
# 添加标题和轴标签
|
|
plt.title("Example Plot")
|
|
plt.xlabel("X Axis")
|
|
plt.ylabel("Y Axis")
|
|
|
|
# 显示图形
|
|
plt.show() |