I am trying to make a simple plot of a spherical field falling off with distance from origin:
VectorPlot[{x, y} / EuclideanDistance[{0, 0}, {x, y}]^2, {x, -3, 3}, {y, -3, 3}]
I just get dots. Why do I get this?

|
I am trying to make a simple plot of a spherical field falling off with distance from origin:
I just get dots. Why do I get this?
|
||||
|
The problem is that the singularity of the field dominates the scale chosen for the vector arrow size. You have to introduce a cutoff into the function that determines the scale:
The magic happens in the Some alternative ways to visualize vector fields with singularities are discussed here - that was in the context of a complex variable, but it's ultimately the same problem. I repeated this answer here because your question is not about complex fields. |
|||||||||||
|
|
An alternative is to use StreamPlot, for example as follows:
which produces a similar result
Depending on the number of VectorPoints you use, a plot will appear with only points as in the original problem. I presume this also has to do with the vector placement/sampling and the singularity in the vector field being plotted. Experimenting with the VectorPoints, StreamStyle and other options to the StreamPlot function may lead to more appealing visualizations. Note that in the plot shown here, the 'stream' portion of the StreamPlot has been hidden. |
||||
|
|
Norm[{x, y}]^2. (But you would probably prefer keepingEuclideanDistancein case the center were not at the origin.) – murray Feb 24 at 23:20