# How can I combine several 2D-plots to one big 3D plot?

So I've been able to make a list given by

list = Table[{xValues, f[xValues, t (*fixed*)]}, {xValues, xmin, xmax}]


For example:

list =
Table[{x, Sin[x/(2*Pi)*1/10]*Cos[1/(2*Pi)]}, {x, 1, 10}]


this list is easily plotted with the command ListPlot[list] (or even ListLinePlot if I wanted some kind of interpolation between my points).

Now if I go to the 3D-case it becomes slightly harder! So I again make my list of data, this time given by:

Plotdata =
Table[{x, y, Sin[x/(2*Pi)*1/10]*Cos[y/(2*Pi)*1/10]}, {x, 1, 10}, {y,
1, 10}]


This now gives me a nested list, and my attempt to plot it with ListPlot3D is futile. I'm wondering if I need to do something special to get this done? My goal would be to get a nice 3D-plot of the whole.

I know I could do it for my example with the regular Plot3D command, but that's just an example, the real case involves a lot of functions which can't be done by the plot-command (or would demand to much time). My problem comes essentially down to the above. I'm hoping someone could help me.

• your list is nested; is this what you want: ListPlot3D[Flatten[Plotdata, 1]? (if so, you might want to look at documentation of ListPlot3D) – Pinguin Dirk Oct 14 '13 at 13:47
• Well that was what I was thinking first to, but it doesn't give the right plot. I used this example to analyze my mistake because then I can compare with Plot3D[Sin[x]*Cos[y],{x,0,2*Pi},{y,0,2*Pi}]. Using the "Flatten" command doesn't give the same result for the plot. So just applying flatten doens't really solve the problem (unfortunately) – Nick Oct 14 '13 at 13:57
• Maybe you want to multiply by 2 * Pi instead of divide? – Michael E2 Oct 14 '13 at 14:01
• or just use: Plotdata = Table[{x, y, Sin[x]*Cos[y]}, {x, 0, 2 Pi, 0.1}, {y, 0, 2 Pi, 0.1}] – Pinguin Dirk Oct 14 '13 at 14:02
• @Nick: see Michael's comment – Pinguin Dirk Oct 14 '13 at 14:22

## 1 Answer

I have extended your range for illustrative purposes. Two ways:

Plot3D[Sin[x/(2*Pi)*1/10]*Cos[y/(2*Pi)*1/10], {x, 1, 100}, {y, 1,
100}]
ListSurfacePlot3D[
Partition[
Flatten@Table[{x, y, Sin[x/(2*Pi)*1/10]*Cos[y/(2*Pi)*1/10]}, {x, 1,
100, 1}, {y, 1, 100, 1}], 3], Mesh -> 10,
MeshFunctions -> {#1 &, #2 &}, BoxRatios -> {1, 1, 0.6},
PlotRange -> All, MaxPlotPoints -> 100] 