Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: ListPointPlot3D

  • To: mathgroup at smc.vnet.net
  • Subject: [mg83007] Re: ListPointPlot3D
  • From: Bill Rowe <readnewsciv at sbcglobal.net>
  • Date: Wed, 7 Nov 2007 06:31:57 -0500 (EST)

On 11/6/07 at 3:45 AM, apalau at lpg.es (SkyW) wrote:

>I would like to use ListPointPlot3D to plot several points in two
>different colors (ex. blue and red). I have a Table with following
>format:

>list0={{x1, y1, z1, h1}, {x2, y2, z2, h2}, ..., {xn, yn, zn, hn}}

>x,y,z refers to the 3D coordinates and h takes value 0 or 1. I would
>like to plot all points with h value equal to 1 as red and all
>points with h value equal to 0 as blue .... how can I do it?

=46irst generating some data

data = Table[Join[RandomReal[{0, 1}, 3], {RandomInteger[]}], {200}];

then to plot it as required

ListPointPlot3D[{Cases[data, {__, 1}][[All, {1, 2, 3}]],
   Cases[data, {__, 0}][[All, {1, 2, 3}]]}, PlotStyle -> {Red, Blue}]
--
To reply via email subtract one hundred and four


  • Prev by Date: Page numbers in Mathematica
  • Next by Date: Re: ListPointPlot3D
  • Previous by thread: ListPointPlot3D
  • Next by thread: Re: ListPointPlot3D