Re: ScatterPlot3D with One More Dimension?
- To: mathgroup at smc.vnet.net
- Subject: [mg65150] Re: ScatterPlot3D with One More Dimension?
- From: dh <dh at metrohm.ch>
- Date: Wed, 15 Mar 2006 23:59:24 -0500 (EST)
- References: <dv903u$nj7$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Hi Matt, you may create a plot using graphic primitives. E.g. assume you have your data as 4-tupel, where the first element gives the state of the point, e.g. 0 and 1: dat={{0, 0, 0, 0}, {1, 1, 1, 1}, {0, 0, 0, 1}, {1, 1, 0, 0}} We can now use the first element to generate the wanted color: Show[Graphics3D[ { If[#[[1]]==0, Hue[0.5],Hue[1]], Point[Rest[#]]}& /@ dat ], Axes -> True] Matt Thompson wrote: > Folks, I'm wondering if it's possible to add a dimension to a ScatterPlot3D in the form of color? I have a Perl script that generates a list of {x,y,z} for a SP3D from a molecular dynamics trajectory, and it does work, but the plot is just mono. > > Rather, I'd like to change the color of certain points depending on the state the trajectory is on at that time. That is, a sort of RGBColor[1,0,0] for some points, then back to [0,0,0] for others, &c. > > Is this possible, or should I start exploring IDL, et al? >