I need to plot a bar graph of data with labels that are too long to fit as ticks on the x-axis. I was hoping to include the labels in the legend, but cannot figure out to remove the color from the legend (including the color makes the legend cluttered). Below is some sample code:
import matplotlib.pyplot as plt
data_dic={1:'1:Text 1',2:'2:Text 2',3:'3:Text 3',4:'4:Text 4'}
ax1 = plt.subplot(111)
xval = [1,2,3,4]
yval = [ 22., 13., 21., 6.]
for j in range(len(xval)):
ax1.bar(xval[j], yval[j], width=0.8, bottom=0.0, align='center', color='k', label=data_dic[xval[j]])
ax1.set_xticks(xval)
ax1.legend()
plt.show()

Thanks!

