This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

GradientFieldPlot

GradientFieldPlot[f, {x, xmin, xmax}, {y, ymin, ymax}]
generates a plot of the gradient vector field of the scalar function f.
GradientFieldPlot[f, {x, xmin, xmax, dx}, {y, ymin, ymax, dy}]
uses steps dx in variable x, and steps dy in variable y.
  • The derivatives of f are calculated analytically.
  • GradientFieldPlot has the same options as Graphics, with the following additions and changes:
ColorFunctionNonea function to use for coloring the vectors by their magnitude
MaxArrowLengthNonelength of the largest vector to be drawn, applied after the ScaleFunction, but before the ScaleFactor
PlotPoints15the number of evaluation points in each direction
ScaleFactorAutomaticlinearly rescales the vectors so the longest vector is equal to this value; Automatic fits the vectors in the mesh, None eliminates the rescaling
ScaleFunctionNonea function to use for rescaling the magnitude of vectors
Needs["VectorFieldPlots`"]
Gradient field of sin(x y) over the unit square:
In[2]:=
Click for copyable input
Out[2]=