Zero near origin of coordinates

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 4K views
sukharef
Messages
54
Reaction score
0
Hello!

If you do a plot in Mathematica,

for example

Plot[Sin[x], {x, -, 2 Pi}]

804c9e884652.jpg


it won't put zero near origin of coordinates. So how can do it ? I tryed actually AxesOrigin or smth like that, but it didn't help me.

Thanks!
 
Physics news on Phys.org
The http://reference.wolfram.com/mathematica/ref/Ticks.html#ES_6_" says "A tick label on the axes origin is not displayed" even when the ticks are manually set. I think they did this because there's no nice place to really place the origin tick - unless you place it right on top of the origin.

If you want 0 at the origin try something like

Plot[Sin[x], {x, -2 Pi, 2 Pi}, Epilog -> Text[0, {0, 0}, {2, -1.5}]]

or

Plot[Sin[x], {x, -2 Pi, 2 Pi}, Epilog -> Style[Text[0], Background -> White]]
 
Last edited by a moderator:
Simon_Tyler said:
The http://reference.wolfram.com/mathematica/ref/Ticks.html#ES_6_" says "A tick label on the axes origin is not displayed" even when the ticks are manually set. I think they did this because there's no nice place to really place the origin tick - unless you place it right on top of the origin.

If you want 0 at the origin try something like

Plot[Sin[x], {x, -2 Pi, 2 Pi}, Epilog -> Text[0, {0, 0}, {2, -1.5}]]

or

Plot[Sin[x], {x, -2 Pi, 2 Pi}, Epilog -> Style[Text[0], Background -> White]]

Thanks!
 
Last edited by a moderator: