如何去除香蕉后的过线,使直方图可以粘在垂直线上?
import matplotlib
matplotlib.use('Svg')
from pylab import*
label = ['apple','orange', 'banana']
number = [5,4,3]
barwidth =0.5
bar_location= range(len(number))
bar(bar_location,number,width=barwidth)
xlim(0-barwidth,len(number))
xticks([ i + barwidth/2 for i in bar_location], label)
tittle('fruits')
xlabel('my_fruit')
ylabel('number')
savefig('fruits.svg')
show()