How to | Plot a Vector Field
You can visualize a vector field by plotting vectors on a regular grid, by plotting a selection of streamlines, or by using a gradient color scheme to illustrate vector and streamline densities. You can also plot a vector field from a list of vectors as opposed to a mapping.
Use VectorPlot to plot vectors in a vector field given by a mapping from to :
Use StreamPlot to plot streamlines:
Use the StreamPoints option to plot selected streamlines:
Use the StreamPoints option to select streamlines in the plot:
Use VectorPlot3D to plot a three-dimensional vector field (vectors are colored depending on their magnitude):
Use StreamPoints to control the number of streamlines in the plot:
Use ColorFunction to apply a color scheme based on the density of vectors and streamlines:
You can use VectorColorFunction to choose a color scheme and specify a function with which to color the vectors. This makes two plots colored with the "DarkRainbow" color scheme, each according to the functions specified in VectorColorFunction:
Because some functions used in VectorColorFunction are common, the Wolfram Language allows you to call them as variables. These are represented by integers ranging from 1 to 5, where 1 is the variable, 2 is the variable, 3 is the first field component, 4 is the second field component, and 5 is the vector magnitude. To specify these variables, use #n& with VectorColorFunction, where n represents the variable number.
Specify markers with VectorMarkers: