Message Boards Message Boards


[✓] Why ListPlot3D does not show the z values?

Posted 10 months ago
5 Replies
2 Total Likes

I wanted to display something simple with ListPlot3D. I started out with these values:

a = b = c = 0.01; 
cnt = 2;
xmin = -3*a; xmax = 8.9*a; dx = N[Pi/300/cnt^2];
ymin = -2*b; ymax = 2*b; dy = N[Pi/300/cnt^2];
zmin = -6*c; zmax = 4*c; dz = N[Pi/300/cnt^2];

Then I created this list:

lrbmfdxcor = 
  Flatten[ParallelTable[{x, y, z}, {x, xmin, xmax, dx}, {y, ymin, 
     ymax, dy}, {z, zmin, zmax, dz}], 2]; 

It looks like this: enter image description here

Then I tried to display it with ListPlot3D. I got this, /seeing on edge/: enter image description here

What am I not doing right?

Thanks ahead, János

5 Replies

Because for some x,y points you have multiple values… For example your first two data points are both for -0.03, -0.02. I'm not sure what you want to visualize, but you might need ListContourPlot3D or a dimensions reduction.

Posted 10 months ago

Yes, I know. These are some Mesh Points and I just wanted to see them without the value assigned to them. The Documentation does not say that all {xi,yi,} values must be different, so I assumed ListPlot3D has the built in intelligence to display minimum one zi value for the many same xi,yi points.

Try ListPointPlot3D.

I thought of this too, but that would just be a space filled with points? I mean, it could be… but looks like a strange thing to want?

Posted 10 months ago

That is a good one. In the meantime I went along with:

Graphics3D[Point[lrbmfdxcor], PlotRange -> All].

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract