0
$\begingroup$

I want to compare how two vector fields $\vec V_1=-y\hat i+x \hat j$ and $\vec V_1=2\vec V_1=2(-y\hat i+x \hat j)$ various concentric circles $x^2+y^2=a^2$ with $a^2=1,2,3$ etc. I can plot them separately. But for comparison, I want to draw them on the same plot. Any idea how to do it neatly?

$\endgroup$
2
  • 1
    $\begingroup$ How about StreamPlot[{{-y, x}, {-2 y, 2 x}}, {x, -3, 3}, {y, -3, 3}, PlotTheme -> "Detailed", StreamStyle -> {Red, Blue}, StreamColorFunction -> None]? $\endgroup$
    – user64494
    Oct 15 at 18:34
  • $\begingroup$ @user64494 Shouldn't the blue arrows be larger than the red arrows? Isn't it possible to use VectorPlot itself? $\endgroup$ Oct 15 at 18:38
1
$\begingroup$

This can be done as follows.

a = VectorPlot[{-y, x}, {x, -3, 3}, {y, -3, 3},  VectorColorFunction -> None,
VectorStyle -> Blue,  VectorSizes -> {0, 1/2}];
b = VectorPlot[{-2 y, 2 x}, {x, -3, 3}, {y, -3, 3},VectorColorFunction -> None, 
VectorStyle -> Red, VectorSizes -> {0, 1}];
Show[{b, a}]

enter image description here

$\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.