WLJS LogoWLJS Notebook

VectorPlot

VectorPlot[{vx, vy}, {x, xmin, xmax}, {y, ymin, ymax}] plots a 2D vector field as arrows.

Examples

Plot vector fields:

(* Simple vector field *)
VectorPlot[{y, -x}, {x, -2, 2}, {y, -2, 2}]

(* Gradient field *)
VectorPlot[{2 x, 2 y}, {x, -2, 2}, {y, -2, 2},
  VectorColorFunction -> "Rainbow"
]

Please visit the official Wolfram Language Reference for more details.

On this page