6
$\begingroup$

I'm attempting to generate some histograms, and I'd like to automatically label the X-axis. However, Histogram[. . ., AxesLabel -> {"X", "Y"}] places the "X" label on the RHS of the axis. How do I direct that the "X" label should be positioned below the axis? I need some automated method (I can of course move it by hand), since I'm going to be generating hundreds of diagrams.

$\endgroup$
5
$\begingroup$

You can use Frame->True

Histogram[{1, 2, 3}, Frame -> True, FrameLabel -> {{"Y", None}, {"X", "my histogram"}}, 
  RotateLabel -> False]

Mathematica graphics

| improve this answer | |
$\endgroup$
  • $\begingroup$ I wish there was a way of doing it without the frame $\endgroup$ – Karolis Apr 26 '17 at 16:28
4
$\begingroup$

I wish there was a way of doing it without the frame - Karolis

Labeled[Histogram[{1, 2, 3}], {"X", "Y"}, {Bottom, Left}]

Mathematica graphics

| improve this answer | |
$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.