Is there a way to prevent ugly collision of axes labels and axes number like in the following examples, without the need of adding white space:


Plot3D[Sin[x] Cos[y], {x, -Pi, Pi}, {y, -Pi, Pi}, 
    AxesLabel -> {"ω", Subscript["E","F"], "Log[σ(ω)]"}, LabelStyle -> Directive[16]]


To avoid this distant axes label "Log[$\sigma(\omega)]" one can rotate it, but then:


    AxesLabel->{"ω",Subscript["E","F"],Rotate["Log[σ(ω)]",90 Degree]},


I cannot imagine that using a 2-dimensional column with one element "Log[σ(ω)]" and the other a blank square is the only solution to cure Plot2. Is there a nice solution to prevent such an overlay?


1 Answer 1


You could specify the option ImageSize ->600 (or something large enough to you taste). However, that would change the proportions of other parts of the plot, and you may not want that.

So instead I'd suggest adding some offset around the labels by using Framed as follows:

Plot3D[Sin[x] Cos[y], {x, -Pi, Pi}, {y, -Pi, Pi}, 
 AxesLabel -> {"ω", Subscript["E", "F"], 
    FrameStyle -> None, 
    FrameMargins -> 20
 LabelStyle -> Directive[16]


To see what this does in more detail, you could leave out the option FrameStyle -> None, or add the option Background -> Yellow to the Framed command.

  • $\begingroup$ Congrats on your 10K! $\endgroup$ Jun 26, 2012 at 21:53
  • $\begingroup$ @SjoerdC.deVries Thanks - you're almost there too! BTW, how many points do we need in order to win a prize? $\endgroup$
    – Jens
    Jun 26, 2012 at 22:04
  • $\begingroup$ Enough to beat Jon Skeet. $\endgroup$ Jun 26, 2012 at 22:08

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.