Zero near origin of coordinates

Click For Summary
SUMMARY

The discussion addresses the issue of displaying the zero tick label at the origin in Mathematica plots. Users reported that the default behavior of Mathematica does not show the zero label at the axes origin, even when manually setting ticks. The recommended solutions include using the Epilog option to add the zero label explicitly with commands such as Plot[Sin[x], {x, -2 Pi, 2 Pi}, Epilog -> Text[0, {0, 0}, {2, -1.5}]] and Plot[Sin[x], {x, -2 Pi, 2 Pi}, Epilog -> Style[Text[0], Background -> White]].

PREREQUISITES
  • Familiarity with Mathematica syntax and plotting functions
  • Understanding of the Epilog option in Mathematica
  • Knowledge of coordinate systems and tick labeling in graphical representations
  • Basic experience with trigonometric functions, specifically Sin[x]
NEXT STEPS
  • Explore advanced plotting techniques in Mathematica
  • Learn about customizing tick marks and labels in Mathematica
  • Investigate the use of the AxesOrigin option in Mathematica
  • Review the Mathematica documentation on graphical options and styles
USEFUL FOR

This discussion is beneficial for Mathematica users, data visualizers, and educators who require precise control over plot aesthetics, particularly in displaying axis labels effectively.

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:

Similar threads

  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
6K
  • · Replies 5 ·
Replies
5
Views
3K