4
$\begingroup$

i was wondering how it is possible to rotate the axesLabel of a Plot in Mathematica. Specifically i want to rotate the Label of the Y-Axis so that it shows up next to the axes to use up less space. Any suggestions?

Thanks in advance!

$\endgroup$

2 Answers 2

6
$\begingroup$

So what i found is usind the Labeled function.

For example

Labeled[Plot[Sin[t], {t, 0, 9}, AxesOrigin -> {0, 0}], {"Y axis", "X Axis"}, {Left, Bottom}, RotateLabel -> True]
$\endgroup$
3
  • 3
    $\begingroup$ Actually you can use AxesLabel->Rotate[Label,90 Degree] $\endgroup$
    – Wjx
    Jun 8, 2016 at 1:18
  • 1
    $\begingroup$ @Wjx that will rotate the label, but it will still be positioned at the end of each axis, won't it? As I understood it, OP wanted the rotated label to be placed to the side of the axes it corresponds to, much like frame labels are positioned. $\endgroup$
    – MarcoB
    Jun 8, 2016 at 4:24
  • 1
    $\begingroup$ oh, right, I've misunderstood his goal. $\endgroup$
    – Wjx
    Jun 8, 2016 at 4:38
2
$\begingroup$

I often use FrameLabel in preference to axis labels. This might suit you better:

Plot[Sin[x], {x, 0, 2 \[Pi]}, Frame -> True,  FrameLabel -> {"x-axis", "y-axis"}]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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