I'm having two list which it self consist of lists. I want to plot a histogram using these lists.
following are the lists:
param_main_list
[['Para_length', 'Question1', 'Answer1', 'Question2', 'Answer2'],
['Para_length', 'Question1', 'Answer1', 'Question2', 'Answer2',
'Question3', 'Answer3', 'Question4', 'Answer4', 'Question5', 'Answer5'],
['Para_length', 'Question1', 'Answer1', 'Question2', 'Answer2',
'Question3', 'Answer3', 'Question4', 'Answer4', 'Question5', 'Answer5'],
['Para_length', 'Question1', 'Answer1', 'Question2', 'Answer2',
'Question3', 'Answer3', 'Question4', 'Answer4', 'Question5', 'Answer5']]
main_list:
[1107, 64, 129, 64, 67]
[1223, 34, 129, 62, 244, 56, 136, 48, 128, 43, 180]
[1345, 47, 96, 63, 241, 79, 97, 82, 108, 62, 134]
[648, 35, 111, 78, 131, 56, 86, 28, 47, 64, 151]
[[1107, 64, 129, 64, 67], [1223, 34, 129, 62, 244, 56, 136, 48, 128, 43,
180], [1345, 47, 96, 63, 241, 79, 97, 82, 108, 62, 134], [648, 35, 111,
78, 131, 56, 86, 28, 47, 64, 151]]
Consider these histogram take one to one correspondence from the list i.e 1st elem of param_main_list and 1st elem of main_list
I'm able to print a single histogram but I want multiple histogram for each cases separetly. The one I have generated is below
the code for above is:
for index in range(0,len(main_list)):
xpos = np.arange(len(main_list[index]))
plt.xticks(xpos,param_main_list[index])
plt.bar(param_main_list[index],main_list[index])
plt.hist()
This ain't a duplicate I have checked all solutions , please help me with this.