1
$\begingroup$

These plots do not show the first tick label on the left:

Plot[Sin[x], {x, -4, 4}, 
 Ticks -> {{#, "Z = " <> ToString@#} & /@ {-.41, 1.05}, None}]
Plot[Sin[x], {x, -4, 4}, 
 Ticks -> {{#, "Z = " <> ToString@#} & /@ {-.42, 1.05}, None}]
Plot[Sin[x], {x, -4, 4}, 
 Ticks -> {{#, "Z = " <> ToString@#} & /@ {-.43, 1.05}, None}]
Plot[Sin[x], {x, -4, 4}, 
 Ticks -> {{#, "Z = " <> ToString@#} & /@ {-.44, 1.05}, None}]
Plot[Sin[x], {x, -4, 4}, 
 Ticks -> {{#, "Z = " <> ToString@#} & /@ {-.51, 1.05}, None}]

screenshot

But these work fine:

Plot[Sin[x], {x, -4, 4}, 
 Ticks -> {{#, "Z = " <> ToString@#} & /@ {-1.41, 1.05}, None}]
Plot[Sin[x], {x, -4, 4}, 
 Ticks -> {{#, "Z = " <> ToString@#} & /@ {-1.42, 1.05}, None}]
Plot[Sin[x], {x, -4, 4}, 
 Ticks -> {{#, "Z = " <> ToString@#} & /@ {-1.43, 1.05}, None}]
Plot[Sin[x], {x, -4, 4}, 
 Ticks -> {{#, "Z = " <> ToString@#} & /@ {-1.44, 1.05}, None}]
Plot[Sin[x], {x, -4, 4}, 
 Ticks -> {{#, "Z = " <> ToString@#} & /@ {-1.51, 1.05}, None}]

enter image description here

Am I missing something, or possibly a bug?

$\endgroup$
3
  • 1
    $\begingroup$ Mathematica will suppress tick labels that would obscure an axis line if drawn. In such cases you will see the tick but not the label. $\endgroup$
    – m_goldberg
    Commented Apr 28, 2015 at 19:49
  • $\begingroup$ @m_goldberg Is it possible to switch off suppression of such tick labels? $\endgroup$ Commented Apr 29, 2015 at 0:14
  • $\begingroup$ @AlexeyPopkov. Not that I know of. $\endgroup$
    – m_goldberg
    Commented Apr 29, 2015 at 2:04

1 Answer 1

1
$\begingroup$

The Problem is because for Ticks close the origin and with the current image size, the ticks place extend into the positive side of the axes.

Check this:

Plot[Sin[x], {x, -4, 4}, 
 Ticks -> {{#, "Z = " <> ToString@#} & /@ {-.51, 1.05}, None}, 
 ImageSize -> 600]

enter image description here

$\endgroup$
1
  • $\begingroup$ @m_goldberg yes that is what I meant but may be I did not express it clearly. Thanks $\endgroup$ Commented Apr 28, 2015 at 20:06

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.