ColorFunction gradient for vector field based on *data*

*To*: mathgroup at smc.vnet.net*Subject*: [mg65422] ColorFunction gradient for vector field based on *data**From*: "Spin" <chris.moutafis at gmail.com>*Date*: Fri, 31 Mar 2006 06:09:17 -0500 (EST)*Sender*: owner-wri-mathgroup at wolfram.com

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