Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Here is a plot with the default frame ticks

S1 = Plot[Sin[x], {x, -7, 7}, Frame -> True, Axes -> False]

enter image description here

Now, if I define myself the range as well as the step separation of the left frame ticks by

S2 = Plot[Sin[x], {x, -7, 7}, 
  Frame -> True, 
  FrameTicks -> {{Range[-1, 1, 0.2], Automatic}, {Automatic, Automatic}}, 
  Axes -> False]

I get the following output

enter image description here

Well, there are two obvious issues. First of all, 0 should be not be shown in CPU accuracy. Moreover, all ticks should have the same number of decimal digits so, -1. should be -1.0, 1. should be 1.0 and 0 should be 0.0.

How can I get this?

share|improve this question
Try this first and then redo the plot. SetOptions[$FrontEndSession, PrintPrecision -> 6] screen shot !Mathematica graphics – Nasser Feb 16 '14 at 10:31
@Nasser I used this option but it had no effect. – Vaggelis_Z Feb 16 '14 at 10:38
No problem with '0' for me. You can try to use ClearAll["Global*"]` to remove the definition of S1, S2 before plotting and try to add WorkingPrecision -> MachinePrecision in the Plot command. – DaoTRINH Feb 16 '14 at 11:03
No problem with 0 for me either... in any case, you can just Chop the ticks. – R. M. Feb 16 '14 at 14:23
up vote 3 down vote accepted
Plot[Sin[x], {x, -7, 7}, Frame -> True, 
  FrameTicks -> {{{#, NumberForm[N@#, {2, 1}]} & /@ Range[-1, 1, 0.2], Automatic},
 {Automatic, Automatic}}, Axes -> False]
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.