4
$\begingroup$

When using StreamPlot with two different ranges, one gives a plot artifact and it is not clear what it is trying to say.

If you plot

 StreamPlot[{1, (-x + x^2 + y^2)/(x^2*y*(-1 + x*y))}, {x, -2, 2}, {y, -2, 2}] 

The plot is

correct plot with streams

If you slightly change the range

 StreamPlot[{1, (-x + x^2 + y^2)/(x^2*y*(-1 + x*y))}, {x, -1.64028, 1.71557}, {y, -1.64028, 1.71557}] 

The plot is

similar plot, but contains an upwards pointing red arrow where a downwards blue one was before close to the center of the plot

What does the item circled in red represent? Is it just some unwanted artifact? Why is it a different color?

$\endgroup$

1 Answer 1

3
$\begingroup$

Set y->0.1 and draw the y component of the corresponding vector as a function of x:

Plot[(-x + x^2 + y^2)/(x^2*y*(-1 + x*y)) /. y -> 0.1, {x, -1, 1}] 

enter image description here

You see that the y-component at the point x==0 is very small. And this is what the different color of the vector communicates.

$\endgroup$
2
  • $\begingroup$ Hmm - so is this showing that artifact StreamPlot[{1, (-x + x^2 + y^2)/(x^2* y*(-1 + x*y))}, {x, -.1, .1}, {y, -.5, .5}]? $\endgroup$ Commented Jul 14, 2022 at 16:08
  • 2
    $\begingroup$ It is not an artifact it is the color function. $\endgroup$ Commented Jul 14, 2022 at 16:12

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.