2
$\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
  • 2
    $\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
    Oct 21 '19 at 21:02
  • $\begingroup$ @kglr: Yep... that's it. (How did I not find that on my own!?!) $\endgroup$ Oct 21 '19 at 21:04
  • $\begingroup$ also Labeled[Plot[x, {x, 0, 1}], {"x-Label", "y-Label"}, {Bottom, Left}, RotateLabel -> True]? $\endgroup$
    – kglr
    Oct 21 '19 at 21:04
5
$\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, privacy policy and cookie policy

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