MathGroup Archive 2014

[Date Index] [Thread Index] [Author Index]

Search the Archive

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

  • To: mathgroup at smc.vnet.net
  • Subject: [mg132374] Re: can we use ListVectorPlot to plot arrows? (tail at point, head at displacement)
  • From: roby <roby.nowak at gmail.com>
  • Date: Sun, 2 Mar 2014 01:05:32 -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>

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



  • Prev by Date: Error during independent variable change parametric plot3D
  • Next by Date: Re: How to replace some variables and how to solve a differential
  • Previous by thread: Re: Error during independent variable change parametric plot3D
  • Next by thread: Re: How to replace some variables and how to solve a differential