3d plot a matrix

Hi everyone!
I need to 3d plot a matrix. I want to make a 3d (i.e. scatter plot) out of 2d plots of each row of the following matrix:
(Z2 = Pick[Z1, Table[If[OddQ[i + j], 1, 0], {i, 1, 201}, {j, 1, 201}],1] )// TableForm

Any ideas?

The code isn’t complete. Is it a 3D matrix? If so, have you considered using Image3D?

If not, please include a simple example of the kind of data you are trying to visualize.

It’s a 2D matrix but I get a 2D plot from plotting one row (column number vs it’s value) and I would get a 3D plot from plotting all those 2Ds for all rows altogether. I’m not sure how to do that.

Please see the documentation for ListPlot3D:

Is this what you want? What about ListPointPlot?

Without an example, I can only really guess at what you are talking about. If these don’t work, please include:

  1. A simple example of the kind of input you want.
  2. A sketch of the kind of output you want.

Thanks, I plotted the matrix with Listplot3D and now I want to fit a 2D gaussian into that 3D plot. (Using nonlinearmodefit).
Any Ideas?

When asking a new question, it is best to ask it in a new post. This allows other people who might be able to help you to see the new question.

You should not use NonlinearModelFit to estimate the parameters of a Multidimensional Gaussian distribution. You should use EstimateDistribution or something similar.

Once you’ve estimated the distribution you can create a 3D plot using something like:

Plot3D[PDF[MultinormalDistribution[....], x], ..........]

And you can combine plots together using the Show command.

BTW, I can’t guess what your data looks like, but I’m guessing you should use the raw data with Histogram3D instead of a point plot.

This is my data which I 3d plotted and want to fit a 2D gaussian into.