matplotlib 中的柱状图

 def drawBar():

  pyplot.bar(range(5),[100,200,300,400,400])

  pyplot.xticks(range(5),['A','B','C','D','E'])

  #设置横坐标

       pyplot.xlabel(u'横坐标文字说明')

  pyplot.ylabel(u'纵坐标文字说明')

  pyplot.title(u'标题文字说明')

  pyplot.show()

drawBar()

    

猜你喜欢

转载自www.cnblogs.com/liang715200/p/10677635.html