3

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?

Moo
  • 3,260
  • 1
  • 12
  • 28
  • 1
    Maybe some clever manipulation of VectorPoints? Or something along the lines of the Contours option for ContourPlot? – NonDairyNeutrino Oct 04 '18 at 20:33
  • Interesting, I will think about those options. – Moo Oct 04 '18 at 20:36
  • 1
    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. – NonDairyNeutrino Oct 04 '18 at 21:15
  • 2
    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]? – JimB Oct 04 '18 at 21:34
  • @JimB: Neat! I will have to look at this more, but that is much better! I want to see if it lets me do more color separation to better see the lines. – Moo Oct 04 '18 at 21:45
  • 1
    Possible duplicate: https://mathematica.stackexchange.com/questions/15895/how-to-get-streamplot-to-draw-many-hundreds-of-streamlines. – JimB Oct 04 '18 at 22:02

0 Answers0