({{, (RefLink[StreamScale, paclet:ref/StreamScale]) 
is an option to (RefLink[StreamPlot, paclet:ref/StreamPlot]), (RefLink[ListStreamPlot, paclet:ref/ListStreamPlot]), and related functions that determines the length and arrowhead size of streamlines that are drawn. }})

OpenersNotesSection(Spacer1)Details

(RefLink[StreamPlot, paclet:ref/StreamPlot]) and related functions effectively find streamlines by following the flow of the vector field. (RefLink[StreamScale, paclet:ref/StreamScale]) determines how the streamlines found should be segmented for display.

Each streamline segment is rendered as an (RefLink[Arrow, paclet:ref/Arrow]), with its own arrowhead.

The following settings can be given for (RefLink[StreamScale, paclet:ref/StreamScale]):

The setting (RefLink[StreamScale, paclet:ref/StreamScale])->{seg,npts,aratio,sfun} allows explicit specification of how streamlines should be broken into segments, and how each segment should be scaled.

The parameter seg is analogous to a (RefLink[Dashing, paclet:ref/Dashing]) specification for segments of a streamline. The following forms can be used:

The following settings can be used for npts to control the number of points rendered on each streamline segment:

Every streamline segment effectively lies in a curved strip, with the arrowhead for the segment spanning one end of the strip.

The following settings can be used for aratio to control the aspect ratio of the streamline strip:

After the length of segments is determined by seg, they can be rescaled by applying the function sfun. The following settings can be used:

OpenersPrimaryExamplesSection(Spacer1)Examples  (8)

OpenersExampleSection0(Spacer1)Basic Examples  (3)

Specify the length of streamline segments to use:

Table[StreamPlot[{Sin[x],Cos[y]},{x,-Pi,Pi},{y,-Pi,Pi},StreamScale->s],{s,{Tiny,Large}}]

Specify the number of points used per segment:

Table[StreamPlot[{y,-Sin[x]},{x,0,2π},{y,-2,2},StreamScale->{Large,n, Automatic}],{n,{3,6}}]

Specify the size of the arrows used:

Table[StreamPlot[{Sin[x],Cos[y]},{x,-Pi,Pi},{y,-Pi,Pi},StreamPoints->10,StreamScale->{Automatic,Automatic,a}],{a,{.02,.04}}]

Table[StreamPlot[{Sin[x],Cos[y]},{x,-Pi,Pi},{y,-Pi,Pi},StreamPoints->10,StreamScale->{Full,Automatic,a}],{a,{.02,.04}}]

OpenersExampleSection1(Spacer1)Scope  (3)

Use curves for the streamlines:

StreamPlot[{Sin[x],Cos[y]},{x,-Pi,Pi},{y,-Pi,Pi},StreamScale->None]

Use a single segment for each streamline:

StreamPlot[{Sin[x],Cos[y]},{x,-Pi,Pi},{y,-Pi,Pi},StreamScale->Full]

Use larger arrowheads:

StreamPlot[{Sin[x],Cos[y]},{x,-Pi,Pi},{y,-Pi,Pi},StreamScale->{Full, All, .05}]

When the number of points per segment is set to 2, scaled arrows are used:

StreamPlot[{y,x-x^2},{x,-1,2},{y,-1.5,1.5},StreamScale->{Automatic, 2, Automatic}]

Scale the length of the arrows by the y coordinate:

StreamPlot[{y,x-x^2},{x,-1,2},{y,-1.5,1.5},StreamScale->{Automatic, 2,Automatic, #2&}]

OpenersExampleSection3(Spacer1)Properties & Relations  (1)

Show all line strips:

h[x_,y_]:={3*x*y*Cos[Norm[{x,y}]]+x*y*Norm[{x,y}]*Sin[Norm[{x,y}]],(2*y^2-x^2)*Cos[Norm[{x,y}]]-x*x*Norm[{x,y}]*Sin[Norm[{x,y}]]}
StreamPlot[h[x,y],{x,-3Pi,3Pi},{y,-3Pi,3Pi},StreamStyle->"ControlPoints"]

OpenersExampleSection5(Spacer1)Neat Examples  (1)

Magnetic dipole field:

h[x_,y_]:={3*x*y*Cos[Norm[{x,y}]]+x*y*Norm[{x,y}]*Sin[Norm[{x,y}]],(2*y^2-x^2)*Cos[Norm[{x,y}]]-x*x*Norm[{x,y}]*Sin[Norm[{x,y}]]}

Plot3D[Norm@h[x,y],{x,-3Pi,3Pi},{y,-3Pi,3Pi}]

StreamPlot[h[x,y],{x,-3Pi,3Pi},{y,-3Pi,3Pi}]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[StreamPoints, paclet:ref/StreamPoints])  ▪  (RefLink[StreamStyle, paclet:ref/StreamStyle])  ▪  (RefLink[VectorScale, paclet:ref/VectorScale])  ▪  (RefLink[StreamPlot, paclet:ref/StreamPlot])  ▪  (RefLink[ListStreamPlot, paclet:ref/ListStreamPlot])  ▪  (RefLink[StreamDensityPlot, paclet:ref/StreamDensityPlot])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Vector Visualization, paclet:guide/VectorVisualization])}})}})