z на самом деле матрица сетки для оси Z, созданная из значений осей X и Y.
Допустим,
x = [1, 2, 3, 4, 5]
y = [11, 12, 13, 14, 15]
# Let z = x + y, then the values of z would be
z = [[12, 13, 14, 15, 16],
[13, 14, 15, 16, 17],
[14, 15, 16, 17, 18],
[15, 16, 17, 18, 19],
[16, 17, 18, 19, 20],
]
Теперь вы можете нарисовать график поверхности
data = [
go.Surface(
x=x,
y=y,
z=z
)
]
layout = go.Layout(
title='Sample Graph',
)
fig = go.Figure(data=data, layout=layout)
py.iplot(fig, filename='sample-graph')