3
$\begingroup$

I have a two-dimensional (100 x 100) matrix of real values z $\in$ [0,1]. I'm interested in displying these values in a three-dimensional plot of {x,y,z} in which the x- and y-axes themselves range from 0 to 1.

Obviously, a very basic/elementary question, but I don't quite see how to get the x- and y-axes scaled as desired.

Are some options for ListPlot3D available for such a purpose?

$\endgroup$

1 Answer 1

6
$\begingroup$

Try DataRange:

vals = RandomReal[{0, 1}, {100, 100}];
ListPlot3D[vals, DataRange -> {{0, 1}, {0, 1}}]

enter image description here

$\endgroup$
1
  • $\begingroup$ OK, thanks. Now vals = RandomReal[{0, 1}, {100, 100}]; ListPlot3D[vals, DataRange -> {{0, 1}, {0, 1}}, AxesLabel -> {"x", "y", "z"}] gives me the form of plot I desire. $\endgroup$ Dec 19, 2021 at 17:11

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