0
$\begingroup$

I have two vector fields which have only one component, e.g. the y-component of the graph below.

How do I obtain a plot similar to the one uploaded here, by using VectorPlot? I have trouble plotting a single row of arrows either.

enter image description here

$\endgroup$
2
  • $\begingroup$ Try looking at the VectorPoints option. $\endgroup$ May 20, 2016 at 10:31
  • $\begingroup$ Sorry, that doesn't help, because VectorPoints seems to determine only the number of arrows in the overall plot, not by row and column $\endgroup$ May 20, 2016 at 10:32

1 Answer 1

1
$\begingroup$

Try bending VectorPoints to your will. I'm not certain whether you have a list of vectors or a function. Using VectorPlot:

Show[
 {
  VectorPlot[{0, Sin[x]}, {x, 0, \[Pi]}, {y, -1, 1}, 
   VectorPoints -> Table[{x, 1}, {x, 0., \[Pi], \[Pi]/9}], 
   VectorStyle -> Red],
  VectorPlot[{0, x - \[Pi]/2}, {x, 0, \[Pi]}, {y, -1, 1}, 
   VectorPoints -> Table[{x, -1}, {x, 0., \[Pi], \[Pi]/9}]]
  }
 ]

enter image description here

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.