Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #7726 > unrolled thread
| Started by | "Brandon D. Batista" <bdbatista@gmail.com> |
|---|---|
| First post | 2012-01-11 09:28 +0000 |
| Last post | 2012-01-11 09:28 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Plotting an Array of Vectors "Brandon D. Batista" <bdbatista@gmail.com> - 2012-01-11 09:28 +0000
| From | "Brandon D. Batista" <bdbatista@gmail.com> |
|---|---|
| Date | 2012-01-11 09:28 +0000 |
| Subject | Re: Plotting an Array of Vectors |
| Message-ID | <jejkn2$bc0$1@smc.vnet.net> |
Hi Peter,
As of Mathematica 7, vector visualization has become a standard feature. I
will illustrate an example that I ran using Mathematica 8.0.4 based on your
inquiry. To start you should enter your vector data into an array as you
stated, and assign it to a variable. The following example is a 5 x 5
array:
*
data={{{3,3},{3,2},{3,4},{2,3},{1,4}},{{2,4},{4,3},{3,1},{2,1},{4,4}},{{1,2},{2,5},{5,1},{4,5},{3,5}},{{1,5},{5,3},{4,1},{5,2},{5,4}},{{1,6},{6,4},{3,6},{6,2},{6,6}}}
*
Your array would mimic this syntax. Then you would use the plot command
ListVectorPlot[] with your chosen array variable name as the argument:
*
ListVectorPlot[data]
*
This should plot your vector field (using the default options for
ListVectorPlot). Further customization is possible by adjusting these
options during the ListVectorPlot function call. Hopefully this helps.
Best,
B. Batista
On Tue, Jan 10, 2012 at 05:59, Peter Rodenbach <
peter.rodenbach@googlemail.com> wrote:
> Hi everyone.
>
> I wan to plot an 50 x 50 array that has two dimensional vectors in it
> like
> {{3,3},{3,2},{3,4},{2,3}.....},{{3,4},...},...
>
> in a way that it looks like a bunch of compass needles. (Remember that
> High School experiment in which you visualise the magnetic field?)
>
> Thanks
>
> Peter
>
>
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web