TransWikia.com

Degenerate arrows/points in StreamPlot

Mathematica Asked on April 18, 2021

Drawing a StreamPlot of a linear dynamical system:

A = {{9, -15}, {7, -9}};
StreamPlot[A.{x, y}, {x, -2, 2}, {y, -2, 2}, StreamPoints -> Coarse]

enter image description here

results in a few colinear points inside the ellipse. I guess they are some degenerate arrows, but it looks very confusing, so how to get rid of those? (They stay there when StreamPoints -> Medium as well, although less abundant.)

$Version

"12.1.1 for Linux x86 (64-bit) (June 19, 2020)"

2 Answers

Delete short arrows?:

A = {{9, -15}, {7, -9}};
StreamPlot[A . {x, y}, {x, -2, 2}, {y, -2, 2}, 
  StreamPoints -> Coarse] /. 
 Arrow[a_] /; Total[Norm /@ Differences[a]] < 0.1 :> {}

enter image description here

Correct answer by Michael E2 on April 18, 2021

Set the aratio and npts in SteamScale maybe one method.

A = {{9, -15}, {7, -9}};
StreamPlot[A . {x, y}, {x, -2, 2}, {y, -2, 2}, StreamPoints -> Coarse,
  StreamScale -> {Automatic, 2, .01, Automatic}]

enter image description here

Answered by cvgmt on April 18, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP