3
$\begingroup$

The StreamPlot command has an option for the number of StreamPoints.

When I try the first it does not appear to allow you to choose anything other than $10$ (for example, I want to plot $1000$ streamlines)

StreamPlot[{10 x y - 1/2 x - 1/10 x^2, y - y^2 - x y}, {x, 0, 3}, {y, 
 0, 1/2}, StreamPoints -> 10]

When I try a second variant, it is a slight improvement as

StreamPlot[{10 x y - 1/2 x - 1/10 x^2, y - y^2 - x y}, {x, 0, 3}, {y, 
 0, 1/2}, ImageSize -> Large, StreamPoints -> Fine]

However, how can I get MMA to add as many, say $1000$ streamlines, in the first quadrant using StreamPlot?

Perhaps there are other approaches using NDSolve and the like, but why can this not be done with StreamPlot?

$\endgroup$
  • 1
    $\begingroup$ Maybe some clever manipulation of VectorPoints? Or something along the lines of the Contours option for ContourPlot? $\endgroup$ – That Gravity Guy Oct 4 '18 at 20:33
  • $\begingroup$ Interesting, I will think about those options. $\endgroup$ – Moo Oct 4 '18 at 20:36
  • 1
    $\begingroup$ Here's a really dirty start Show[StreamPlot[{10. x y - .5 x - .1 x^2, y - y^2 - x y},{x, 0., 3.}, {y, 0., #}, StreamPoints -> 1, StreamStyle -> Arrowheads[.015]] & /@ Subdivide[0.01, .5, 100], PlotRange -> All]. Granted this is only for (still at most) 100 lines. I tried 1000, but it just didn't look very good. Also note, that the resulting plot only has 0 < y < .3. $\endgroup$ – That Gravity Guy Oct 4 '18 at 21:15
  • 2
    $\begingroup$ Have you considered LineIntegralConvolutionPlot[{10 x y - 1/2 x - 1/10 x^2, y - y^2 - x y}, {x, 0, 3}, {y, 0, 1/2}, RasterSize -> 300]? $\endgroup$ – JimB Oct 4 '18 at 21:34
  • 1
    $\begingroup$ Possible duplicate: mathematica.stackexchange.com/questions/15895/…. $\endgroup$ – JimB Oct 4 '18 at 22:02

Your Answer

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

Browse other questions tagged or ask your own question.