Re: can we use ListVectorPlot to plot arrows? (tail at point, head
- To: mathgroup at smc.vnet.net
- Subject: [mg132380] Re: can we use ListVectorPlot to plot arrows? (tail at point, head
- From: Roland Franzius <roland.franzius at uos.de>
- Date: Sun, 2 Mar 2014 21:26:34 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- Delivered-to: l-mathgroup@wolfram.com
- Delivered-to: mathgroup-outx@smc.vnet.net
- Delivered-to: mathgroup-newsendx@smc.vnet.net
- References: <le4e85$46h$1@smc.vnet.net>
Am 20.02.2014 09:26, schrieb Alan:
> Is there an option that will force ListVectorPlot to plot
> arrows from the points to the displacement? (By default,
> the point is in the middle of the arrow, not at its tail.)
> Using VectorPoints -> All, of course.
You can use VectorPlot as a primitive drawing tool and pimp the graphics
by replacing arrows and other elements by more colorful primitive graphics
the following rule replaces all arrows in a Graphics[] generated by
VectorPlot by a blue arrow and a red disc of radius 0.1 at the middle of
head and tail.
redpointarrow=
{ Arrow[{{x_, y_}, {u_, v_}}] :>
{Blue, Arrow[{{x, y}, {u, v}}], Red,
Disk[{(x + u)/2, (y + v)/2}, 0.1]}}
The option StreamPoints adds some integrated stream lines from the the
gradient of the vector field.
field[x_,x_]:=Evaluate[Grad[(x^2 + y) Exp[(-x y)/(x^2 + y^2)], {x, y}]]
ps = VectorPlot[field[x,y]], {x, -2, 2}, {y, -2, 2},
VectorPoints -> 7,
VectorStyle -> {"DotArrow"},
StreamPoints -> 12] /. redpointarrow;
ps
--
Roland Franzius