如何使用Python,画出类似下图所示的折线图

关注根据你的问题,下面专门为你解答,可直接运行下面代码:
import matplotlib.pyplot as plt
# 设置图框的大小
fig = plt.figure(figsize=(10,6))
x = [0,1, 2, 3,4,5,6,7,8,9,10]
y = [0,25,40,50,58,65,71,76,80,82,88]
# 绘图
plt.plot(x, # x轴数据
y, # y轴数据
linestyle = '-', # 折线类型
linewidth = 2, # 折线宽度
color = 'steelblue', # 折线颜色
marker = '*', # 点的形状
markersize = 6, # 点的大小
markeredgecolor='black', # 点的边框色
markerfacecolor='green') # 点的填充色
# 添加标题和坐标轴标签
plt.xlabel('Number of anchor boxes')
plt.ylabel('Average IoU/%')
plt.show()