Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #16598

Re: can we use ListVectorPlot to plot arrows? (tail at point, head at displacement)

From roby <roby.nowak@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: can we use ListVectorPlot to plot arrows? (tail at point, head at displacement)
Date 2014-03-02 06:51 +0000
Message-ID <leuke0$sg4$1@smc.vnet.net> (permalink)
References <le4e85$46h$1@smc.vnet.net>
Organization Time-Warner Telecom

Show all headers | View raw


Hi, use the following option:

VectorStyle -> "LeftArrow"


But as far as I am aware ther is no clean method to generate exact vector length with respect to the coordinates of the starting points an thus the coordinates of the final plot.

You can only specify a starting point for the Arrows, but no explicit endpoint.

You only may specify a vector length (vector field values) but this will be scaled in a rather complicated maner relative to the whole plot including iamage margins etc.,  ...  .

That means you dont have full control over the vector length such that it gets the length you specify in the final plot, you just may adjust the length by trial & error.


If you need full control it may be easyer to map Arrow[] over your data and generate a "manual" vector plot.


you can use the followin alternative which offers a clas scale paramter:


Options[MListVectorPlot]={PlotRange->Automatic};

MListVectorPlot[data_,vs_:1,opts:OptionsPattern[]]:=
data//Arrow[{#[[1]],#[[1]]+vs (#[[2]])}]&/@#&//
Graphics[{Darker@Blue,Arrowheads[.025],#,Black,Point[data[[All,1]]]},
FilterRules[{opts}, Options[Graphics]], Options[MListVectorPlot],
Frame->True,AspectRatio->Automatic,
GridLines->{Flatten@data[[All,1,1]],Flatten@data[[All,1,2]]}]&

MListVectorPlot[
Table[{{x,y},{y,-x}},{x,-1,1,1/2},{y,-1,1,1/2}]//Flatten[#,1]&,1/2]


Cheers Robert



Am Donnerstag, 20. Februar 2014 09:26:45 UTC+1 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.
> 
> 
> 
> Thanks,
> 
> Alan Isaac

Back to comp.soft-sys.math.mathematica | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

can we use ListVectorPlot to plot arrows? (tail at point, head at displacement) Alan <alan.isaac@gmail.com> - 2014-02-20 08:26 +0000
  Re: can we use ListVectorPlot to plot arrows? (tail at point, head at displacement) roby <roby.nowak@gmail.com> - 2014-03-02 06:51 +0000
  Re: can we use ListVectorPlot to plot arrows? (tail at point, head Roland Franzius <roland.franzius@uos.de> - 2014-03-03 02:28 +0000

csiph-web