# Plotting data with 4 columns!

I'd like 3Dplot a list of data with 4 columns (these are mesh outputs):

x1 y1 z1 Dose1
x2 y2 z2 Dose2
.
.
.


which command i should to use??

-
Image3D is a possibility. But I'd advise you to do at least some basic searching through the docs before posting questions. –  jVincent Sep 19 '13 at 20:33
You could try using Graphics3D to place a little sphere at {x1,y1,z1}, with radius determined by Dose1. Or you could place points at {x1,y1,z1} with the color determined by Dose1. –  Timothy Wofford Sep 19 '13 at 20:39
@TimothyWofford BubbleChart3D is meant for that. Ali, it's really up to you what command you want to use, look here at this list for a starter: reference.wolfram.com/mathematica/guide/… –  Pickett Sep 19 '13 at 20:54

Like I said in the comments, BubbleChart3D is meant to do what ListPointPlot3D is doing in this case. For example:

d = RandomReal[{0, 1}, {100, 4}];
BubbleChart3D[d]


In this first example, the volume of the bubbles is proportional to the fourth element. To represent the fourth dimension with colors, we can do this:

BubbleChart3D[d,
BubbleSizes -> {0.02, 0.02},
ColorFunction -> (ColorData["TemperatureMap"][#4] &)]


-

Quick & dirty, the color represents the fourth coordinate :

d = RandomReal[{0, 1}, {100, 4}];
Block[{i = 1},
ListPointPlot3D[d[[All, ;; 3]],
ColorFunction -> Function[{x, y, z}, ColorData["TemperatureMap"][d[[i++, 4]]]],
PlotStyle -> Directive[PointSize[Large]]]]


-
after importing in mathematica, our data form is:{{x1,y1,z1,dos1},{x2,y2,z2,dos2},...} are you sure i can plot these data with this commands?? –  ali Sep 19 '13 at 21:07
@ali Take a look at his example data using d[[1 ;; 5]] -- it is exactly in this format. –  Pickett Sep 19 '13 at 21:13
Ok, Thanks a lot! –  ali Sep 19 '13 at 21:53

How about a grid of x vs y combinations. Here is an example in R http://gettinggeneticsdone.blogspot.ca/2011/07/ Not difficult to do in Mathematica also, just not automatic.

a = Table[RandomReal[], {x, 1, 3}, {y, 1, 3}];
x = Table[RandomReal[], {x, 1, 3}, {y, 1, 100}];
y = a.x;

Table[ListPlot[Thread[{y[[i]], y[[j]]}], PlotLabel -> {i, j}], {i, 1,
3}, {j, 1, 3}] // Grid


-
Ian, RandomReal[] can receive parameters, so it's unnecessary to wrap it with a table. You can make your y in a single line. As for the charts, here's a more elegant example: wolfram.com/mathematica/new-in-9/… –  Gregory Klopper Sep 20 '13 at 0:51
Yes and yes. Good example. My example is obviously just thrown together. –  Ian Schumacher Sep 20 '13 at 1:03