# 绘制自己和朋友在各个年龄的女友数量的折线图 from matplotlib import pyplot as plt # 让matplotlib能够显示中文 plt.rcParams['font.sans-serif'] = ['SimHei'] x = range(11,31) a = [1,0,1,1,2,4,3,2,3,4,4,5,6,5,4,3,3,1,1,1] b = [1,0,3,1,2,2,3,3,2,1,2,1,1,1,1,1,1,1,1,1] # 设置图形参数 fig =…