Re: ListPointPlot3D colors from data
- To: mathgroup at smc.vnet.net
- Subject: [mg99379] Re: ListPointPlot3D colors from data
- From: dh <dh at metrohm.com>
- Date: Mon, 4 May 2009 06:01:24 -0400 (EDT)
- References: <gth5jp$f2c$1@smc.vnet.net>
Hi Karl,
you may do this using the ColorFunction option of ListPointPlot.
Towards this aim you must:
1) ensure that F receives actual and not scaled coordinates. This is
done by the option: ColorFunctionScaling -> False
2) The color function "Hue" takes an argument in the range 0..1.
Therefore you must scale the output of F to this range.
Here is an example:
=============================
F[x_, y_, z_] := RandomReal[{-1, 1}];
d = Flatten[Table[{x, y, z}, {x, 0, 3}, {y, 0, 3}, {z, 0, 3}], 2];
ListPointPlot3D[d, ColorFunctionScaling -> False,
ColorFunction -> (Hue[0.5 + 0.5 F[##]] &)]
==============================
Daniel
karl.lefty at gmail.com wrote:
> Hello all,
>
> I have an array of data, with four columns. Each row consists of an X,
> Y, Z position, and a value for the data sample from that position F
> (X,Y,Z) [where F is not a analytical function, but an experimental
> sample value from that position]. What I would like is to plot the
> points using something like ListPointPlot3D, with the color of the
> point being determined by the value from the fourth column F(X, Y, Z).
> How can I do this with Mathematica 7?
>