# One less arrow vector than asked for

Bug introduced in 10.0.0 and persisting through 13.2.0 or later.

Consider the following code:

f[t_, y_] := t + y;
VectorPlot[(#1/Norm[#1] &)[{1, f[t, y]}], {t, -3, 3}, {y, -3, 3},
Frame -> False, Axes -> True, AxesLabel -> {t, y},
VectorPoints -> 11,
VectorScale -> Tiny,
VectorStyle -> {"Segment", GrayLevel[0.5]}
]


But I only get 10 by 10 vectors instead of 11 by 11. Is this a bug?

• i get the expected output (11 by 11 vector points) in version 9 (Windows 8 64bit). In version 10, something strange is happening with VectorPoints->11 -- other values seem to work fine.
– kglr
Jan 16, 2015 at 5:31
• Try with {t, -4, 4}, {y, -4, 4}. Is the result as expected?
– user9660
Jan 16, 2015 at 8:20
• Desired result in v8.0.4 and v9.0.1. I think it's reasonable to consider it as a bug. Jan 17, 2015 at 3:43
• Interestingly this works on 10.0.1 but is broken again on 10.0.2 Jan 19, 2015 at 8:20
• related 73950.
– Kuba
Feb 28, 2016 at 9:49

## 1 Answer

In version 13.2.0 if we grab the code from the O.P we get $$11 \times 12$$. The work-around that was suggested in the comments, i.e change {t, -3, 3}, {y, -3, 3} to {t, -4, 4},{y, -4, 4} also does not work in this version; I checked that it works fine in 12.0. The following gives $$11 \times 11$$ vectors.

Note that the following work-around is for v13.2 and for v13.1.

f[t_, y_] := t + y;
VectorPlot[
(#1/Norm[#1] &)[{1, f[t, y]}],
{t, -3, 3},
{y, -3, 3},
Frame -> False,
Axes -> True,
AxesLabel -> {t, y},
VectorPoints -> {11,11},
VectorScale -> Tiny,
VectorStyle -> {"Segment", GrayLevel[0.5]}]


The following work-around is for v12.0. It has, also, been suggested in the comments for earlier versions.

f[t_, y_] := t + y;
VectorPlot[
(#1/Norm[#1] &)[{1, f[t, y]}],
{t, -4, 4},
{y, -4, 4},
Frame -> False,
Axes -> True,
AxesLabel -> {t, y},
VectorPoints -> 11,
VectorScale -> Tiny,
VectorStyle -> {"Segment", GrayLevel[0.5]}]


Neither of the work-arounds presented above works in v13.0