---
title: "ListVectorDensityPlot"
language: "en"
type: "Symbol"
summary: "ListVectorDensityPlot[varr] generates a vector density plot from an array varr of vector and scalar field values {{vxij, vyij}, rij}. ListVectorDensityPlot[{{{x1, y1}, {{vx1, vy1}, r1}}, ...}] generates a vector density plot from vector and scalar field values {{vxi, vyi}, ri} given at specified points {xi, yi}. ListVectorDensityPlot[{data1, data2, ...}] plots data for several vector and scalar fields."
keywords: 
- list vector density plot
- plot vector field
- vizualise vector field
- arrow plot
canonical_url: "https://reference.wolfram.com/language/ref/ListVectorDensityPlot.html"
source: "Wolfram Language Documentation"
related_guides: 
  - 
    title: "Vector Visualization"
    link: "https://reference.wolfram.com/language/guide/VectorVisualization.en.md"
related_functions: 
  - 
    title: "ListVectorPlot"
    link: "https://reference.wolfram.com/language/ref/ListVectorPlot.en.md"
  - 
    title: "ListVectorPlot3D"
    link: "https://reference.wolfram.com/language/ref/ListVectorPlot3D.en.md"
  - 
    title: "ListStreamPlot3D"
    link: "https://reference.wolfram.com/language/ref/ListStreamPlot3D.en.md"
  - 
    title: "ListStreamDensityPlot"
    link: "https://reference.wolfram.com/language/ref/ListStreamDensityPlot.en.md"
  - 
    title: "ListLineIntegralConvolutionPlot"
    link: "https://reference.wolfram.com/language/ref/ListLineIntegralConvolutionPlot.en.md"
  - 
    title: "VectorDensityPlot"
    link: "https://reference.wolfram.com/language/ref/VectorDensityPlot.en.md"
  - 
    title: "ListDensityPlot"
    link: "https://reference.wolfram.com/language/ref/ListDensityPlot.en.md"
  - 
    title: "ListContourPlot"
    link: "https://reference.wolfram.com/language/ref/ListContourPlot.en.md"
---
# ListVectorDensityPlot

ListVectorDensityPlot[varr] generates a vector density plot from an array varr of vector and scalar field values {{vxij, vyij}, rij}. 

ListVectorDensityPlot[{{{x1, y1}, {{vx1, vy1}, r1}}, …}] generates a vector density plot from vector and scalar field values {{vxi, vyi}, ri} given at specified points {xi, yi}.

ListVectorDensityPlot[{data1, data2, …}] plots data for several vector and scalar fields.

## Details and Options

* ``ListVectorDensityPlot`` generates a vector plot of the vector field, superimposed on a background density plot of the scalar field.

* ``ListVectorDensityPlot`` displays a vector field by drawing arrows normalized to a fixed length. The arrows are colored by default according to the magnitude $\left\| \left\{v_x,v_y\right\}\right\|$ of the vector field. The vectors are drawn over a density plot of the scalar field ``r``.

* The magnitude $\left\| \left\{v_x,v_y\right\}\right\|$ of the vector field is used for the scalar field ``r`` by default.

* The plot visualizes the set $\left\{\left.\left\{\left\{v_x,v_y\right\},r\right\}\right|\{x,y\}\in \text{reg}\right\}$, where $\text{\textit{reg}}$ is the region for which $\left\{v_x,v_y\right\}$ is defined.

[image]

* ``ListVectorDensityPlot`` interpolates the data into vector function $\left\{v_x(x,y),v_y(x,y)\right\}$ and scalar function $r(x,y)$.

* For regular data, the vector field $\left\{v_x,v_y\right\}$ has value ``varr[[i, j, 1]]`` and the scalar field has value ``varr[[i, j, 2]]`` at $\{x,y\}=\{i,j\}$.

* For irregular data, the vector field $\left\{v_x,v_y\right\}$ has value ``{vxi, vyi}`` and the scalar field has value ``ri``at $\{x,y\}=\left\{\text{\textit{$x$}}_{\text{\textit{$i$}}},\text{\textit{$y$}}_{\text{\textit{$i$}}}\right\}$.

* If no scalar field values are given, they are taken to be the norm of the vector field.

* ``ListVectorDensityPlot[varr]`` arranges successive rows of ``varr`` up the page, and successive columns across.

* ``ListVectorDensityPlot`` by default interpolates the data given and plots vectors for the vector field at a regular grid of positions.

* With the setting ``VectorPoints -> All``, ``ListVectorDensityPlot`` instead shows vectors associated with the particular vector field data points given.

* ``ListVectorDensityPlot`` has the same options as ``Graphics``, with the following additions and changes:  []

