Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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:

Plot1:

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

Plot1

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

Plot2:

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

Plot2

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?

share|improve this question

1 Answer 1

up vote 13 down vote accepted

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 -> {"\[Omega]", Subscript["E", "F"], 
   Framed["Log[\[Sigma](\[Omega])]", 
    FrameStyle -> None, 
    FrameMargins -> 20
   ]}, 
 LabelStyle -> Directive[16]
]

framed

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.

share|improve this answer
    
Congrats on your 10K! –  Sjoerd C. de Vries Jun 26 '12 at 21:53
    
@SjoerdC.deVries Thanks - you're almost there too! BTW, how many points do we need in order to win a prize? –  Jens Jun 26 '12 at 22:04
    
Enough to beat Jon Skeet. –  Sjoerd C. de Vries Jun 26 '12 at 22:08

Your Answer

 
discard

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.