# Fix the position of the axes label [duplicate]

How can I set the position of the axes labels (X,Y,Z), so that, among other things, they do not overlap with the numbers in the axes? Here an easy example:

a={{1,1,0.3},{1,2,0.4},{1,3,0.5},{2,1,0.6},{2,2,0.7},{2,3,0.8}};

b=ListPlot3D[a,
PlotLabel->Style["A",15],
LabelStyle->Directive[Black,11],
AxesLabel->{"X","Y","Z"}]


The problem here is that when I do:

Grid[{{b,b},{b,b}}]


axes labels overlap with numbers.

I checked many related questions and the best solution I found (for 2 dimensional plots) is to add

   Epilog -> {Inset["X", Scaled[{0.35, 0.38}]], Inset["Y",Scaled[{0.48,0.95}]]}


but this does not work for 3 dimensions.

Any ideas?

Thank you

• I agree with @gpap. If that Q&A does not answer your question sufficiently, please provide additional details. – bobthechemist Nov 17 '14 at 17:04
• @AlexeyPopkov this is exactly what I needed! Thank you! – Mencia Nov 17 '14 at 17:59

One possible solution is to use Inset and Graphics with Epilog. It gives you full control over label placement:

a = {{1, 1, 0.3}, {1, 2, 0.4}, {1, 3, 0.5}, {2, 1, 0.6}, {2, 2,
0.7}, {2, 3, 0.8}};

b = ListPlot3D[a, PlotLabel -> Style["A", 15],
LabelStyle -> Directive[Black, 11]];
gr = Graphics[Inset[b, Center, Center, ImageScaled[.85]],
Epilog -> {Text["X", ImageScaled[{.4, .2}]],
Text["Y", ImageScaled[{.83, .3}]],
Text["Z", ImageScaled[{.05, 1/2}]]}] Grid[{{gr, gr}, {gr, gr}}] While not optimal, you can convert the plots to images then put them into the grid. You may also consider trying the BoxRatios option to size your ListPlot3D such that the axis are the way you want them:

a={{1,1,0.3},{1,2,0.4},{1,3,0.5},{2,1,0.6},{2,2,0.7},{2,3,0.8}};

b=ListPlot3D[a,
PlotLabel->Style["A",15],
LabelStyle->Directive[Black,11],
AxesLabel->{"X","Y","Z"}, BoxRatios -> {3, 3, 3}]

bi=Image[b]

Grid[[{bi,bi},{bi,bi}]]