|                             |                   |                                                                           |
| --------------------------- | ----------------- | ------------------------------------------------------------------------- |
| AspectRatio                 | 1                 | ratio of height to width                                                  |
| BoundaryStyle               | None              | how to draw RegionFunction boundaries                                     |
| BoxRatios                   | Automatic         | effective 3D box ratios for simulated lighting                            |
| ClippingStyle               | Automatic         | how to display arrows outside the vector range                            |
| ColorFunction               | Automatic         | how to color background densities                                         |
| ColorFunctionScaling        | True              | whether to scale arguments to ColorFunction                               |
| DataRange                   | Automatic         | the range of x and y values to assume for data                            |
| EvaluationMonitor           | None              | expression to evaluate at every function evaluation                       |
| Frame                       | True              | whether to draw a frame around the plot                                   |
| FrameTicks                  | Automatic         | frame tick marks                                                          |
| LightingAngle               | None              | effective angle for simulated lighting                                    |
| MaxRecursion                | Automatic         | the maximum number of recursive subdivisions allowed for the scalar field |
| Mesh                        | None              | how many mesh lines to draw in the background                             |
| MeshFunctions               | {#5&}             | how to determine the placement of mesh lines                              |
| MeshShading                 | None              | how to shade regions between mesh lines                                   |
| MeshStyle                   | Automatic         | the style of mesh lines                                                   |
| Method                      | Automatic         | methods to use for the plot                                               |
| PerformanceGoal             | \$PerformanceGoal | aspects of performance to try to optimize                                 |
| PlotLegends                 | None              | legends for color gradients                                               |
| PlotRange                   | {Full, Full}      | range of x, y values to include                                           |
| PlotRangePadding            | Automatic         | how much to pad the range of values                                       |
| PlotTheme                   | \$PlotTheme       | overall theme for the plot                                                |
| RegionFunction              | (True&)           | determine what region to include                                          |
| ScalingFunctions            | None              | how to scale individual coordinates                                       |
| VectorColorFunction         | Automatic         | how to color vectors                                                      |
| VectorColorFunctionScaling  | True              | whether to scale the arguments to VectorColorFunction                     |
| VectorMarkers               | Automatic         | shape to use for vectors                                                  |
| VectorPoints                | Automatic         | the number or placement of vectors to plot                                |
| VectorRange                 | Automatic         | range of vector lengths to show                                           |
| VectorScaling               | Automatic         | how to scale the sizes of arrows                                          |
| VectorSizes                 | Automatic         | sizes of displayed arrows                                                 |
| VectorStyle                 | Automatic         | how to draw vectors                                                       |
| WorkingPrecision            | MachinePrecision  | precision to use in internal computations                                 |

* The arguments supplied to functions in ``MeshFunctions``, ``RegionFunction``, ``ColorFunction``, and ``VectorColorFunction`` are ``x``, ``y``, ``vx``, ``vy``, ``r``.

* The default setting ``MeshFunctions -> {#5&}`` draws mesh lines for the scalar field ``r``.

* Possible settings for ``ScalingFunctions`` are:

{Subscript[``s``, ``x``], Subscript[``s``, ``y``]}	scale ``x`` and ``y`` axes

* Common built-in scaling functions ``s`` include:

|             |         |                                                     |
| ----------- | ------- | --------------------------------------------------- |
| "Log"       | [image] | log scale with automatic tick labeling              |
| "Log10"     | [image] | base-10 log scale with powers of 10 for ticks       |
| "SignedLog" | [image] | log-like scale that includes 0 and negative numbers |
| "Reverse"   | [image] | reverse the coordinate direction                    |
| "Infinite"  | [image] | infinite scale                                      |

### List of all options

|                            |                   |                                                                                    |
| -------------------------- | ----------------- | ---------------------------------------------------------------------------------- |
| AlignmentPoint             | Center            | the default point in the graphic to align with                                     |
| AspectRatio                | 1                 | ratio of height to width                                                           |
| Axes                       | False             | whether to draw axes                                                               |
| AxesLabel                  | None              | axes labels                                                                        |
| AxesOrigin                 | Automatic         | where axes should cross                                                            |
| AxesStyle                  | {}                | style specifications for the axes                                                  |
| Background                 | None              | background color for the plot                                                      |
| BaselinePosition           | Automatic         | how to align with a surrounding text baseline                                      |
| BaseStyle                  | {}                | base style specifications for the graphic                                          |
| BoundaryStyle              | None              | how to draw RegionFunction boundaries                                              |
| BoxRatios                  | Automatic         | effective 3D box ratios for simulated lighting                                     |
| ClippingStyle              | Automatic         | how to display arrows outside the vector range                                     |
| ColorFunction              | Automatic         | how to color background densities                                                  |
| ColorFunctionScaling       | True              | whether to scale arguments to ColorFunction                                        |
| ContentSelectable          | Automatic         | whether to allow contents to be selected                                           |
| CoordinatesToolOptions     | Automatic         | detailed behavior of the coordinates tool                                          |
| DataRange                  | Automatic         | the range of x and y values to assume for data                                     |
| Epilog                     | {}                | primitives rendered after the main plot                                            |
| EvaluationMonitor          | None              | expression to evaluate at every function evaluation                                |
| FormatType                 | TraditionalForm   | the default format type for text                                                   |
| Frame                      | True              | whether to draw a frame around the plot                                            |
| FrameLabel                 | None              | frame labels                                                                       |
| FrameStyle                 | {}                | style specifications for the frame                                                 |
| FrameTicks                 | Automatic         | frame tick marks                                                                   |
| FrameTicksStyle            | {}                | style specifications for frame ticks                                               |
| GridLines                  | None              | grid lines to draw                                                                 |
| GridLinesStyle             | {}                | style specifications for grid lines                                                |
| ImageMargins               | 0.                | the margins to leave around the graphic                                            |
| ImagePadding               | All               | what extra padding to allow for labels etc.                                        |
| ImageSize                  | Automatic         | the absolute size at which to render the graphic                                   |
| LabelStyle                 | {}                | style specifications for labels                                                    |
| LightingAngle              | None              | effective angle for simulated lighting                                             |
| MaxRecursion               | Automatic         | the maximum number of recursive subdivisions allowed for the scalar field          |
| Mesh                       | None              | how many mesh lines to draw in the background                                      |
| MeshFunctions              | {#5&}             | how to determine the placement of mesh lines                                       |
| MeshShading                | None              | how to shade regions between mesh lines                                            |
| MeshStyle                  | Automatic         | the style of mesh lines                                                            |
| Method                     | Automatic         | methods to use for the plot                                                        |
| PerformanceGoal            | \$PerformanceGoal | aspects of performance to try to optimize                                          |
| PlotLabel                  | None              | an overall label for the plot                                                      |
| PlotLegends                | None              | legends for color gradients                                                        |
| PlotRange                  | {Full, Full}      | range of x, y values to include                                                    |
| PlotRangeClipping          | False             | whether to clip at the plot range                                                  |
| PlotRangePadding           | Automatic         | how much to pad the range of values                                                |
| PlotRegion                 | Automatic         | the final display region to be filled                                              |
| PlotTheme                  | \$PlotTheme       | overall theme for the plot                                                         |
| PreserveImageOptions       | Automatic         | whether to preserve image options when displaying new versions of the same graphic |
| Prolog                     | {}                | primitives rendered before the main plot                                           |
| RegionFunction             | (True&)           | determine what region to include                                                   |
| RotateLabel                | True              | whether to rotate y labels on the frame                                            |
| ScalingFunctions           | None              | how to scale individual coordinates                                                |
| Ticks                      | Automatic         | axes ticks                                                                         |
| TicksStyle                 | {}                | style specifications for axes ticks                                                |
| VectorColorFunction        | Automatic         | how to color vectors                                                               |
| VectorColorFunctionScaling | True              | whether to scale the arguments to VectorColorFunction                              |
| VectorMarkers              | Automatic         | shape to use for vectors                                                           |
| VectorPoints               | Automatic         | the number or placement of vectors to plot                                         |
| VectorRange                | Automatic         | range of vector lengths to show                                                    |
| VectorScaling              | Automatic         | how to scale the sizes of arrows                                                   |
| VectorSizes                | Automatic         | sizes of displayed arrows                                                          |
| VectorStyle                | Automatic         | how to draw vectors                                                                |
| WorkingPrecision           | MachinePrecision  | precision to use in internal computations                                          |

---

## Examples (121)

### Basic Examples (2)

Plot the vector field with its norm as a background interpolated from a specified set of vectors:

```wl
In[1]:= ListVectorDensityPlot[Table[{y, -x}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}]]

Out[1]= [image]
```

---

Plot the vector field from data specifying coordinates and vectors:

```wl
In[1]:= data = Table[{{x, y}, {y, x - x ^ 3}}, {x, -1.5, 1.5, 0.2}, {y, -2, 2, 0.2}];

In[2]:= ListVectorDensityPlot[data]

Out[2]= [image]
```

### Scope (20)

#### Sampling (9)

Plot streamlines for a regular collection of vectors, and give a data range for the domain:

```wl
In[1]:= ListVectorDensityPlot[Table[{y, -x}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}], DataRange -> {{-3, 3}, {-3, 3}}]

Out[1]= [image]
```

---

Plot an irregular collection of vectors:

```wl
In[1]:= data = Table[{{x, y} = RandomReal[{-3, 3}, {2}], {y, -x}}, {200}];

In[2]:= ListVectorDensityPlot[data]

Out[2]= [image]
```

Show all of the specified field vectors:

```wl
In[3]:= ListVectorDensityPlot[data, VectorPoints -> All]

Out[3]= [image]
```

Explicitly set the number of vectors in each direction:

```wl
In[4]:= ListVectorDensityPlot[data, VectorPoints -> {4, 7}]

Out[4]= [image]
```

---

Use an explicit scalar field:

```wl
In[1]:= data = Table[{{x, y}, {{y, x - x ^ 3}, Abs[x]}}, {x, -1.5, 1.5, 0.2}, {y, -2, 2, 0.2}];

In[2]:= ListVectorDensityPlot[data]

Out[2]= [image]
```

---

Use an explicit scalar field on an irregular collection of vectors:

```wl
In[1]:= data = Table[{{x, y} = RandomReal[{-1.5, 1.5}, {2}], {{y, x - x ^ 3}, Abs[x]}}, {300}];

In[2]:= ListVectorDensityPlot[data, VectorPoints -> All]

Out[2]= [image]
```

---

Plot two vector fields with background based on the norm of the first:

```wl
In[1]:=
data1 = Table[{{x, y} = RandomReal[{-3, 3}, {2}], {y, -x}}, {200}];
data2 = Table[{{x, y} = RandomReal[{-3, 3}, {2}], {y ^ 2, x - y}}, {150}];

In[2]:= ListVectorDensityPlot[{data1, data2}, VectorPoints -> 10]

Out[2]= [image]
```

---

Specify a list of points for showing field vectors:

```wl
In[1]:= ListVectorDensityPlot[Table[{y, -x}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}], DataRange -> {{-3, 3}, {-3, 3}}, VectorPoints -> RandomReal[{-3, 3}, {300, 2}]]

Out[1]= [image]
```

---

Plot a vector field with specified vector densities:

```wl
In[1]:= data = Table[{y, -x}, {x, -2, 2, 0.2}, {y, -2, 2, 0.2}];

In[2]:= Table[ListVectorDensityPlot[data, PlotLabel -> p, VectorPoints -> p], {p, {5, Coarse, Automatic, Fine}}]

Out[2]= [image]
```

---

Plot the vectors that go through a set of seed points:

```wl
In[1]:=
points = {{-1, -1}, {-1, 1}, {1, -1}, {1, 1}};
data = Table[{-1 - x ^ 2 + y, 1 + x - y ^ 2}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];

In[2]:= ListVectorDensityPlot[data, DataRange -> {{-3, 3}, {-3, 3}}, VectorPoints -> points, VectorSizes -> 2, Epilog -> {Red, PointSize[Medium], Point[points]}]

Out[2]= [image]
```

---

Plot vectors over a specified region:

```wl
In[1]:= ListVectorDensityPlot[Table[{{x, y} = RandomReal[{-3, 3}, {2}], {y, -x}}, {200}], RegionFunction -> Function[{x, y, vx, vy, n}, x y < 1]]

Out[1]= [image]
```

#### Presentation (11)

Plot a vector field with arrows scaled according to their magnitudes:

```wl
In[1]:= ListVectorDensityPlot[Table[{y, -x}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}], VectorScaling -> Automatic]

Out[1]= [image]
```

---

Use a single color for the arrows:

```wl
In[1]:= ListVectorDensityPlot[Table[{y, -x}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}], VectorColorFunction -> None]

Out[1]= [image]
```

---

Plot a vector field with arrows of specified size:

```wl
In[1]:= data = Table[{x, -y}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];

In[2]:= Table[ListVectorDensityPlot[data, VectorColorFunction -> Hue, PlotLabel -> s, VectorSizes -> s], {s, {Small, Medium, Large, 0.5}}]

Out[2]= {[image], [image], [image], [image]}
```

---

Vary the arrowhead size:

```wl
In[1]:= data = Table[{Sin[x], Cos[y]}, {x, -Pi, Pi, 0.2}, {y, -Pi, Pi, 0.2}];

In[2]:= Table[ListVectorDensityPlot[data, PlotLabel -> s, VectorAspectRatio -> s], {s, {0.25, 0.5}}]

Out[2]= [image]
```

---

Plot a vector field with the background and vectors colored according to the field magnitude:

```wl
In[1]:= VectorDensityPlot[{y, -x}, {x, -3, 3}, {y, -3, 3}, ColorFunction -> "Pastel", VectorColorFunction -> Hue]

Out[1]= [image]
```

---

Set the style for multiple vector fields:

```wl
In[1]:=
data1 = Table[{-1 - x ^ 2 + y, 1 + x - y ^ 2}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];
data2 = Table[{-(1 + x - y ^ 2), -1 - x ^ 2 + y}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];

In[2]:= ListVectorDensityPlot[{data1, data2}, VectorPoints -> 8, VectorStyle -> {{Red, "Drop"}, {Blue, "Dart"}}, VectorColorFunction -> None]

Out[2]= [image]
```

---

Apply a vector style:

```wl
In[1]:= data = Table[{-1 - x ^ 2 + y, 1 + x - y ^ 2}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];

In[2]:= ListVectorDensityPlot[data, VectorPoints -> 8, VectorStyle -> Arrowheads[{{0.03, Automatic, Graphics[Circle[]]}}]]

Out[2]= [image]
```

---

Use a named appearance to draw the vectors:

```wl
In[1]:= data = Table[{y, -x}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];

In[2]:= ListVectorDensityPlot[data, VectorMarkers -> "Drop"]

Out[2]= [image]
```

Style the vectors as well:

```wl
In[3]:= ListVectorDensityPlot[data, VectorMarkers -> "Drop", VectorColorFunction -> None, VectorStyle -> Red]

Out[3]= [image]
```

---

Use a legend for the color gradients:

```wl
In[1]:= data = Table[{-1 - x ^ 2 + y, 1 + x - y ^ 2}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];

In[2]:= ListVectorDensityPlot[data, VectorStyle -> Red, VectorColorFunction -> None, PlotLegends -> Automatic]

Out[2]= [image]
```

---

Use a theme with detailed frame ticks and grid lines:

```wl
In[1]:= data = Table[{-1 - x ^ 2 + y, 1 + x - y ^ 2}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];

In[2]:= ListVectorDensityPlot[data, PlotTheme -> "Detailed"]

Out[2]= [image]
```

Use a theme with a high-contrast color scheme and edge-fading rectangles:

```wl
In[3]:= data = Table[{-1 - x ^ 2 + y, 1 + x - y ^ 2}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];

In[4]:= ListVectorDensityPlot[data, PlotTheme -> "Marketing"]

Out[4]= [image]
```

---

Reverse the direction of the ``y`` axis:

```wl
In[1]:= ListVectorDensityPlot[Flatten[Table[{{x, y}, {x, y - x}}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}], 1], ScalingFunctions -> {None, "Reverse"}]

Out[1]= [image]
```

### Options (87)

#### Background (1)

Use colored backgrounds:

```wl
In[1]:= ListVectorDensityPlot[Table[{-1 - x ^ 2 + y, 1 + x - y ^ 2}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}], Background -> LightGray]

Out[1]= [image]
```

#### BoundaryStyle (2)

By default, region boundaries have no style:

```wl
In[1]:= data = Table[{Sin[x], Cos[y]}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];

In[2]:= ListVectorDensityPlot[data]

Out[2]= [image]
```

---

Change the style of the boundary:

```wl
In[1]:= data = Table[{Sin[x], Cos[y]}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];

In[2]:= ListVectorDensityPlot[data, BoundaryStyle -> Directive[Thick, Black]]

Out[2]= [image]
```

#### ColorFunction (6)

Color the field magnitude using ``Hue`` :

```wl
In[1]:= ListVectorDensityPlot[Table[{y, -x}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}], MaxRecursion -> 2, ColorFunction -> Hue]

Out[1]= [image]
```

---

Color using ``Hue`` based on $\sin (x y)$ :

```wl
In[1]:= ListVectorDensityPlot[Table[{{y, -x}, Sin[x y]}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}], MaxRecursion -> 2, ColorFunction -> Hue]

Out[1]= [image]
```

---

Use any named color gradient from ``ColorData``:

```wl
In[1]:= ListVectorDensityPlot[Table[{-1 - x ^ 2 + y, 1 + x - y ^ 2}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}], ColorFunction -> "Pastel"]

Out[1]= [image]
```

---

Use ``ColorData`` for predefined color gradients:

```wl
In[1]:= data = Table[{-1 - x ^ 2 + y, 1 + x - y ^ 2}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];

In[2]:= ListVectorDensityPlot[data, ColorFunction -> Function[{x, y, vx, vy, n}, ColorData["SolarColors"][x y]]]

Out[2]= [image]
```

---

Specify a color function that blends two colors by the $x$ coordinate:

```wl
In[1]:= data = Table[{-1 - x ^ 2 + y, 1 + x - y ^ 2}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];

In[2]:= ListVectorDensityPlot[data, ColorFunction -> Function[{x, y, vx, vy, n}, Blend[{Green, Red}, x]]]

Out[2]= [image]
```

---

Use ``ColorFunctionScaling -> False`` to get unscaled values:

```wl
In[1]:= data = Table[{-1 - x ^ 2 + y, 1 + x - y ^ 2}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];

In[2]:= ListVectorDensityPlot[data, MaxRecursion -> 4, ColorFunctionScaling -> False, ColorFunction -> Function[{x, y, vx, vy, n}, ColorData[22][Round[n]]]]

Out[2]= [image]
```

#### ColorFunctionScaling (4)

By default, scaled values are used:

```wl
In[1]:= data = Table[{y Cos[x y], x Cos[x y]}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];

In[2]:= ListVectorDensityPlot[data, MaxRecursion -> 2, ColorFunction -> GrayLevel]

Out[2]= [image]
```

---

Use ``ColorFunctionScaling -> False`` to get unscaled values:

```wl
In[1]:= data = Table[{y Cos[x y], x Cos[x y]}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];

In[2]:= ListVectorDensityPlot[data, MaxRecursion -> 4, ColorFunctionScaling -> False, ColorFunction -> Function[{x, y, vx, vy, n}, ColorData[22][Round[n]]]]

Out[2]= [image]
```

---

Use unscaled coordinates in the $x$ direction and scaled coordinates in the $y$ direction:

```wl
In[1]:= data = Table[{y Cos[x y], x Cos[x y]}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];

In[2]:= ListVectorDensityPlot[data, ColorFunctionScaling -> {False, True}, ColorFunction -> Function[{x, y, vx, vy, n}, Hue[x, y, 1]]]

Out[2]= [image]
```

---

Explicitly specify the scaling for each color function argument:

```wl
In[1]:= data = Table[{y Cos[x y], x Cos[x y]}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];

In[2]:= ListVectorDensityPlot[data, MaxRecursion -> 3, ColorFunctionScaling -> {True, True, True, True, False}, ColorFunction -> Function[{x, y, vx, vy, n}, Hue[n, y, 1]]]

Out[2]= [image]
```

#### DataRange (1)

By default, the data range is taken to be the index range of the data array:

```wl
In[1]:=
data = Table[{y, -x}, {x, -3, 3, 0.2}, {y, -3, 3, 0.3}];
Dimensions[data]

Out[1]= {31, 21, 2}

In[2]:= ListVectorDensityPlot[data]

Out[2]= [image]
```

Specify the data range for the domain:

```wl
In[3]:= ListVectorDensityPlot[data, DataRange -> {{-3, 3}, {-3, 3}}]

Out[3]= [image]
```

#### EvaluationMonitor (1)

Count the number of times the vector field function is evaluated:

```wl
In[1]:= Block[{k = 0}, ListVectorDensityPlot[Table[{-1 - x ^ 2 + y, 1 + x - y ^ 2}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}], EvaluationMonitor :> k++];k]

Out[1]= 350
```

#### MaxRecursion (1)

Refine the plot where it changes quickly:

```wl
In[1]:= data = Table[{{y, -x}, Sin[x y]}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];

In[2]:= Table[ListVectorDensityPlot[data, PlotLabel -> r, ColorFunction -> Hue, MaxRecursion -> r], {r, 0, 2}]

Out[2]= {[image], [image], [image]}
```

#### Mesh (5)

By default, no mesh lines are displayed:

```wl
In[1]:= ListVectorDensityPlot[Table[{-1 - x ^ 2 + y, 1 + x - y ^ 2}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}], Mesh -> None]

Out[1]= [image]
```

---

Show the initial and final sampling meshes:

```wl
In[1]:= Table[ListVectorDensityPlot[Table[{-1 - x ^ 2 + y, 1 + x - y ^ 2}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}], PlotLabel -> m, Mesh -> m], {m, {Full, Automatic}}]

Out[1]= [image]
```

---

Use a specific number of mesh lines:

```wl
In[1]:= ListVectorDensityPlot[Table[{-1 - x ^ 2 + y, 1 + x - y ^ 2}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}], Mesh -> 5]

Out[1]= [image]
```

---

Specify mesh lines:

```wl
In[1]:= ListVectorDensityPlot[Table[{-1 - x ^ 2 + y, 1 + x - y ^ 2}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}], Mesh -> {{2, 4, 5}}]

Out[1]= [image]
```

---

Use different styles for different mesh lines:

```wl
In[1]:= data = Table[{-1 - x ^ 2 + y, 1 + x - y ^ 2}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];

In[2]:= ListVectorDensityPlot[data, Mesh -> {{{2, Thick}, {4, Yellow}, {5, {Thick, Red, Dashed}}}}]

Out[2]= [image]
```

#### MeshFunctions (3)

By default, mesh lines correspond to the magnitude of the field:

```wl
In[1]:= data = Table[{-1 - x ^ 2 + y, 1 + x - y ^ 2}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];

In[2]:= ListVectorDensityPlot[data, Mesh -> 5, MeshFunctions -> Function[{x, y, vx, vy, n}, n]]

Out[2]= [image]
```

---

Use the $x$ value as the mesh function:

```wl
In[1]:= data = Table[{-1 - x ^ 2 + y, 1 + x - y ^ 2}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];

In[2]:= ListVectorDensityPlot[data, Mesh -> 5, MeshFunctions -> Function[{x, y, vx, vy, n}, x]]

Out[2]= [image]
```

---

Use mesh lines corresponding to fixed distances from the origin:

```wl
In[1]:= data = Table[{-1 - x ^ 2 + y, 1 + x - y ^ 2}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];

In[2]:= ListVectorDensityPlot[data, DataRange -> {{-3, 3}, {-3, 3}}, Mesh -> 5, MeshFunctions -> Function[{x, y, vx, vy, n}, Sqrt[x ^ 2 + y ^ 2]]]

Out[2]= [image]
```

#### MeshShading (3)

Use ``None`` to remove regions:

```wl
In[1]:= data = Table[{-1 - x ^ 2 + y, 1 + x - y ^ 2}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];

In[2]:= ListVectorDensityPlot[data, Mesh -> 10, MeshShading -> {Red, None}]

Out[2]= [image]
```

---

Styles are used cyclically:

```wl
In[1]:= data = Table[{-1 - x ^ 2 + y, 1 + x - y ^ 2}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];

In[2]:= ListVectorDensityPlot[data, Mesh -> 10, MeshShading -> {Red, Yellow, Green, None}]

Out[2]= [image]
```

---

Use indexed colors from ``ColorData`` cyclically:

```wl
In[1]:= data = Table[{-1 - x ^ 2 + y, 1 + x - y ^ 2}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];

In[2]:= ListVectorDensityPlot[data, Mesh -> 10, MeshShading -> ColorData[51, "ColorList"]]

Out[2]= [image]
```

#### MeshStyle (1)

Apply a variety of styles to the mesh lines:

```wl
In[1]:= data = Table[{-1 - x ^ 2 + y, 1 + x - y ^ 2}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];

In[2]:= Table[ListVectorDensityPlot[data, Mesh -> 10, MeshStyle -> s], {s, {Red, Thick, Directive[Red, Dashed]}}]

Out[2]= [image]
```

#### PerformanceGoal (2)

Generate a higher-quality plot:

```wl
In[1]:= ListVectorDensityPlot[Table[{-1 - x ^ 2 + y, 1 + x - y ^ 2}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}], PerformanceGoal -> "Quality"]

Out[1]= [image]
```

---

Emphasize performance, possibly at the cost of quality:

```wl
In[1]:= ListVectorDensityPlot[Table[{-1 - x ^ 2 + y, 1 + x - y ^ 2}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}], PerformanceGoal -> "Speed"]

Out[1]= [image]
```

#### PlotLegends (2)

Use legends for vector color gradients:

```wl
In[1]:= ListVectorDensityPlot[Table[{-1 - x ^ 2 + y, 1 + x - y ^ 2}, {x, -2, 2, .2}, {y, -2, 2, .2}], PlotLegends -> Automatic]

Out[1]= [image]
```

---

Use ``Placed`` to put legends above the plot:

```wl
In[1]:= ListVectorDensityPlot[Table[{-1 - x ^ 2 + y, 1 + x - y ^ 2}, {x, -2, 2, .2}, {y, -2, 2, .2}], PlotLegends -> Placed[Automatic, Above]]

Out[1]= [image]
```

#### PlotRange (7)

The full plot range is used by default:

```wl
In[1]:= ListVectorDensityPlot[Table[{-1 - x ^ 2 + y, 1 + x - y ^ 2}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}], PlotRange -> Full]

Out[1]= [image]
```

---

Specify an explicit limit for both $x$ and $y$ ranges:

```wl
In[1]:= ListVectorDensityPlot[Table[{-1 - x ^ 2 + y, 1 + x - y ^ 2}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}], DataRange -> {{-3, 3}, {-3, 3}}, PlotRange -> 2]

Out[1]= [image]
```

---

Specify an explicit $x$ range:

```wl
In[1]:= ListVectorDensityPlot[Table[{-1 - x ^ 2 + y, 1 + x - y ^ 2}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}], DataRange -> {{-3, 3}, {-3, 3}}, PlotRange -> {{-1, 2}, Automatic}]

Out[1]= [image]
```

---

Specify an explicit $x$ minimum range:

```wl
In[1]:= ListVectorDensityPlot[Table[{-1 - x ^ 2 + y, 1 + x - y ^ 2}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}], DataRange -> {{-3, 3}, {-3, 3}}, PlotRange -> {{0, Full}, Automatic}]

Out[1]= [image]
```

---

Specify an explicit $y$ range:

```wl
In[1]:= ListVectorDensityPlot[Table[{-1 - x ^ 2 + y, 1 + x - y ^ 2}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}], DataRange -> {{-3, 3}, {-3, 3}}, PlotRange -> {Full, {0, 2}}]

Out[1]= [image]
```

---

Specify an explicit $y$ maximum range:

```wl
In[1]:= ListVectorDensityPlot[Table[{-1 - x ^ 2 + y, 1 + x - y ^ 2}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}], DataRange -> {{-3, 3}, {-3, 3}}, PlotRange -> {Full, {Full, 5}}]

Out[1]= [image]
```

---

Specify different $x$ and $y$ ranges:

```wl
In[1]:= ListVectorDensityPlot[Table[{-1 - x ^ 2 + y, 1 + x - y ^ 2}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}], DataRange -> {{-3, 3}, {-3, 3}}, PlotRange -> {{-2, 1.5}, {-1, 2}}]

Out[1]= [image]
```

#### PlotTheme (2)

Use a theme with simple ticks and grid lines in a high-contrast color scheme:

```wl
In[1]:= ListVectorDensityPlot[Table[{-1 - x ^ 2 + y, 1 + x - y ^ 2}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}], DataRange -> {{-3, 3}, {-3, 3}}, PlotTheme -> "Business"]

Out[1]= [image]
```

---

Change the color scheme:

```wl
In[1]:= ListVectorDensityPlot[Table[{-1 - x ^ 2 + y, 1 + x - y ^ 2}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}], DataRange -> {{-3, 3}, {-3, 3}}, PlotTheme -> "Marketing"]

Out[1]= [image]
```

#### RegionBoundaryStyle (4)

The boundaries of full rectangular regions are not shown:

```wl
In[1]:= data = Table[{Cos[x], y}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];

In[2]:= ListVectorDensityPlot[data, DataRange -> {{-3, 3}, {-3, 3}}]

Out[2]= [image]
```

---

Show the region being plotted:

```wl
In[1]:= data = Table[{Cos[x], y}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];

In[2]:= ListVectorDensityPlot[data, DataRange -> {{-3, 3}, {-3, 3}}, RegionFunction -> Function[{x, y, vx, vy, n}, x^2 + y^2 ≤ 9]]

Out[2]= [image]
```

---

Specify a style for the boundary:

```wl
In[1]:= data = Table[{Cos[x], y}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];

In[2]:= ListVectorDensityPlot[data, DataRange -> {{-3, 3}, {-3, 3}}, RegionFunction -> Function[{x, y, vx, vy, n}, x^2 + y^2 ≤ 9], RegionBoundaryStyle -> Directive[Thick, Black]]

Out[2]= [image]
```

---

Specify a style for full rectangular regions:

```wl
In[1]:= data = Table[{Cos[x], y}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];

In[2]:= ListVectorDensityPlot[data, DataRange -> {{-3, 3}, {-3, 3}}, RegionBoundaryStyle -> Directive[Thick, Black]]

Out[2]= [image]
```

#### RegionFunction (3)

Plot vectors only over certain quadrants:

```wl
In[1]:= data = Table[{-1 - x ^ 2 + y, 1 + x - y ^ 2}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];

In[2]:= ListVectorDensityPlot[data, DataRange -> {{-3, 3}, {-3, 3}}, RegionFunction -> Function[{x, y, vx, vy, n}, x y < 1]]

Out[2]= [image]
```

---

Plot vectors only over regions where the field magnitude is above a given threshold:

```wl
In[1]:= data = Table[{-1 - x ^ 2 + y, 1 + x - y ^ 2}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];

In[2]:= ListVectorDensityPlot[data, DataRange -> {{-3, 3}, {-3, 3}}, RegionFunction -> Function[{x, y, vx, vy, n}, n > 6], MaxRecursion -> 1]

Out[2]= [image]
```

---

Use any logical combination of conditions:

```wl
In[1]:= data = Table[{-1 - x ^ 2 + y, 1 + x - y ^ 2}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];

In[2]:= ListVectorDensityPlot[data, DataRange -> {{-3, 3}, {-3, 3}}, RegionFunction -> Function[{x, y, vx, vy, n}, 4 < n < 9 || n < 2], MaxRecursion -> 2]

Out[2]= [image]
```

#### ScalingFunctions (3)

By default, linear scales are used:

```wl
In[1]:= ListVectorDensityPlot[Table[{y, x - y}, {x, -1, 1, 0.1}, {y, -1, 1, 0.1}]]

Out[1]= [image]
```

---

Use a log scale in the ``y`` direction:

```wl
In[1]:= ListVectorDensityPlot[Table[{y, x - y}, {x, -1, 1, 0.1}, {y, -1, 1, 0.1}], ScalingFunctions -> {None, "Log"}]

Out[1]= [image]
```

---

Reverse the direction of the ``y`` direction:

```wl
In[1]:= ListVectorDensityPlot[Table[{y, x - y}, {x, -1, 1, 0.1}, {y, -1, 1, 0.1}], ScalingFunctions -> {None, "Reverse"}]

Out[1]= [image]
```

#### VectorAspectRatio (1)

Specify arrowhead size relative to the length of the arrow with ``VectorAspectRatio`` :

```wl
In[1]:= ListVectorDensityPlot[Table[{Sin[x], Cos[y]}, {x, -Pi, Pi, 0.2}, {y, -Pi, Pi, 0.2}], VectorAspectRatio -> 1 / 2]

Out[1]= [image]
```

#### VectorColorFunction (4)

Color the vectors according to their norms:

```wl
In[1]:= data = Table[{y, -x}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];

In[2]:= ListVectorDensityPlot[data, VectorColorFunction -> Hue]

Out[2]= [image]
```

---

Use any named color gradient from ``ColorData``:

```wl
In[1]:= data = Table[{y, -x}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];

In[2]:= ListVectorDensityPlot[data, VectorColorFunction -> "Rainbow"]

Out[2]= [image]
```

---

Color the vectors according to their $x$ values:

```wl
In[1]:= data = Table[{y, -x}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];

In[2]:= ListVectorDensityPlot[data, VectorColorFunction -> Function[{x, y, vx, vy, n}, ColorData["ThermometerColors"][x]]]

Out[2]= [image]
```

---

Use ``VectorColorFunctionScaling -> False`` to get unscaled values:

```wl
In[1]:= data = Table[{y, -x}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];

In[2]:= ListVectorDensityPlot[data, VectorColorFunction -> Function[{x, y, vx, vy, n}, ColorData[31][Round[n]]], VectorColorFunctionScaling -> False]

Out[2]= [image]
```

#### VectorColorFunctionScaling (4)

By default, scaled values are used:

```wl
In[1]:= ListVectorDensityPlot[Table[{y, -x}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}], VectorColorFunction -> Hue]

Out[1]= [image]
```

---

Use ``VectorColorFunctionScaling -> False`` to get unscaled values:

```wl
In[1]:= data = Table[{y, -x}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];

In[2]:= ListVectorDensityPlot[data, VectorColorFunction -> Function[{x, y, vx, vy, n}, ColorData[31][Round[n]]], VectorColorFunctionScaling -> False]

Out[2]= [image]
```

---

Use unscaled coordinates in the $x$ direction and scaled coordinates in the $y$ direction:

```wl
In[1]:= data = Table[{y, -x}, {x, 0, 1, 0.1}, {y, 0, 1, 0.1}];

In[2]:= ListVectorDensityPlot[data, DataRange -> {{0, 2}, {0, 2}}, VectorColorFunction -> Function[{x, y, vx, vy, n}, Hue[x, y, 1]], VectorColorFunctionScaling -> {False, True}]

Out[2]= [image]
```

---

Explicitly specify the scaling for each color function argument:

```wl
In[1]:= data = Table[{y, -x}, {x, 0, 1, 0.1}, {y, 0, 1, 0.1}];

In[2]:= ListVectorDensityPlot[data, DataRange -> {{0, 2}, {0, 2}}, VectorColorFunction -> Function[{x, y, vx, vy, n}, Hue[n, y, 1]], VectorColorFunctionScaling -> {True, True, True, True, False}]

Out[2]= [image]
```

#### VectorMarkers (10)

Vectors are drawn as arrows by default:

```wl
In[1]:= data = Table[{y, -x}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];

In[2]:= ListVectorDensityPlot[data]

Out[2]= [image]
```

---

Use a named appearance to draw the vectors:

```wl
In[1]:= data = Table[{y, -x}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];

In[2]:= ListVectorDensityPlot[data, VectorMarkers -> "Drop"]

Out[2]= [image]
```

---

Use different markers for different vector fields:

```wl
In[1]:=
data1 = Table[{{x, y}, {y, -x}}, {x, -5, 5}, {y, -5, 5}];
data2 = Table[{{x, y}, {x, y}}, {x, -5, 5}, {y, -5, 5}];

In[2]:= ListVectorDensityPlot[{data1, data2}, VectorMarkers -> {"Drop", "Dart"}]

Out[2]= [image]
```

---

By default, markers are centered on vector points:

```wl
In[1]:= data = Table[{{x, y}, {y, -x}}, {x, -5, 5}, {y, -5, 5}];

In[2]:= pts = Tuples[Range[-5, 5], 2];

In[3]:= ListVectorDensityPlot[data, VectorMarkers -> "Arrow", VectorPoints -> pts, Epilog -> {Red, Point[pts]}]

Out[3]= [image]
```

Start the vectors at the points:

```wl
In[4]:= ListVectorDensityPlot[data, VectorMarkers -> Placed["Arrow", "Start"], VectorPoints -> pts, Epilog -> {Red, Point[pts]}]

Out[4]= [image]
```

End the vectors at the points:

```wl
In[5]:= ListVectorDensityPlot[data, VectorMarkers -> Placed["Arrow", "End"], VectorPoints -> pts, Epilog -> {Red, Point[pts]}]

Out[5]= [image]
```

---

Plot the vector field without arrowheads:

```wl
In[1]:= ListVectorDensityPlot[Table[{-1 - x ^ 2 + y, 1 + x - y ^ 2}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}], VectorStyle -> "Segment"]

Out[1]= [image]
```

---

Arrow vector styles:

```wl
In[1]:= data = Table[{-1 - x ^ 2 + y, 1 + x - y ^ 2}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];

In[2]:= Table[ListVectorDensityPlot[data, VectorPoints -> 8, PlotLabel -> s, VectorStyle -> s], {s, {"Arrow", "DotArrow", "ArrowArrow"}}]

Out[2]= {[image], [image], [image]}
```

---

Circular vector styles:

```wl
In[1]:= data = Table[{-1 - x ^ 2 + y, 1 + x - y ^ 2}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];

In[2]:= Table[ListVectorDensityPlot[data, VectorPoints -> 10, PlotLabel -> s, VectorStyle -> s], {s, {"Circle", "Disk", "CircleArrow"}}]

Out[2]= {[image], [image], [image]}
```

---

Dart vector styles:

```wl
In[1]:= data = Table[{-1 - x ^ 2 + y, 1 + x - y ^ 2}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];

In[2]:= Table[ListVectorDensityPlot[data, VectorPoints -> 8, PlotLabel -> s, VectorStyle -> s], {s, {"Dart", "PinDart", "DoubleDart"}}]

Out[2]= [image]
```

---

Vector styles with dots:

```wl
In[1]:= data = Table[{-1 - x ^ 2 + y, 1 + x - y ^ 2}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];

In[2]:= Table[ListVectorDensityPlot[data, VectorPoints -> 8, PlotLabel -> s, VectorStyle -> s], {s, {"BarDot", "Dot", "DotArrow", "DotDot"}}]

Out[2]= [image]
```

---

Pointer vector styles:

```wl
In[1]:= data = Table[{-1 - x ^ 2 + y, 1 + x - y ^ 2}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];

In[2]:= Table[ListVectorDensityPlot[data, VectorPoints -> 8, PlotLabel -> s, VectorStyle -> s], {s, {"Drop", "Pointer", "BackwardPointer", "Toothpick"}}]

Out[2]= [image]
```

#### VectorPoints (8)

Use automatically determined vector points:

```wl
In[1]:= ListVectorDensityPlot[Table[{y, -x}, {x, -1, 1, 0.2}, {y, -1, 1, 0.2}], VectorPoints -> Automatic]

Out[1]= [image]
```

---

Show all of the specified field vectors:

```wl
In[1]:= ListVectorDensityPlot[Table[{y, -x}, {x, -1, 1, 0.2}, {y, -1, 1, 0.2}], VectorPoints -> All]

Out[1]= [image]
```

---

Use symbolic names to specify the set of field vectors:

```wl
In[1]:= data = Table[{y, -x}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];

In[2]:= Table[ListVectorDensityPlot[data, PlotLabel -> k, VectorPoints -> k], {k, {Fine, Coarse}}]

Out[2]= [image]
```

---

Create a hexagonal grid of field vectors with the same number of arrows for $x$ and $y$ :

```wl
In[1]:= ListVectorDensityPlot[Table[{y, -x}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}], VectorPoints -> 5]

Out[1]= [image]
```

---

Create a hexagonal grid of field vectors with a different number of arrows for $x$ and $y$ :

```wl
In[1]:= ListVectorDensityPlot[Table[{y, -x}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}], VectorPoints -> {4, 7}]

Out[1]= [image]
```

---

Specify a list of points for showing field vectors:

```wl
In[1]:= data = Table[{-1 - x ^ 2 + y, 1 + x - y ^ 2}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];

In[2]:= ListVectorDensityPlot[data, DataRange -> {{-3, 3}, {-3, 3}}, VectorPoints -> RandomReal[{-3, 3}, {300, 2}]]

Out[2]= [image]
```

---

Use a different number of field vectors on a hexagonal grid:

```wl
In[1]:= data = Table[{y ^ 2, x ^ 2 - y ^ 2}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];

In[2]:= Table[ListVectorDensityPlot[data, PlotLabel -> n, VectorPoints -> n, MaxRecursion -> 3], {n, 5, 20, 5}]

Out[2]= [image]
```

---

The location for vectors is given in the middle of the drawn vector:

```wl
In[1]:=
data = Table[{-1 - x ^ 2 + y, 1 + x - y ^ 2}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];
points = {{-1, -1}, {-1, 1}, {1, -1}, {1, 1}};

In[2]:= ListVectorDensityPlot[data, DataRange -> {{-2, 2}, {-2, 2}}, VectorPoints -> points, VectorSizes -> 2, Epilog -> {Red, PointSize[Medium], Point[points]}]

Out[2]= [image]
```

#### VectorScaling (2)

Vectors by default are not scaled and have uniform length:

```wl
In[1]:= ListVectorDensityPlot[Table[{y, -x}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}], DataRange -> {{-3, 3}, {-3, 3}}]

Out[1]= [image]
```

---

Use an automatically determined vector scale:

```wl
In[1]:= ListVectorDensityPlot[Table[{y, -x}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}], DataRange -> {{-3, 3}, {-3, 3}}, VectorScaling -> Automatic]

Out[1]= [image]
```

#### VectorSizes (2)

Specify the size of vectors:

```wl
In[1]:= data = Table[{Sin[x], Cos[y]}, {x, -Pi, Pi, 0.2}, {y, -Pi, Pi, 0.2}];

In[2]:= Table[ListVectorDensityPlot[data, VectorPoints -> 10, PlotLabel -> s, VectorSizes -> s], {s, {0.5, 1}}]

Out[2]= {[image], [image]}
```

---

Use symbolic names to control the size of vectors:

```wl
In[1]:= data = Table[{y, -x}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];

In[2]:= Table[ListVectorDensityPlot[data, VectorSizes -> s, PlotLabel -> s], {s, {Tiny, Small, Medium, Large}}]

Out[2]= [image]
```

#### VectorStyle (5)

Set the style for the displayed vectors:

```wl
In[1]:= ListVectorDensityPlot[Table[{-1 - x ^ 2 + y, 1 + x - y ^ 2}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}], VectorColorFunction -> None, VectorStyle -> Blue]

Out[1]= [image]
```

---

Set the style for multiple vector fields:

```wl
In[1]:=
data1 = Table[{-1 - x ^ 2 + y, 1 + x - y ^ 2}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];
data2 = Table[{-(1 + x - y ^ 2), -1 - x ^ 2 + y}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];

In[2]:= ListVectorDensityPlot[{data1, data2}, VectorColorFunction -> None, VectorStyle -> {Red, Blue}]

Out[2]= [image]
```

---

Use ``Arrowheads`` to specify an explicit style of the arrowheads:

```wl
In[1]:= data = Table[{x, y}, {x, -1, 1, 0.2}, {y, -1, 1, 0.2}];

In[2]:= ListVectorDensityPlot[data, VectorStyle -> Arrowheads[{{0.02, Automatic, Graphics[Circle[]]}}]]

Out[2]= [image]
```

---

Specify both arrow tail and head:

```wl
In[1]:= data = Table[{x, y}, {x, -1, 1, 0.2}, {y, -1, 1, 0.2}];

In[2]:= ListVectorDensityPlot[data, VectorPoints -> 9, VectorStyle -> Arrowheads[{{0.03, Automatic, Graphics[Rectangle[{-0.5, -0.5}, {0.5, 0.5}]]}, {0.03, Automatic, Graphics[Circle[]]}}]]

Out[2]= [image]
```

---

Graphics primitives without ``Arrowheads`` are scaled based on the vector scale:

```wl
In[1]:= data = Table[{x, y}, {x, -1, 1, 0.2}, {y, -1, 1, 0.2}];

In[2]:= ListVectorDensityPlot[data, VectorStyle -> Graphics[Circle[]]]

Out[2]= [image]
```

### Applications (2)

Visualize a sampled vector field with the background based on the field's divergence:

```wl
In[1]:=
f = {Sin[x] ^ 3, -Cos[y] ^ 2};
df = Div[f, {x, y}];
data = Table[{f, df}, {x, -3, 3}, {y, -3, 3}];

In[2]:= ListVectorDensityPlot[data]

Out[2]= [image]
```

---

Visualize the first horizontal and vertical Gaussian derivatives of an image:

```wl
In[1]:= {dx, dy} = Table[ImageAdjust@GaussianFilter[[image], {6, 2}, δ], {δ, {{1, 0}, {0, 1}}}]

Out[1]= [image]
```

Combine the vertical and horizontal Gaussian derivatives:

```wl
In[2]:= data = Reverse /@ Transpose[2ImageData /@ {dx, dy} - 1, {3, 2, 1}];

In[3]:= ListVectorDensityPlot[data, VectorPoints -> 30, ColorFunction -> "Rainbow", VectorScaling -> Automatic, VectorAspectRatio -> 1 / 2]

Out[3]= [image]
```

### Properties & Relations (10)

Use ``VectorDensityPlot`` to plot functions with a density plot of the scalar field:

```wl
In[1]:= VectorDensityPlot[{-1 - x ^ 2 + y, 1 + x - y ^ 2}, {x, -3, 3}, {y, -3, 3}]

Out[1]= [image]
```

Use ``StreamDensityPlot`` to plot streamlines instead of vectors:

```wl
In[2]:= StreamDensityPlot[{-1 - x ^ 2 + y, 1 + x - y ^ 2}, {x, -3, 3}, {y, -3, 3}]

Out[2]= [image]
```

---

Use ``ListVectorPlot`` for plotting data without a density plot:

```wl
In[1]:= data = Table[{{x, y} = RandomReal[{-1.5, 1.5}, {2}], {{-1 - x ^ 2 + y, 1 + x - y ^ 2}, Abs[x + y]}}, {300}];

In[2]:= ListVectorPlot[data]

Out[2]= [image]
```

Use ``ListStreamPlot`` to plot streamlines instead of vectors:

```wl
In[3]:= ListStreamPlot[data]

Out[3]= [image]
```

---

Use ``ListStreamDensityPlot`` to plot with streamlines instead of vectors :

```wl
In[1]:= ListStreamDensityPlot[Table[{-1 - x ^ 2 + y, 1 + x - y ^ 2}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}]]

Out[1]= [image]
```

---

Use ``VectorPlot`` to plot functions without a density plot:

```wl
In[1]:= VectorPlot[{-1 - x ^ 2 + y, 1 + x - y ^ 2}, {x, -3, 3}, {y, -3, 3}]

Out[1]= [image]
```

---

Use ``ListVectorDisplacementPlot`` to visualize the deformation of a region associated with a displacement vector field:

```wl
In[1]:= data2D = Table[{{x, y} = RandomReal[{-1, 1}, {2}], {y, x - x^3}}, {300}];

In[2]:= data3D = Table[{{x, y, z} = RandomReal[{0, 1}, {3}], {y, x, -z}}, {300}];

In[3]:= ListVectorDisplacementPlot[data2D, Disk[], VectorPoints -> Automatic]

Out[3]= [image]
```

Use ``ListVectorDisplacementPlot3D`` to visualize a deformation in 3D:

```wl
In[4]:= ListVectorDisplacementPlot3D[data3D, Cuboid[], VectorPoints -> "Boundary"]

Out[4]= [image]
```

---

Scalar fields can be plotted by themselves with ``ListDensityPlot`` :

```wl
In[1]:=
f = {-1 - x ^ 2 + y, 1 + x - y ^ 2};
s = Exp[Norm[f] / 10];

In[2]:=
data = Table[{f, s}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];
scalarData = Table[s, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];

In[3]:=
{ListDensityPlot[scalarData, ColorFunction -> "Pastel"], 
ListVectorDensityPlot[data, ColorFunction -> "Pastel"]}

Out[3]= {[image], [image]}
```

---

Use ``ListLineIntegralConvolutionPlot`` to plot the line integral convolution of vector field data:

```wl
In[1]:= data = Table[{-1 - x ^ 2 + y, 1 + x - y ^ 2}, {x, -3, 3, .2}, {y, -3, 3, .2}];

In[2]:= ListLineIntegralConvolutionPlot[data]

Out[2]= [image]
```

---

Use ``ListVectorPlot3D`` and ``ListStreamPlot3D`` to visualize 3D vector field data:

```wl
In[1]:= data = Table[{z, -x, y}, {x, -1, 1, .1}, {y, -1, 1, .1}, {z, -1, 1, .1}];

In[2]:= {ListVectorPlot3D[data], ListStreamPlot3D[data]}

Out[2]= {[image], [image]}
```

---

Plot vectors on surfaces with ``ListSliceVectorPlot3D`` :

```wl
In[1]:= ListSliceVectorPlot3D[Table[{y, -x, z}, {z, -1, 1, .1}, {y, -1, 1, .1}, {x, -1, 1, .1}], Sphere[], DataRange -> {{-1, 1}, {-1, 1}, {-1, 1}}]

Out[1]= [image]
```

---

Use ``GeoVectorPlot`` to plot vectors on a map:

```wl
In[1]:=
GeoVectorPlot[GeoVector[GeoPosition[CompressedData["«6488»"]] -> 
  {{0.5706379232485146, Quantity[354.01686143622794, "AngularDegrees"]}, 
   {0.48751317221734114, Quantity[327.18610724051325, "AngularDegrees"]}, 
   {0.42407845478418604, Quantity[199.859344783 ... 904, "AngularDegrees"]}, 
   {0.9366099079317551, Quantity[357.70482317743733, "AngularDegrees"]}, 
   {0.8256817194791912, Quantity[242.07227508889662, "AngularDegrees"]}, 
   {0.2661401145642981, Quantity[152.90003252279325, "AngularDegrees"]}}]]

Out[1]= [image]
```

Use ``GeoStreamPlot`` to plot streamlines instead of vectors:

```wl
In[2]:=
GeoStreamPlot[GeoVector[GeoPosition[CompressedData["«6488»"]] -> 
  {{0.5706379232485146, Quantity[354.01686143622794, "AngularDegrees"]}, 
   {0.48751317221734114, Quantity[327.18610724051325, "AngularDegrees"]}, 
   {0.42407845478418604, Quantity[199.859344783 ... 904, "AngularDegrees"]}, 
   {0.9366099079317551, Quantity[357.70482317743733, "AngularDegrees"]}, 
   {0.8256817194791912, Quantity[242.07227508889662, "AngularDegrees"]}, 
   {0.2661401145642981, Quantity[152.90003252279325, "AngularDegrees"]}}]]

Out[2]= [image]
```

## See Also

* [`ListVectorPlot`](https://reference.wolfram.com/language/ref/ListVectorPlot.en.md)
* [`ListVectorPlot3D`](https://reference.wolfram.com/language/ref/ListVectorPlot3D.en.md)
* [`ListStreamPlot3D`](https://reference.wolfram.com/language/ref/ListStreamPlot3D.en.md)
* [`ListStreamDensityPlot`](https://reference.wolfram.com/language/ref/ListStreamDensityPlot.en.md)
* [`ListLineIntegralConvolutionPlot`](https://reference.wolfram.com/language/ref/ListLineIntegralConvolutionPlot.en.md)
* [`VectorDensityPlot`](https://reference.wolfram.com/language/ref/VectorDensityPlot.en.md)
* [`ListDensityPlot`](https://reference.wolfram.com/language/ref/ListDensityPlot.en.md)
* [`ListContourPlot`](https://reference.wolfram.com/language/ref/ListContourPlot.en.md)

## Related Guides

* [Vector Visualization](https://reference.wolfram.com/language/guide/VectorVisualization.en.md)

## History

* [Introduced in 2008 (7.0)](https://reference.wolfram.com/language/guide/SummaryOfNewFeaturesIn70.en.md) \| [Updated in 2012 (9.0)](https://reference.wolfram.com/language/guide/SummaryOfNewFeaturesIn90.en.md) ▪ [2014 (10.0)](https://reference.wolfram.com/language/guide/SummaryOfNewFeaturesIn100.en.md) ▪ [2018 (11.3)](https://reference.wolfram.com/language/guide/SummaryOfNewFeaturesIn113.en.md) ▪ [2020 (12.1)](https://reference.wolfram.com/language/guide/SummaryOfNewFeaturesIn121.en.md) ▪ [2022 (13.1)](https://reference.wolfram.com/language/guide/SummaryOfNewFeaturesIn131.en.md)