Re: Re: Vector Fields - another question
- To: mathgroup at smc.vnet.net
- Subject: [mg14979] Re: [mg14968] Re: Vector Fields - another question
- From: Jurgen Tischer <jtischer at col2.telecom.com.co>
- Date: Wed, 2 Dec 1998 03:59:01 -0500
- Organization: Universidad del Valle
- References: <7258kj$8bi@smc.vnet.net> <728l9a$eio@smc.vnet.net> <199811280856.DAA07494@smc.vnet.net.>
- Sender: owner-wri-mathgroup at wolfram.com
Lori,
as far as I could find out, the option HeadScaling->Relative which
should do what you want, doesn't work with ListPlotVectorField. So I
played around with a hacked version of ListPlotVectorField, here it is.
Don't blame me, I know it's awful.
<<Graphics`Arrow`
norm[x_] := Sqrt[x . x]
makeArray[{x_,y_}]:=Arrow[x,x+y,HeadLength->.01 norm[y]]
Of course you adapt the HeadLength function to your needs.
varray = Flatten[Table[
{{i,j},{Random[Real, {-0.7, 0.7}],
Random[Real, {-0.7, 0.7}]}},
{i, 10}, {j, 10}],1]
This is a modification of the example of the Help for
ListPlotVectorField, note that I have to give the coordinates for the
bases too. The rest is to show how to use it.
nvarray=makeArray/@varray;
Show[Graphics[nvarray],AspectRatio->Automatic]
You'll have to scale your arrows by yourself, I doubt you can have a
graphical representation of 4 magnitudes, but at least it's up to you
to shape your graphic to your gusto.
Jurgen
Lori Bassman wrote:
>
> I am using ListPlotVectorField to plot vectors with magnitudes varying
> over several orders of magnitude. In addition to having appropriate
> vector lengths, I would like the arrowhead size to be variable -
> otherwise if I make the vectors with magnitude 1 look nice, vectors
> with magnitude 0.1 and 0.01 and 1e-10 all look the same and the plot
> does not accurately represent the field. Is there maybe a way to use a
> different HeadLength value for each arrow (I have not been able to
> figure out how to make it anything but a constant value for the whole
> plot)??
>
> Any suggestions greatly appreciated! --Lori Bassman
> loribee at leland.stanford.edu