1
$\begingroup$

My command below does not give a very informative StreamPlot. What am I doing wrong? Similar problem with VectorPlot. VectorScale -> Automatic and StreamPoints -> Automatic give unsatisfying results. What could I do better?

StreamPlot[
 {1, 1/5 y (1 - y/3500)},
 {x, -10, 50}, {y, -2000, 5500},
 PlotRange -> {{-10, 50}, {-2000, 5500}},
 StreamPoints -> Automatic
]

VectorPlot[
 {1, 1/5 y (1 - y/3500)},
 {x, -10, 50}, {y, -2000, 5500},
 PlotRange -> {{-10, 50}, {-2000, 5500}},
 VectorStyle -> Arrowheads[0],
 VectorScale -> Automatic,
 StreamPoints -> Automatic
]
$\endgroup$
  • $\begingroup$ In order for us to be able to help you better, perhaps you could mention in what way you find the current results uninformative, and how you would like to change them so they can be more useful. $\endgroup$ – MarcoB May 16 '18 at 0:08
  • $\begingroup$ Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Take the tour and check the faqs! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! $\endgroup$ – Chris K May 16 '18 at 1:05
2
$\begingroup$

This is due to the large disparity in the range on the x- and y-axes. @Rahul created a function to deal with this problem here, which I tweaked here. For self-containedness, I'll copy it below.

Options[myStreamPlot] = Options[StreamPlot];
myStreamPlot[f_, {x_, x0_, x1_}, {y_, y0_, y1_}, opts : OptionsPattern[]] := 
Module[{u, v, a = OptionValue[AspectRatio]},
  Show[StreamPlot[{1/(x1 - x0), a/(y1 - y0)}
    (f /. {x -> x0 + u (x1 - x0), y -> y0 + v/a (y1 - y0)}),
    {u, 0, 1}, {v, 0, a}, opts] /.
    Arrow[pts_] :> Arrow[({x0, y0} + {x1 - x0, (y1 - y0)/a} #) & /@ pts],
    PlotRange -> {{x0, x1}, {y0, y1}}]
]

Applied to your problem:

myStreamPlot[{1, 1/5 y (1 - y/3500)}, {x, -10, 50}, {y, -2000, 5500}]

Mathematica graphics

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.