# How to understand the data set with 3D Surface xyz axis?

In this demo: https://plot.ly/python/3d-surface-plots/

The dataset is z_data = pd.read_csv(â€˜https://raw.githubusercontent.com/plotly/datasets/master/api_docs/mt_bruno_elevation.csvâ€™)

and itâ€™s transformed to Numpy-array
by â€˜z=z_data.as_matrix()â€™

the z_data is a dataframe with 25 rows x 25 columns, whatâ€™s the relationship with x y z axis?

As I understand, the xyz axis should be 3 list, just like the 3D scatter.

I usually think about it by imagining the 25 x 25 matrix as pin impression art where the height of the pin at row i, column j is determined by the value at row i, column j in the matrix. While it is possible to create a surface plot from a list of points in 3-space like you mentioned, it is easier to do it using a 2-D matrix.

Did not explain the data structure used by 3D surface.

Hi,
I think you can easily visualize the data-set in terms of x, y, z in the following format.
The z and y axis can be index of the [25*25] and z values are the actual values in matrix.

Example- The element at [0,5] in matrix is 55, then x = 0, y= 5, z= 55.

Hope this helps.