# aquatic colorscale
cls=[[0, 'rgb(0,0,131)'], [0.125, 'rgb(0,60,170)'], [0.375, 'rgb(5,255,255)'], [0.625, 'rgb(255,255,0)'], [0.875, 'rgb(250,0,0)'], [1, 'rgb(128,0,0)']]
data = Data([ Surface( x=x, y=y, z=z, colorscale=cls ) ])
layout = Layout(
title='waaaaves',
autosize=True,
scene=Scene(
zaxis=ZAxis(range=[-5, 5],domain=[-5, 5],autorange=False,nticks=10,gridcolor='rgb(255, 255, 255)',gridwidth=2,zerolinecolor='rgb(255, 255, 255)',zerolinewidth=2),
xaxis=XAxis(nticks=10,gridcolor='rgb(255, 255, 255)',gridwidth=2,zerolinecolor='rgb(255, 255, 255)',zerolinewidth=2),
yaxis=YAxis(nticks=10,gridcolor='rgb(255, 255, 255)',gridwidth=2,zerolinecolor='rgb(255, 255, 255)',zerolinewidth=2),
bgcolor="rgb(244, 244, 248)"
)
)
fig = Figure(data=data, layout=layout)
# As of Plotly's python package plotly-1.5.0
# 2d contours in 3d plots aren't supported,
# but you can hack them in like this.
# Stayed tuned for updates.
contours = { 'z':{ 'show':True } }
fig['data'][0]['contours'] = contours
# validate = False prevents syntax checking that would complain about the 2d contour hack (see above)
py.iplot(fig, filename='waaaaves', validate=False)