# How to give axes label to a histogram

I plotted a histogram and I used AxesLabel for labeling X axis and Y axis But it went wrong. How to do it?.

Xarray = A @@@ Tuples[Range[0, 9], 3];

M = RandomSample[Xarray, 7]

Table[energies =  RandomVariate[ExponentialDistribution[1.5], {Length@M}];

Total[energies/7], {i, 1000}];

Histogram[%, AxesLabel \[RightArrow] {"Average energy", "Number of times"}]

-
"But it went wrong" - how? Could you show a picture of what you've tried, and why you're dissatisfied with Mathematica's output? (AxesLabel works fine, BTW.) – J. M. Jul 13 '12 at 11:54
Try Histogram[%, AxesLabel -> {"Average energy", "Number of times"}]. – J. M. Jul 13 '12 at 11:59
... that is, replace \[RightArrow] with -> or \[Rule]. – kglr Jul 13 '12 at 12:12

\[Rule] is not the same as \[RightArrow]

Compare this (it works):

 r = Table[Total[RandomVariate[ExponentialDistribution[1.5], {7}]/7], {i, 1000}];

Histogram[r, AxesLabel \[Rule] {"Average energy", "Number of times"}]


With this (does not work)

 Histogram[r, AxesLabel \[RightArrow] {"Average energy", "Number of times"}]


\[Rule] is usually entered as two chars "->"

-