I wanted to put some FrameTicks
to a Plot
with
xticks = Range[-2, 2, 0.2]
and got
{-2., -1.8, -1.6, -1.4, -1.2, -1., -0.8, -0.6, -0.4, -0.2,
1.11022*10^-16, 0.2, 0.4, 0.6, 0.8, 1., 1.2, 1.4, 1.6, 1.8, 2.}
so there is the small number instead of the zero.
Using Table
gives the same output:
Table[k, {k, -2, 2, 0.2}]
{-2., -1.8, -1.6, -1.4, -1.2, -1., -0.8, -0.6, -0.4, -0.2,
1.11022*10^-16, 0.2, 0.4, 0.6, 0.8, 1., 1.2, 1.4, 1.6, 1.8, 2.}
But using 0.25
as the step value, everything is fine:
xticks = Range[-2, 2, 0.25]
{-2., -1.75, -1.5, -1.25, -1., -0.75, -0.5, -0.25, 0., 0.25, 0.5, \
0.75, 1., 1.25, 1.5, 1.75, 2.}
How to replace the small number and set it to zero?