There are two issues:
- The number of digits in "Velocity" and "Acceleration" change.
- Even when the number of digits are equal you are not using a fixed width font so the space needed varies.
There are a few ways of addressing this. One method is to use Grid
and ItemSize
instead of StringForm
to keep the space reserved for the numbers constant.
Manipulate[Graphics[{
Arrowheads[{-0.02, 0.02}],
Arrow[{{s[-6], 0}, {s[10], 0}}],
Red, PointSize[Large],
Point[{s[t], 0}]},
PlotLabel ->
Grid[{{"Velocity = ", Round[v[t], .1] , " Acceleration = ", Round[a[t], .1]}},
ItemSize -> {{Automatic, {2 -> 4, 4 -> 4}}, Automatic}]
],
{{t, -5}, -6, 10, Appearance -> "Labeled"}]
Hope this helps.
ItemSize
spec for OP's comment below.
In the Details and Options section for Grid
have a read of the item Settings for the options Alignment, Background, Frame, ItemSize, and ItemStyle can be given as follows to apply separately to different items and The $\text{spec}_{k}$ can have the following forms directly underneath it.
The first specification is for the column widths and the second for the row heights. It specifies Automatic
widths for all columns except columns 2 and 4 as well as Automatic
heights for all rows.