柱状图
55.2 柱状图
bar 适合比较类别数据。
成绩柱状图
import matplotlib.pyplot as plt names = ['语文','数学','英语'] scores = [88, 95, 92] plt.bar(names, scores) plt.show()
bar 适合比较类别数据。
import matplotlib.pyplot as plt names = ['语文','数学','英语'] scores = [88, 95, 92] plt.bar(names, scores) plt.show()