I have a huge data and I want to add two labels to the Histogram. the problem here is that the labels are calculated and added automatically to the histogram. for example if I have the following Histogram:
Histogram[RandomVariate[NormalDistribution[0, 10], 20000], 20,
LabelingFunction -> (Placed[Rotate[Style[#1, Bold, 14], 90 Degree],
Above] &),
ColorFunction -> Function[{height}, ColorData["Rainbow"][height]]]
In this Histogram, the Bars labels are calculated automatically. I want to add the percentage of each number at the top of the number. something like the following handmade Histogram :
Answer
Ok I got it:
Histogram[RandomVariate[NormalDistribution[0, 10], 20000], 20,
LabelingFunction -> (Placed[
Column[{Rotate[Style[#1/20000. "%", Red], 90 Degree],
Rotate[Style[#1, Bold, 14], 90 Degree]}], Above] &),
ColorFunction -> Function[{height}, ColorData["Rainbow"][height]]]
Comments
Post a Comment