This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
 Graphics`PlotField` Anything that assigns a magnitude and direction at each point gives a vector field. Examples include the electromagnetic field and the velocity field of a fluid. Any ordinary differential equation can be used to define a vector field. These vector fields can be visualized by drawing arrows representing the vectors. The direction of the arrow is equal to the direction of the vector field at its base point. The magnitude of the arrow is proportional to the magnitude of the vector field. This package plots two-dimensional vector fields. For doing vector field plots in three dimensions use the package Graphics`PlotField3D`. Plotting vector fields in two dimensions. This loads the package. In[1]:= < 20, ScaleFunction -> (.5#&), ScaleFactor -> None] There are a variety of options to control the display of the vectors. Three of them control aspects of the scaling of the vector magnitudes. They are applied in the order ScaleFunction, MaxArrowLength, and ScaleFactor. The ScaleFunction can be a pure function that takes the magnitude of the vector, and returns the new magnitude for that vector. It can also be None, specifying no rescaling by this option. If its application results in a nonnumeric value, the vector is set to zero magnitude. Next, MaxArrowLength eliminates any vectors that are longer than the specified value after the application of the ScaleFunction. It can also be set to None, so no vectors are removed. Finally, the ScaleFactor is applied. It linearly scales the remaining vectors so that the length of the longest one is equal to the specified value. If ScaleFactor is set to Automatic, then in the field plotting functions the longest vector will be sized to the grid increment, so the head of any given vector will not cover the base of any adjacent vector. If it is set to None, no rescaling due to this option will occur. Thus, the ScaleFunction option is best used to change the relative magnitudes of the vectors, while the ScaleFactor is best used for linear scaling of the vectors when you know the desired length of the longest vector. If you want to perform linear rescaling of the vector lengths without specifying the longest vector, set ScaleFactor to None, as in the preceding example. MaxArrowLength is best for removing unusual outliers, or filtering out all longer vectors so fine changes in the field can be better observed. All of the two-dimensional vector plots also accept the same options as the Arrow primitive; all the arrows in the plot will use these options. A complex-valued function of a complex argument can be viewed as a vector field on the plane by using the real and complex parts of a complex number to give two coordinates. This is essentially the Polya representation of such a function. However, in the Polya representation the magnitude is scaled using ScaleFunction->(Log[#+1]&) and the negative of the imaginary part is used. Plotting the Polya representation of a complex-valued function. The complex function has zeros at the fourth roots of unity, so the magnitude of the vector field is small near these points. In[6]:= PlotPolyaField[(x + I y)^4 - 1, {x, 0, 3}, {y, 0, 3}] Vector field plots of lists. This gives an array of random vectors. In[7]:= varray = Table[ {Random[Real, {-0.7, 0.7}], Random[Real, {-0.7, 0.7}]}, {i, 10}, {j, 10}]; This displays the array of vectors in a plot. In[8]:= ListPlotVectorField[varray] This generates a list of vectors as base,vector pairs. In[9]:= vectors = Table[ {{Sin[u], Cos[u]}, {u^2 Sin[2u], u^2 Cos[2u]}}, {u, 0, 2 Pi, Pi/16}]; Here are the vectors without any scaling applied. In[10]:= ListPlotVectorField[ vectors, ScaleFactor -> None, Frame -> True] Here are the vectors with the longest vector scaled to a length of 1, and all other vectors scaled proportionately. In[11]:= ListPlotVectorField[ vectors, ScaleFactor -> 1, Frame -> True] In this plot, the vectors are all scaled by a function that converts their lengths to a constant. In[12]:= ListPlotVectorField[ vectors, ScaleFunction->(.4&), Frame -> True] Note that ListPlotVectorField treats the option ScaleFactor->Automatic the same as ScaleFactor->None.