Re: VectorStyle for centered vector tail?
- To: mathgroup at smc.vnet.net
- Subject: [mg94408] Re: VectorStyle for centered vector tail?
- From: Stoney Ballard <stoneyb at gmail.com>
- Date: Fri, 12 Dec 2008 06:54:36 -0500 (EST)
- References: <ghdmst$fog$1@smc.vnet.net> <ghf75b$phv$1@smc.vnet.net>
On Dec 11, 3:45 am, ucer... at gmail.com wrote: > > data = Table[{x, y}, {y, 10}, {x, 20}]; > > ListVectorPlot[data, AspectRatio -> 1/2, VectorPoints -> {20, 10}, > > VectorStyle -> "RightDot", VectorScale -> {Automatic, 0.3}] > > > but this draws dots that are really squished. There doesn't seem to be > > any natural way to draw non-square vector plots. > > > Is it possible to make the dots circular, so that they don't also > > follow the aspect ratio? > > > Any ideas? > > > Thanks! > > You will have to construct the dot/segments manually to compensate for > the aspect ratio: > > pts = Flatten[Table[{x, y}, {x, 1, 10, 1}, {y, 1, 20, 1}], 1]; > data = Table[{x, y}, {y, 10}, {x, 20}]; > Show[ListVectorPlot[data, AspectRatio -> 1/2, VectorPoints -> pts, > PlotRange -> All, VectorStyle -> {Black, "RightSegment"}], > Graphics[Disk[#, {0.06, 0.16}] & /@ pts]] > > -Ulises That works. I guess there's room for improvement in VectorPlot. Thanks!