# RotateLabel is not working in Plot

I want to generate a plot with the label of the vertical axis rotated by 90 degree in order to save space. I cannot make that work with the option RotateLabel. Here is a MWE:

Graphics[Plot[x, {x, 0, 2}, AxesLabel -> {"x", "y"}], RotateLabel -> True]


According to the Mathematica documentation RotateLabel is a Graphics option that should also be working with Plot or ListPlot.

Any help appreciated. Thanks.

• I always thought that this option is automatically used in the funcltions like Plot if the option Frame->True is used. So the label is rotated by default, but if it should not be rotated, use RotateLabel->False. – Alexei Boulbitch May 14 '18 at 13:00
• I'd use AxesLabel -> {"x", Rotate["y", Pi/2]}. – b.gates.you.know.what May 14 '18 at 13:14

RotateLabel is exclusively for Frame, not for Axes.

As a workaround, you can rotate any piece of text using Rotate before rendering it.

• Thanks. This only rotates the text, but I would also like to place the label besides the y-axis, not above it. – benybenjamin May 14 '18 at 14:44
• @benybenjamin Then the best solution is to use a Frame. Note that you can turn on and off the four frame borders independently. You can keep only the left and bottom ones for an axes-like look. – Szabolcs May 14 '18 at 14:47
• @benybenjamin Sorry, I just noticed that you already found it. – Szabolcs May 14 '18 at 14:49

Plot[x, {x, 0, 2}, Axes -> False, Frame -> {{True, False}, {True, False}}, FrameLabel -> {{"a very long label for the y-axis", None}, {"x", None}}, FrameTicks -> All]