# Placing x-axes label below rather than at end of axes

By default Mathematica places the x-axis labels at the end of the axes like

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

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?

-
Question is related this question –  m_goldberg Jan 14 '13 at 16:55

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"]


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:

Grid[{

{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
]


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

Clear[x];

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

]


edit To answer the comment about exporting;

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

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.

-
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]


-