Visualizing 3D data


In [1]:
import plotly.tools as tls

In [2]:
tls.embed('https://plot.ly/~marianne2/2555')


Out[2]:

In [3]:
import plotly.plotly as py

In [4]:
fig = py.get_figure('https://plot.ly/~marianne2/2555')

In [5]:
fig['data'][0]['z'][0][:10]


Out[5]:
[0.001053657068,
 0.002120333853,
 0.00320008773,
 0.004292974728,
 0.005399049479999999,
 0.006518365195,
 0.007650973612,
 0.008796924963999999,
 0.009956267937,
 0.01112904964]

In [6]:
fig['layout']


Out[6]:
{'autosize': True,
 'height': 522,
 'showlegend': False,
 'title': 'Mock Entropy',
 'width': 941}

In [7]:
fig['data'][0]['colorscale']


Out[7]:
[[0, 'rgb(5, 10, 172)'],
 [0.35, 'rgb(106, 137, 247)'],
 [0.5, 'rgb(190,190,190)'],
 [0.6, 'rgb(220, 170, 132)'],
 [0.7, 'rgb(230, 145, 90)'],
 [1, 'rgb(178, 10, 28)']]

In [8]:
fig['data'][0]['colorscale'] = 'Viridis'

In [9]:
py.iplot(fig, filename='mock-entropy-viridis')


Out[9]:

Do you think viridis is a better colorscale in this case?