Hey there Community,
I have a problem regarding data processing and plot creation.
My task is to merge 9 sets of data, each corresponding to a 3D-Plot, in one big 3D-Plot.
The data is given in an 3x3 pattern.
1 2 3
4 5 6
7 8 9
The idea i had was to add the data and provide the x and y values with a corresponding offset.
Can anyone help?
Cheers,
Paul
sghuisman
(Sander Huisman)
2
You’re problem is not very clear, please read the rules/guide READ FIRST: How to post and use Wolfram Community . Provide your code/data and the expected outcome.
3x3 pattern is kinda unclear; You might need ArrayFlatten, Flatten, Grid, or Partition or … those functions come to mind…
given a list of 9 separate Graphics3D
g={ Graphics3D_1, Graphics3D_2, …}
you could use
Show [ g ]
note also: Graphics3D[ { g[[1]], g[[2]], … } ]
mthiel
(Marco Thiel)
4
Hi Paul,
this might be true only up to some permutation of indices, but might work as a general idea. Suppose you have a 9 3D-images:
Table[Image3D[RandomReal[1, {3, 3, 3}]], 9]
or better just the raw data.
We now use Partition to get it into a 3 by 3 array, and then flatten appropriately (I hope, please check whether the levels in Flatten are correct):
Image3D[Transpose[Flatten[#, 1] & /@ Transpose[Flatten[#, 1] & /@ Partition[Table[RandomReal[1, {3, 3, 3}], 9], 3]]]]

Cheers,
Marco
The solution of Marco Thiel is exactly what i am looking for. The Problem with it is just, that i do not have 3D-Images, but 9 times a “ListPlot3D”.
Thanks for your effort!
mthiel
(Marco Thiel)
6
Hi Paul,
I am not sure what you really want to achieve. Is this here what you want?
GraphicsGrid[Partition[Table[ListPlot3D[RandomReal[1, {60, 3}]], {9}], 3]]
This is kind of in a “single” 3 by 3 plot. If you want all of them in one single plot (which is not what I think you need) you might simply want:
colorschemes = RandomSample[ColorData["Gradients"], 9]
Show[Table[ListPlot3D[RandomReal[1, {60, 3}], ColorFunction -> colorschemes[[i]]], {i, 9}]]
Best wishes,
Marco
Not really.
In yourfirst example you created nine 3D-Images and merged them to one in a 3x3 pattern.
This is what i need to do, but with 9 datasets, each giving a 3D-ListPlot.
I hope, this helps you understand my problem!
Cheers
mthiel
(Marco Thiel)
8
Ok, another attempt. Given 9 datasets:
data = Table[RandomReal[1, {60, 3}], {9}];
Combine the data:
datacombined = Table[Plus[#, {i - 1, j - 1, 0}] & /@ (Partition[data, 3][[i, j]]), {i, 1, 3}, {j, 1, 3}];
Plot the data:
ListPlot3D[Flatten[datacombined, 2]]
I think this is exactly what i was looking for!
Thank you!