python畫柱狀圖-python 使用 matplotlib.pyplot來畫柱狀圖和餅圖

導入包 import matplotlib.pyplot as plt 柱狀圖 最簡柱狀圖 # 顯示高度 def autolabel(rects): for rect in rects: height = rect.get_height() plt.text(rect.get_x()+rect.get_width()/2.- 0.2, 1.03*height, '%s' % int(height)
相關文章
相關標籤/搜索