5
$\begingroup$

I've generated an array of datapoints depending on three Variables and need to plot them in a comprehensive way. Easier than dividing the data into subplots of fixed variables, ListContourPlot3D seems ideal, but when I give it my data, the plot is only a fracture of what it ought to be.

Some of the data plus what it looks like with ListContourPlot3D follow:

data = {{0., 0.6, 0.1, 9.02376}, {0.1, 0.6, 0.1, 8.93916}, {0.2, 0.6, 
0.1, 8.80622}, {0.3, 0.6, 0.1, 8.65599}, {0.4, 0.6, 0.1, 
8.49005}, {0.5, 0.6, 0.1, 8.30524}, {0., 0.6, 0.125, 
9.36876}, {0.1, 0.6, 0.125, 9.2633}, {0.2, 0.6, 0.125, 
9.10647}, {0.3, 0.6, 0.125, 8.92603}, {0.4, 0.6, 0.125, 
8.72415}, {0.5, 0.6, 0.125, 8.49606}, {0., 0.6, 0.15, 
9.69016}, {0.1, 0.6, 0.15, 9.56779}, {0.2, 0.6, 0.15, 
9.39245}, {0.3, 0.6, 0.15, 9.18576}, {0.4, 0.6, 0.15, 
8.95025}, {0.5, 0.6, 0.15, 8.68054}, {0., 0.6, 0.175, 
9.99355}, {0.1, 0.6, 0.175, 9.85979}, {0.2, 0.6, 0.175, 
9.66627}, {0.3, 0.6, 0.175, 9.43681}, {0.4, 0.6, 0.175, 
9.17087}, {0.5, 0.6, 0.175, 8.85835}, {0., 0.6, 0.2, 
10.288}, {0.1, 0.6, 0.2, 10.1382}, {0.2, 0.6, 0.2, 9.92939}, {0.3,
 0.6, 0.2, 9.68042}, {0.4, 0.6, 0.2, 9.38528}, {0.5, 0.6, 0.2, 
9.03451}, {0., 0.65, 0.1, 14.0645}, {0.1, 0.65, 0.1, 
13.9296}, {0.2, 0.65, 0.1, 13.7189}, {0.3, 0.65, 0.1, 
13.4791}, {0.4, 0.65, 0.1, 13.2114}, {0.5, 0.65, 0.1, 
12.9109}, {0., 0.65, 0.125, 14.5799}, {0.1, 0.65, 0.125, 
14.42}, {0.2, 0.65, 0.125, 14.1798}, {0.3, 0.65, 0.125, 
13.8999}, {0.4, 0.65, 0.125, 13.5808}, {0.5, 0.65, 0.125, 
13.2154}, {0., 0.65, 0.15, 15.0401}, {0.1, 0.65, 0.15, 
14.8655}, {0.2, 0.65, 0.15, 14.6062}, {0.3, 0.65, 0.15, 
14.2938}, {0.4, 0.65, 0.15, 13.931}, {0.5, 0.65, 0.15, 
13.5054}, {0., 0.65, 0.175, 15.4499}, {0.1, 0.65, 0.175, 
15.2701}, {0.2, 0.65, 0.175, 14.9995}, {0.3, 0.65, 0.175, 
14.667}, {0.4, 0.65, 0.175, 14.2631}, {0.5, 0.65, 0.175, 
13.7835}, {0., 0.65, 0.2, 15.8229}, {0.1, 0.65, 0.2, 
15.6382}, {0.2, 0.65, 0.2, 15.3644}, {0.3, 0.65, 0.2, 
15.0176}, {0.4, 0.65, 0.2, 14.5846}, {0.5, 0.65, 0.2, 
14.0517}, {0., 0.7, 0.1, 22.4445}, {0.1, 0.7, 0.1, 22.2317}, {0.2,
 0.7, 0.1, 21.8923}, {0.3, 0.7, 0.1, 21.5039}, {0.4, 0.7, 0.1, 
21.0666}, {0.5, 0.7, 0.1, 20.5716}, {0., 0.7, 0.125, 
23.1974}, {0.1, 0.7, 0.125, 22.9468}, {0.2, 0.7, 0.125, 
22.5688}, {0.3, 0.7, 0.125, 22.1247}, {0.4, 0.7, 0.125, 
21.6122}, {0.5, 0.7, 0.125, 21.018}, {0., 0.7, 0.15, 
23.829}, {0.1, 0.7, 0.15, 23.5723}, {0.2, 0.7, 0.15, 
23.1775}, {0.3, 0.7, 0.15, 22.6952}, {0.4, 0.7, 0.15, 
22.1217}, {0.5, 0.7, 0.15, 21.4387}, {0., 0.7, 0.175, 
24.3628}, {0.1, 0.7, 0.175, 24.113}, {0.2, 0.7, 0.175, 
23.7226}, {0.3, 0.7, 0.175, 23.2226}, {0.4, 0.7, 0.175, 
22.6006}, {0.5, 0.7, 0.175, 21.8388}};

Then the plot:

ListContourPlot3D[data, PlotRange -> {{0., 0.5}, {.6, .7}, {.1, .2}},
    DataRange -> {{0, 0.5}, {.6, .7}, {.1, .2}}, Contours -> 9,
    PlotLegends -> "Expressions", AxesLabel -> {"r", "l", "w"}]

Output of ListContourPlot3D

$\endgroup$
6
  • $\begingroup$ This is not so difficult ListPlot3D[#[[All, 2 ;;]] & /@ GatherBy[data, #[[1]] &], PlotTheme -> "Detailed"]. $\endgroup$ Aug 5, 2015 at 15:02
  • $\begingroup$ The data you present is pretty coarse-grained, which may make it difficult to present and interpret a 3D contour plot. Since you seem to be able to generate your data from calculations, have you tried to calculate a much more fine-grained set? Alternatively, have you tried increasing the number of contour lines you requested? $\endgroup$
    – MarcoB
    Aug 5, 2015 at 16:09
  • $\begingroup$ @b.gatessucks thanks, that made a different chapter of the analysis much shorter, but here i'm trying to have the first three variables be the axes and the (ungatherable) 4th value make up the contours. $\endgroup$ Aug 6, 2015 at 6:24
  • $\begingroup$ @MarcoB it's a FE Computation, so I could of course generate finer data, but that up there is just only about half the points to keep the post readable, also, those that i have took over 30 hours to generate, and i'd like to be done with this assignment by the end of the week ;-) $\endgroup$ Aug 6, 2015 at 6:24
  • 1
    $\begingroup$ OK, so have you tried to increase the number of contours requested? Did that make any difference? $\endgroup$
    – MarcoB
    Aug 6, 2015 at 12:25

1 Answer 1

6
$\begingroup$

I wonder if a representation such as the following might help you to present your data:

ListSliceContourPlot3D[
 data, {"YStackedPlanes", 10},
 ContourShading -> Directive[Gray, Opacity[0.2]],
 Lighting -> {{"Ambient", White}}, PlotRange -> All,
 AxesLabel -> (Style[#, Bold, FontSize -> 14] & /@ {"r", "l", "w"}),
 ImageSize -> Large
]

Mathematica graphics

$\endgroup$
2
  • $\begingroup$ One of my favorite new functions. Of course, I wanted to rotate it, but being a static image ... +1, btw. $\endgroup$
    – rcollyer
    Aug 6, 2015 at 15:14
  • $\begingroup$ Not exactly what I was looking for, but pretty neat! $\endgroup$ Aug 10, 2015 at 6:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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