I'm just using Histogram[data, 50]
. All the examples on the Histogram
help page show show the number of elements when the cursor hovers over each bin. I've tried to use Tooltip
but it just shows 50 (the number of bins) for every bin.
$\begingroup$
$\endgroup$
1
-
$\begingroup$ Possible duplicate mathematica.stackexchange.com/questions/51075/… mathematica.stackexchange.com/questions/50991/… $\endgroup$– Basheer AlgohiCommented Feb 24, 2015 at 5:43
Add a comment
|
2 Answers
$\begingroup$
$\endgroup$
LabelingFunction is your friend, see here:
Histogram[RandomVariate[NormalDistribution[0, 1], 500],
LabelingFunction -> Above]
You can also use ToolTipe like so:
Tooltip[Histogram[RandomVariate[NormalDistribution[0, 1], 500]]]
$\begingroup$
$\endgroup$
2
data = RandomVariate[NormalDistribution[0, 1], 200];
Histogram[data, 50, ImageSize -> 400, LabelingFunction -> Tooltip]
-
$\begingroup$ Thank you, greatly appreciated! Couldn't find it in my documentation search. $\endgroup$– user5091Commented Feb 24, 2015 at 5:09
-
1$\begingroup$ @user5091, glad I could help. Apparently there is some max number of bins beyond which tooltips are not shown. $\endgroup$– kglrCommented Feb 24, 2015 at 5:40