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 have a list of values of the form {{a_1,b_1,c_1},{a_2,b_2,c_2}...} where a goes from 0 to 30, b goes from 0 to 30, and c goes from 0 to .05. For some reason, when I plot this using ListPlot3D I get ranges of 1 to 4, 0 to 40, and 0 to 500 respectively (the number of data points that I am plotting.

The exact command that I am using is: ListPlot3D[data,PlotRange->{Full,Full,Full},AxesLabel->{"Length","Distance","Time"}]

Does anyone know what might be the issue?

Note: If anyone wants to look at the actual data, I posted it here.

share|improve this question
1  
In your data you give four elements $\{\{a_1,b_1,c_1,d_1\},...\}$ what's the last one for? –  Spawn1701D Apr 29 '13 at 8:10
1  
You can get only the first three using data[[All, 1 ;; 3]] –  PlatoManiac Apr 29 '13 at 8:12
    
@Spawn1701D wow, not sure how I missed that –  soandos Apr 29 '13 at 8:18
    
@PlatoManiac fixed it. Do you mind explaining why I got the behavior that I did in an answer? –  soandos Apr 29 '13 at 8:20
    
@soandos if you check the manual you will see that you gave him to make the 3D plot of an array of height values. –  Spawn1701D Apr 29 '13 at 8:26

1 Answer 1

up vote 5 down vote accepted

Do you mind explaining why I got the behavior that I did in an answer?

There is more than one input syntax for ListPlot3D:

enter image description here

When you use data of the form {{_, _, _, _} ..} the last definition is used.

For example, with:

dat = Table[{x + Cos[x], x + Sin[x], Sqrt[x], x}, {x, 0, 30, 0.1}];

Of which the ranges are:

{Min@#, Max@#} & /@ Transpose[dat]
{{1., 30.1543}, {0., 29.012}, {0., 5.47723}, {0., 30.}}

You will get a plot like:

enter image description here

This is displaying the values (axis 0,10,20,30) for each column (axis 1,2,3,4) over the {x, 0, 30, 0.1} slices (axis 0,100,200,300).

share|improve this answer

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.