I get zero's on all my bars, despite trying to remove them by setting yerr=None, I'm still getting the same issue. The bars otherwise plot correctly. How can I remove the 0 that I get printed above each bar.
N = len(my_tuple)
plt.figure(0)
ind = np.arange(N)
width = 0.35
fig, ax = plt.subplots()
rects1 = ax.bar(ind, g_tuple, width, color='r', linewidth=2,alpha=0.8)
rects2 = ax.bar(ind+width, f_tuple, width, color='y', linewidth=2,alpha=0.8)
ax.set_ylabel('XXX')
ax.set_title('XXX')
ax.set_xticks(ind+width)
ax.set_xticklabels( lob_tuple )
ax.legend( (rects1[0], rects2[0]), ('G', 'F') )
autolabel(rects1)
autolabel(rects2)
I've tried yerr=None
, yerr=0
, but this doesn't work either
当我在bar方法中查看时,原来它的autolabel
命令执行此操作。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.