Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

By default Mathematica places the x-axis labels at the end of the axes likeenter image description here

Googling has suggested a way around this is to use Frame- for example Frame -> {True, True, False, False}, FrameLabel -> {"E/T", None} which produces something like enter image description here

Which is not too bad, but I do not want this vertical dividing line x=0 and really would have preffered to keep the y-axis in the middle of the plot where this divider line now is. Can this be done? Is there a better way than this to move axes labels below?

share|improve this question
Question is related this question – m_goldberg Jan 14 '13 at 16:55
up vote 16 down vote accepted

You are saying would have preffered to keep the y-axis in the middle of the plot where this divider line now is.

An easy way is to use Labeled with Plot since Plot keeps the y axis in the middle while Frame->True moves it to the left where you do not want it.

Labeled[Plot[Sin[x] x, {x, -3, 3}], "E/T"]

enter image description here

Labeled has many option to allow different placements and alignments and such, so it can actually be used instead of the plot labeling. The only thing to keep in mind, is that symbols used in inside the Plot, such as those used by PlotLabel are automatically set in TraditionalMode while those set by Labeled are not and you have to do that yourself if you want that typesetting. Compare the typesetting below on the labels:


  {Labeled[Plot[Sin[x] x, {x, -3, 3}, ImageSize -> 300],Sin[x]]},

  {Plot[Sin[x] x, {x, -3, 3},AxesLabel->{Sin[x],None},ImageSize->300]}

 }, Frame -> All

enter image description here

But this is easy to handle. Simply use TraditionalForm for `Labeled, like this


Labeled[Plot[Sin[x] x, {x, -3, 3}, ImageSize -> 300], 

 Text@TraditionalForm@Style[Sin[x], 16]


enter image description here

edit To answer the comment about exporting;

I just saved the image using Save Selection as eps, and labels are there

enter image description here

I am on Linux, and Export in the version of Mahematica I am using is not supported. But it seems to save .eps just fine.

share|improve this answer
thanks, that works pretty well. I didn't mention in my OP but I actually have three plots that I usually show on the same axis using Show[plot1,plot2,plot3] -with your method if I do Show[ Labeled[Plot[Sin[x] x, {x, -3, 3}], "E/T"],Labeled[Plot[Cos[x] x, {x, -3, 3}], "E/T"]] for example then things don't seem to work. Is there a way to get around this? – fpghost Jan 14 '13 at 12:14
Actually I see now that Labeled[Show[plot1, plot2, plot3], "E/T", LabelStyle -> Directive[20, Bold]] works fine. Thanks again. – fpghost Jan 14 '13 at 12:18
If one then exports this figure as an eps say the axes labels do not seem to get exported too? – fpghost Jan 14 '13 at 12:22
Sorry my mistake again- the problem was I was simply doing `Right-click>Export' rather than the command version which gave the desired behaviour. – fpghost Jan 14 '13 at 12:46
  Plot[Sin[x] x, {x, -3, 3}, Frame -> {True, True, False, False}, 
   FrameLabel -> {"E/T", None}, Axes -> False]

enter image description here

share|improve this answer
Note that the axis now sits away from (-3,0) by a small margin. Do you know how to set it exactly at (-3,0)? – Corvus Mar 26 '15 at 23:11
@Corvus, you can use the option PlotRangePadding -> 0. – kglr Mar 26 '15 at 23:14
You're amazing - answering a two year old post in under 5 minutes - thank you!! – Corvus Mar 26 '15 at 23:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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