Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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??

share|improve this question
1  
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
1  
@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
add comment

3 Answers

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]

bubble1

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] &)]

bubble2

share|improve this answer
add comment

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]]]]

Mathematica graphics

share|improve this answer
    
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
add comment

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

enter image description here

share|improve this answer
    
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.