How can i draw a vector field like this?enter image description here

  • 1
    In the meantime have a look here: tex.stackexchange.com/questions/34004/… Apr 28, 2018 at 23:21
  • 1
    Look for Quiver Plot Apr 28, 2018 at 23:21
  • 1
    In addition to @Dr.ManuelKuehner's link I'd suggest this post and this answer.
    – user121799
    Apr 28, 2018 at 23:29
  • This doesn't look like a vector field : you have curved arrows in your picture. Is this supposed to represent a flow of a vector field ? In any case you should precise your question, I think.
    – Kpym
    Apr 29, 2018 at 4:00
  • @Kpym It can be a vector field on some revolution surface. I agree that OP should precise his question (add more information about it)
    – Black Mild
    Apr 8, 2022 at 12:07

1 Answer 1


Yes, I know this question has TikZ in the title. Nevertheless I'd like to present an asymptote solution since IMHO this does a much better job on real 3D graphics. Compile with pdflatex -shell-escape.

import graph3;
import three;
import solids;

settings.render = 4;
currentprojection = perspective((9,4,4), up=Z,autoadjust=true);//,autoadjust=true

// coordinate axes 
draw(-Z -- 2X-Z,L=Label("$x$",position=EndPoint));
draw(-Z -- 3Y-Z,L=Label("$y$", position=EndPoint));
draw(-Z -- 2Z,L=Label("$z$", position=EndPoint));

for (int irun=1; irun<=20; irun+=1)
real myx = sin(irun*2*pi/20);
real myy = -0.5;
real myz = cos(irun*2*pi/20);
draw(myx*X+myy*Y+myz*Z -- myx*X+myy*Y+myz*Z+(0.8+0.3*sin(irun*2*pi/10))*Y, arrow=Arrow3(), p=linewidth(0.5pt),light=currentlight);

for (int irun=1; irun<=20; irun+=1)
real myx = sin(irun*2*pi/20);
real myy = 0.8;
real myz = cos(irun*2*pi/20);
draw(myx*X+myy*Y+myz*Z -- 1.2*myx*X+myy*Y+1.2*myz*Z+1.1*Y, arrow=Arrow3(), p=linewidth(0.5pt),light=currentlight);


enter image description here

You must log in to answer this question.

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