Message Boards Message Boards

0
|
2261 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

3D Graphics Question from Newbie

Hi, I use Mathematica mainly for stats and don't do much graphing so I was hoping someone could assist. I need to create a 3D scatter plot from three imported datasets, specify a colour for the points in each dataset and also make the points spherical. I know how to create the graph - ListPointPlot3D[{data1,data2,data3}] - but changing the colour and shape of the points seems to differ quite a lot from the method in 2D.

Hopefully this makes sense and I'd be very grateful for any solutions :)

POSTED BY: Melissa Marr
2 Replies
Posted 9 years ago

Worked brilliantly! Thanks Gianluca :)

POSTED BY: Melissa Marr

You can change the colors with PlotStyle:

ListPointPlot3D[{Table[x, {x, 20}, {y, 20}], 
  Table[y, {x, 15}, {y, 20}]}, PlotStyle -> {Pink, Green}]

The points are not spherical enough? You can try with something like

With[{r = .1},
 Graphics3D[{Red, Map[Sphere[#, r] &, data1], Green, 
   Map[Sphere[#, r] &, data2], Blue, Map[Sphere[#, r] &, data3]}]]

adapting the radius r to your needs.

POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract