2
$\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$
4
$\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$
  • $\begingroup$ Actually you can use AxesLabel->Rotate[Label,90 Degree] $\endgroup$ – Wjx Jun 8 '16 at 1:18
  • $\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 '16 at 4:24
  • $\begingroup$ oh, right, I've misunderstood his goal. $\endgroup$ – Wjx Jun 8 '16 at 4:38
1
$\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, privacy policy and cookie policy

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