实现了在一张图片里用matplotlib的pyplot同时绘制折线图和柱状图。 # -*- coding:utf-8 -*- import matplotlib import matplotlib.pyplot as plt import numpy as np matplotlib.rcParams['font.sans-serif'] = ['SimHei'] # 用黑体显示中文 # 构建数据 x = np.arange(1, 15) y = [0.8, 0.88, 0.825, 0.76, 0.91, 0.95, 0.74, 0.99, 0.80, 0.72, 0.9, 0.81,...