How do I plot a vector field, where the direction at each point (x, y) is given by tangent(alpha) = f(x, y)
?
As far as I can tell, gnuplot can only plot vector fields when reading data from a file. Your file will have to have 4 columns, x, y, deltax and delta y, and gnuplot will then plot a vector from (x,y) to (x+deltax, y+deltay) for each line in the file:
plot "file.dat" using 1:2:3:4 with vectors head filled lt 2
If you are not insisting on using gnuplot, there are other tools that can to this better or at least easier. I personally use asymptote. There is an example of a vectorfield plotted in asymptote here.