I have a non-numerical data, let say
data = Table[RandomChoice[{0.2, 0.3, 0.25, 0.15, 0.1} -> {"A", "B", "C", "D", "E"}], {500}];
and i want to make a histogram for this data. My solution so far
datanew = data;
label = Sort@DeleteDuplicates[data];
Do[datanew = ReplaceAll[datanew, label[[i]] -> i], {i, 1, Length[label]}]
Histogram[datanew, Ticks -> {None, Automatic}, ChartLabels -> {None, Placed[label, Below]}]
Is there any better way to do this? Thank you.