I generated some pics from 2 datum,one in $x$ direction and the other in $y$,so I used the commands:

exfield = Range[200];
polarplane = Range[200];
xx = Table[
Transpose[{exfield[[25, i]], polarplane[[25, i]]}], {i, 71}];

to get the vector field. But one problem here is, all the pics generated by the commands share the same maximum length of the vector. I can only see the orientation change but no magnitude change. I need a cartain standard (for instance, 1 cm vector length for the maximum data value $a_{max}$) to generate all the pics, so I can see the relative magnitude change. But I couldn't find the options. Have anyone encountered this same problem? Thank you. And the sample datum are like:

 exfield[[001]] = {              

and the sample data:


  • $\begingroup$ Could you maybe post polarplane.dat and exfield.dat somewhere (e.g. Pastebin)? $\endgroup$ – J. M.'s discontentment Nov 12 '12 at 11:10
  • $\begingroup$ Oh, you finally come! Why not log in? $\endgroup$ – xzczd Nov 13 '12 at 3:56
  • $\begingroup$ it's quite a large file, tons of datum, I am trying to find a place to upload the file $\endgroup$ – user49114 Nov 13 '12 at 4:04
  • $\begingroup$ dropbox.com/s/m3p34ncas3qd8qm/datum.rar here, and, thank you $\endgroup$ – user49114 Nov 13 '12 at 4:09

You can use the VectorScale option for ListVectorPlot to control the scaling of vector sizes.

ListVectorPlot[Table[{y, -x}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}], 
 VectorScale -> .05]

Mathematica graphics

ListVectorPlot[Table[{y, -x}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}], 
 VectorScale -> .1]

Mathematica graphics

Here is a fleshed out version:

Gather some data:

xxs = Table[Transpose[{exfield[[#, i]], polarplane[[#, i]]}], {i, 71}] & /@Range[27,35];

Find the relevant max vector sizes.

scales = With[{s = Max@Apply[Norm@#&,#,{2}] & /@ xxs}, s/Max@s];

Plot the vector fields, with a couple of fiddle factors for arrowhead size and absolute vector length:

   ListVectorPlot[#1, VectorScale -> #2, 
     VectorStyle -> Arrowheads[#2 0.015]] &, {xxs, 0.3 scales}], 3]]

Mathematica graphics

| improve this answer | |
  • $\begingroup$ This is a little different from OP's intention: he wants the length of arrows to somewhat represent the size of the vector. $\endgroup$ – xzczd Nov 13 '12 at 3:59
  • $\begingroup$ sorry I didn't put it clear, what i mean is i wanna use the same standard to present all the vectors in different plots. thank you anyway $\endgroup$ – user49114 Nov 13 '12 at 4:10
  • $\begingroup$ You can use the VectorScale to adjust the scale to the relative maximum size of the largest vector from each set of data. $\endgroup$ – image_doctor Nov 13 '12 at 9:38
  • $\begingroup$ Er…we can also use Norm instead of EuclideanDistance, right? $\endgroup$ – xzczd Nov 14 '12 at 6:05
  • $\begingroup$ @xzczd Yes certainly :) $\endgroup$ – image_doctor Nov 14 '12 at 7:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.