# How do I get Mathematica to show X = 0 (instead of leaving out this tick mark)?

I have no problem getting Mathematica to shift the origin in my Plot. What I have a problem with, however, is getting Mathematica to show the tick marks at the origin.

More specifically, I don't need Mathematica to show the Y-value at the origin, but I would like it to show the X-value at the origin in the plot below, where I have shifted the origin to X = 1, Y = 0.

Using s is from OP's previous question:

You can use the option PlotRangePadding:

StackedListPlot[s[[1]], FillingStyle -> {4 -> White}, AxesOrigin -> {1, 0},
PlotRangePadding -> {Scaled[.01], 0}, ImageSize -> Large]


Alternatively, the option Method with sub-option "AxisPadding":

StackedListPlot[s[[1]], FillingStyle -> {4 -> White} , AxesOrigin -> {1, 0},
Method -> {"AxisPadding" -> {Scaled[.01], 0}}, ImageSize -> Large]


Finally, you can add the desired tick labels using Epilog:

StackedListPlot[s[[1]],FillingStyle -> {4 -> White} , AxesOrigin -> {1, 0},
Epilog -> Text[Style[1, "GraphicsLabel"], {1, -.01},{0, 1}],
PlotRangeClipping -> False, ImageSize -> Large]


• where did you learn about "AxisPadding"? – Mike Honeychurch Oct 29 '18 at 21:35
• @MikeHoneychurch, tried ChartingResolvePlotTheme[Automatic, Plot] – kglr Oct 29 '18 at 21:37
• thanks! Yet another good find from the Charting context. Wish a lot of that stuff was documented – Mike Honeychurch Oct 29 '18 at 21:41
• The PlotRangePadding solution was very helpful! – user120911 Oct 30 '18 at 8:42

Your title says you want to show "X = 0" but your graph tick shows you want "X = 1" and your label seems to show you want it labeled "2".

Ticks -> {Range[5],Automatic}
`
• For some reason, that didn't work. But the crude AxesOrigin -> {0.965, 0} was satisfactory. It seems Mathematica doesn't like numbers at the origin? – user120911 Oct 29 '18 at 20:05