Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am plotting a curl, and I only want VectorPlot3D to show one arrow, I have tried adjusting VectorPoints-> 1, but the plot show's no arrows at all. Is 2 the minimum VectorPoints I can have?

If I cannot make use of VectorPlot3d in this way, how can I use the Arrow function to point in the direction of a vector field at a certain point?


share|improve this question
I don't understand what you mean by "show one arrow". Where should this "one arrow" be in your plot? – J. M. Aug 1 '12 at 14:36
Welcome to Mathematica SE! If you post a working code snippet, you'll surely get faster & better answers. Also be sure to format the code by indenting it by four spaces or using ``. – Ajasja Aug 1 '12 at 14:36
Please also consider to register your account. This will make it possible to place comments below questions and answers and will keep account of your questions and answers and your reputation gained by them. – Sjoerd C. de Vries Aug 1 '12 at 15:00
up vote 1 down vote accepted

I don't think it's possible. I assume the vector scaling routine needs at least two vectors. You can fake it though:

VectorPlot3D[{x, y, z}, {x, -1, 1}, {y, -1, 1}, {z, -1, 1}, 
 VectorPoints -> {0.9999999 {0.5, 0.5, 0.5}, {0.5, 0.5, 0.5}}]

Mathematica graphics

share|improve this answer
thanks that works quite nicely – Mel Aug 2 '12 at 16:30

The error message that

VectorPlot3D[{x, y, z}, {x, -1, 1}, {y, -1, 1}, {z, -1, 1}, VectorPoints -> {1, 1, 1}]


enter image description here

suggests that two is indeed the minimum number of VectorPoints.

EDIT: Using

 vp1=VectorPlot3D[{x, y, z}, {x, -1, 1}, {y, -1, 1}, {z, -1, 1}, VectorPoints -> {2, 2, 2}]

enter image description here

a workaround is possible by manipulating the components of the Graphics3D object vp1:

(vp2 = vp1; vp2[[1, 2, 1, 2]] = vp2[[1, 2, 1, 2, #]];vp2) & /@ Range[8],

enter image description here

share|improve this answer

You can specify two vectors, one of which is the vector you want, then use VectorColorFunction to hide the undesired one.

VectorPlot3D[{x, y, z}, {x, -1, 1}, {y, -1, 1}, {z, -1, 1},
 VectorPoints -> {{.5, 0, .3}, {.4, .1, .4}},
 VectorColorFunctionScaling -> False,
 VectorColorFunction -> Function[{x, y, z, vx, vy, vz, n},
   If[{x, y, z} == {.4, .1, .4}, Black, Directive[Opacity[0]]]

Mathematica graphics

share|improve this answer
thanks for the nice example with colorfunction, I haven't come across something like this in the wolfram reference page – Mel Aug 2 '12 at 16:32
@Mel you are welcome :) – Silvia Aug 2 '12 at 19:20

Your Answer


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.