How to make a StreamPlot with three variables and two expressions

I’m trying to make a StreamPlot in Mathematica with three variables. I already have two variables, x and y, that make an ellipse via


but I want the vectors to increase as you move radially out from the center (ie ideally I would want a third variable, v, so that it looked like

StreamPlot[{-v*y, v*x}]

So that as v increased the vectors increased as well.




You might take a look at VectorPlot.
– march
Jun 16 ’15 at 16:14



I’m not sure I follow, but it sounds like you’re looking for the formula of a vector field in just two variables with such a property. Something like Norm[{x, y}]*{-y, x}.
– Michael E2
Jun 16 ’15 at 16:18



I’m also not sure what you’re looking for; rescaling the vectors as you propose won’t change the stream lines at all. Are you looking for the actual arrowheads & lines in StreamPlot to be rescaled according to their location on in the plot?
– Michael Seifert
Jun 16 ’15 at 16:38



Yes, @MichaelSeifert, that’s what I’m looking for. The farther you go out from the center, I want the actual lines to be larger. What I’m doing is making an ellipse, and as you move outward the velocity around the ellipse should increase.
– pelkat
Jun 16 ’15 at 16:47



The vector field {x,-y} produces sets of lines that converge to x=0, not an ellipse
– pelkat
Jun 16 ’15 at 16:54


1 Answer


There is an option in StreamPlot called StreamScale that allows you to scale the vectors. In the documentation, we find that StreamScale -> {Automatic, 2, Automatic} results in scaled vectors. Alternatively, you can use VectorPlot, which automatically scales the vectors. Using

StreamPlot[{-y,x}, {x,-2,2}, {y,-2,2}, StreamScale -> {Automatic, 2, Automatic}]
VectorPlot[{-y,x}, {x,-2,2}, {y,-2,2}]

the results look like (with StreamPlot on the left and VectorPlot on the right):

Also see, for instance, Getting clearer StreamPlot output, How to get StreamPlot to draw many hundreds of streamlines?, and How can I get better control over StreamPlot? for more information about how StreamPlot works.