# Axis is hidden when plotting with Frame option

When plotting with Frame->True option, the axis is hidden when it is too close to the boundary of the plot. For example:

Plot[Sin[x], {x, 0, 10}, PlotRange -> {-0.1, 1}, Frame -> True] But if I increase the range, the x-axis can appear.

Plot[Sin[x], {x, 0, 10}, PlotRange -> {-0.2, 1}, Frame -> True] How to force Mathematica to show the X-axis in the first case without changing the plotting range?

• I have tried assigning AxesOrigin -> {0, 0} but it doesn't work. – Louis Yang Mar 5 '17 at 0:10
• Thanks for the check, couldn't try myself from a phone. – Kuba Mar 5 '17 at 12:24
• Inversely related: (32189) – Mr.Wizard Mar 10 '17 at 14:09

We can easily show that this is not a feature of Plot but of Graphics itself:

Graphics[Circle[], Frame -> True, Axes -> True, AxesOrigin -> {0, 0},
PlotRange -> {{0, 1}, {#, 1}}] & /@ {-1/9, -1/9 - 0.00000001} So it seems that the axis line is suppressed at 1/9 of the range of the plot. This holds in both directions and at other scales:

Graphics[
{Circle[], Circle[{2, 2}, 2]}, Frame -> True, Axes -> True,
AxesOrigin -> {0, 0}, PlotRange -> {2 {#, 1}, 4 {#, 1}}
] & /@ {-1/9, -1/9 - 0.00000001} I suspect that this was intentionally programmed into Graphics to reduce plot clutter.

I recommend the use of GridLines in its place:

Plot[Sin[x], {x, 0, 10}, PlotRange -> {-0.1, 1}, Frame -> True,
GridLines -> {{0}, {0}}, GridLinesStyle -> Black] 