Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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

share|improve this question
add comment

2 Answers 2

up vote 8 down vote accepted

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]
share|improve this answer
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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