RE: colorfunction with scatterplot3d?
- To: mathgroup at smc.vnet.net
- Subject: [mg45311] RE: [mg45299] colorfunction with scatterplot3d?
- From: "David Park" <djmp at earthlink.net>
- Date: Tue, 30 Dec 2003 04:14:18 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
Michael, When plotting Points and Lines it is often easier not to use fancy plot types such as ScatterPlot3D. Needs["Graphics`Animation`"] Needs["Graphics`Colors`"] atable = Table[Random[Integer, {1, 10}], {50}, {3}]; colortable = Table[Random[Real, {0, 1}], {50}]; plot1 = Show[Graphics3D[ {MapThread[{Hue[#]1, Point[#2]} &, {colortable, atable}]}], Background -> Linen, BoxStyle -> Gray, ImageSize -> 450]; SpinShow[plot1, Frames -> 40] SelectionMove[EvaluationNotebook[], All, GeneratedCell] FrontEndTokenExecute["OpenCloseGroup"]; Pause[0.5]; FrontEndExecute[{FrontEnd`SelectionAnimate[200, AnimationDisplayTime -> 0.1, AnimationDirection -> Forward]}] David Park djmp at earthlink.net http://home.earthlink.net/~djmp/ From: Michael Alfaro [mailto:malfaro at ucsd.edu] To: mathgroup at smc.vnet.net Hello, I would like to color the points in a ScatterPlot3D plot as a function of values in another table. For example, I would like to plot atable below, but use the matching values of colortable to color the points (with the color range scaled to the min and the max of values in colortable). atable = Table[Random[Integer, {1,10}], {50}, {3}] colortable = Table[Random[Real,{0,1}], {50}] ScatterPlot3D[atable, PlotStyle->? or ColorFunction->?] Thanks for any help! Michael