Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #8046 > unrolled thread
| Started by | Patrick Scheibe <pscheibe@trm.uni-leipzig.de> |
|---|---|
| First post | 2012-01-21 10:13 +0000 |
| Last post | 2012-01-21 10:13 +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: VectorColorFunction Patrick Scheibe <pscheibe@trm.uni-leipzig.de> - 2012-01-21 10:13 +0000
| From | Patrick Scheibe <pscheibe@trm.uni-leipzig.de> |
|---|---|
| Date | 2012-01-21 10:13 +0000 |
| Subject | Re: VectorColorFunction |
| Message-ID | <jfe33f$9pk$1@smc.vnet.net> |
Hi,
maybe I misunderstood you, but the parameters which you can use in a
VectorColorFunction are {x,y,fx,fy,norm}. Just use fx and fy to
calculate your angle and make a color from it:
VectorPlot[{x, y}, {x, -3, 3}, {y, -3, 3}, VectorColorFunction ->
Function[{x, y, fx, fy, norm}, ColorData["BrightBands"][
Mod[ArcTan[fx, fy], 2*Pi]/(2*Pi)]],
VectorColorFunctionScaling -> False]
Cheers
Patrick
On Fri, 2012-01-20 at 01:55 -0500, Peter Rodenbach wrote:
> Hi experts,
>
> I want to plot via ListVectorPlot a Field of Vectors. I obtained the
> vectors from a physics experiment. The Norm of all vectors is very
> similar, and what is important is its direction!
>
> Therefore, what I want to do now is: give each vector a color with a
> different direction a different color, e.g., up to 0.5degree red, 0.5
> to 1 degree yellow, etc.
>
> The Problem: The norm of each vector is used as argument for the
> function that determines the color, according to the help
>
> "With the setting VectorColorFunction->func, the arguments supplied to
> func are as follows" ,...., x,y,Subscript[v, x],Subscript[v,
> y],Norm[{Subscript[v, x],Subscript[v, y]}]"
>
> Does anyone have an idea for a workaround?
>
> Thanks
>
> Peter
>
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web