3
$\begingroup$

I'd like to draw a plot with the $x$ and $y$ axes labeled outside the plot and along the axes (with $y$ axis rotated)--not at the end of each axis--as in this Matlab plot. Moreover, I do not want to use a Frame.

enter image description here

(Ignore the Title.)

$\endgroup$
3
  • 3
    $\begingroup$ does Plot[x, {x, 0, 1}, FrameLabel -> {{"y-Label", None}, {"x-Label", None}}, Frame -> {{True, False}, {True, False}}] give what you need? $\endgroup$
    – kglr
    Commented Oct 21, 2019 at 21:02
  • $\begingroup$ @kglr: Yep... that's it. (How did I not find that on my own!?!) $\endgroup$ Commented Oct 21, 2019 at 21:04
  • 1
    $\begingroup$ also Labeled[Plot[x, {x, 0, 1}], {"x-Label", "y-Label"}, {Bottom, Left}, RotateLabel -> True]? $\endgroup$
    – kglr
    Commented Oct 21, 2019 at 21:04

1 Answer 1

6
$\begingroup$

You can mimic a plot without a frame using Frame -> {{True, False}, {True, False}}:

Plot[x, {x, 0, 1}, 
 FrameLabel -> {{"y-Label", None}, {"x-Label", None}}, 
 Frame -> {{True, False}, {True, False}}]

enter image description here

You can also use Labeled:

Labeled[Plot[x, {x, 0, 1}], 
 {"x-Label", "y-Label"}, 
 {Bottom, Left}, 
 RotateLabel -> True]

enter image description here

$\endgroup$

Your Answer

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

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