1
$\begingroup$
a = RandomReal[{-1, 1}, 100];
b = RandomReal[{10, 20}, 100];
c = RandomReal[{100, 200}, 100];
d = RandomReal[{50, 60}, 100*100*100];

I have a simple program which generates 4 sets of data. Now I have to represent these data in a sensible way. The lists a, b and c as dimensions 1 $\times$ 100, and the dimension of d is $ 100^3 $.

We have a difficulty in representing anything beyond 3D space. How to make a sensible plot with these data? Is there anything Mathematica can offer for visualization?

$\endgroup$
2
$\begingroup$

ListDensityPlot3D

Combine a,b,c and d into a list of 4-tuples and use ListDensityPlot3D:

a = RandomReal[{-1, 1}, 100];
b = RandomReal[{10, 20}, 100];
c = RandomReal[{100, 200}, 100];
d = RandomReal[{50, 60}, {100*100*100, 1}];
abcd = Join[Tuples[{a, b, c}], d, 2];
ListDensityPlot3D[abcd, PlotLegends -> Automatic]

enter image description here

Graphics3D

Alternatively, you can use the rescaled version of d with the option VertexColors in Graphics3D:

d = RandomReal[{50, 60}, 100*100*100];
coords = Tuples[{a, b, c}];
colors = ColorData["TemperatureMap"] /@ Rescale[d];
Legended[Graphics3D[{Opacity[.1], Point[coords, VertexColors -> colors]}, 
  ImageSize -> 500, BoxRatios -> 1, Axes -> True], 
 BarLegend[{"TemperatureMap", {50, 60}}]]

enter image description here

BubbleChart

Finally, you can take a random sample of 4-tuples and use it with BubbleChart3D with bubble colors and sizes based on the last dimension of input data:

downsampled = RandomSample[abcd, 10000];
BubbleChart3D[downsampled, BubbleSizes -> {.01, .02}, 
 ChartStyle -> Opacity[.5], ColorFunction -> "TemperatureMap", 
 ChartLegends -> BarLegend[{"TemperatureMap", {50, 60}}]]

enter image description here

$\endgroup$
  • $\begingroup$ I was trying to visualize variation of d with respect to a, b, c . Meaning a in x axis, b in y-axis and c in the z-axis , and somehow to put a point in this 3D plot which represents d $\endgroup$ – acoustics Nov 24 '18 at 15:59
  • $\begingroup$ @acoustics, please see the updated version. $\endgroup$ – kglr Nov 24 '18 at 16:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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