VectorStyle

VectorStyle

is an option to VectorPlot, ListVectorPlot, and related functions that determines the style to use for drawing field vectors.

Details

  • The setting for VectorStyle can include any color, thickness, dashing, arrowhead, or other graphics directive.
  • VectorStyle->g specifies that a graphics directive g should be used to draw vectors in a plot.
  • VectorStyle->{g1,g2,} specifies that successive directives gi should be used cyclically for successive vector fields.
  • The directives that can be given include:
  • Arrowheads[spec]arrowheads
    Dashing[{w1,}]dashing specification
    Directive[g1,g2,]composite graphics directive
    Glow[c]glow color
    GrayLevel[i]intensity
    Hue[h]hue
    Opacity[a]opacity
    Red, Blue, etc.named colors
    RGBColor[r,g,b]RGB color
    Specularity[s]surface specularity
    Opacity[a]opacity
    Thickness[w]line thickness
  • If an explicit setting is given for VectorColorFunction, it is used in preference to the setting for VectorStyle.

Examples

open allclose all

Basic Examples  (4)

Vector fields are colored to indicate magnitude:

Modify the style of the vectors:

Set VectorColorFunctionNone to modify the color of the vectors:

Set the style for multiple vector fields:

Scope  (5)

Combine vector styles with vector markers:

Control the size of the arrowheads:

Use an arbitrary graphic as the arrowheads for vectors:

Plot a vector field using 3D arrows:

Use Graphics3D as a style for the 3D arrows:

Use Arrowheads to specify the style of the arrowheads:

3D graphics primitives without the option Arrowheads are scaled based on the vector scale:

Change the scaling using the VectorScale option:

Introduced in 2008
 (7.0)
 |
Updated in 2018
 (11.3)