How would I set the x_axis labels at the indices 1,2,3....n to be something different.
lam_beta = [(lam1,beta1),(lam1,beta2),(lam1,beta3),....(lam_n,beta_n)]
chunks = [chunk1,chunk2,...chunk_n]
ht_values_per_chunk = {chunk1:[val1,val2,...],chunk2:[val1,val2,val3,.....]...}
color='rgbycmk'
j=0
for chunk in chunks:
plt.plot([hr_values_per_chunk[chunk][i] for i,item in enumerate(lam_beta)],[i for i,item in enumerate(lam_beta)],color=j%len(color))
j+=1
plt.set_xticks([i for i,item in enumerate(lam_beta)])
plt.set_xticklabels([item for item in lam_beta],rotation='vertical')
plt.show()
Error:
AttributeError: 'module' object has no attribute 'set_xticks'
Here I am unable to set the values of the lambda_beta tuple to be the values of each of the ticks on the x-axis as it say plt has no such method. How would I be able to achieve this for plt? I used xticks because this is how I had done it while generating a histogram in matplotlib. Any help would be appreciated. Thanks in advance!