For Programmers: Free Programming Magazines  


Home > Archive > Mathematica > March 2006 > ColorFunction gradient for vector field based on *data*









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author ColorFunction gradient for vector field based on *data*
Spin

2006-03-31, 8:05 am

Dear all,
I'm trying to make a plot of 3D spins/vectors on a 2D disc.
I do this with :
ListPlotVectorField3D[array, ColorFunction ->
Hue, VectorHeads -> True, PlotRange -> All];
where array is an appropriate -for the ListPlotVectorField3D- list.

However, the coloring of the vectors is a bit random.
I saw that people use constructs like :
ColorFunction -> (Hue[1 - #] &)
but I'm not sure of where the # symbol refers to.
When plotting a function, then the # represents the z value.

But when plotting a list, how can I tell ColorFunction and e.g. Hue to
make a color-gradient based on the value of a all the z-components of
my vectors?
My data are groups of lists {
{{x,y,x},{x-component,y-component,z-component}}, ....}
stating the position where the vector will be placed and then the
vector itself.
How can I tell ColorFunction to for each vector base it's Hue value on
the z-component each time?

Sorry, if I didn't explain it clear enough, I'm a beginner on this.

Would be thankful to read a reply on this.

Best

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com