14
$\begingroup$

I am trying to plot vectors in mathematica, some 2d and some 3d.

Is there a way to do this?

I Need the coordinate axes and an arrow head on a line basically.

Thanks, Blake

$\endgroup$
1

2 Answers 2

27
$\begingroup$

Here are some examples that I think are self-explanatory:

Graphics[{Arrow[{{0, 0}, {1, 1}}], Arrow[{{0, 0}, {-1, 1}}]}, Axes -> True]

Graphics3D[{Arrow[{{0, 0, 0}, {1, 1, 1}}], Arrow[{{0, 0, 0}, {-1, 1, -1}}]}, Axes -> True, Boxed -> False]
$\endgroup$
3
$\begingroup$

You should look at these built in plots:

StreamPlot and ListStreamPlot

StreamPlot[{-1 - x^2 + y, 1 + x - y^2}, {x, -3, 3}, {y, -3, 3}]

enter image description here


StreamDensityPlot and ListStreamDensityPlot

enter image description here


VectorPlot and ListVectorPlot

enter image description here


VectorPlot3D and ListVectorPlot3D

enter image description here

$\endgroup$
1
  • $\begingroup$ Those are great and all, but I'd rarely use them. I need a good way to plot the columns of a matrix. $\endgroup$ Jul 5, 2016 at 21:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .