import plotly.plotly as py
jackp1724 = py.get_figure('https://plot.ly/~jackp/1724')
matlab_user_guide1963 = py.get_figure('https://plot.ly/~matlab_user_guide/1963')
JodyMcintyre68 = py.get_figure('https://plot.ly/~JodyMcintyre/68/meow/')
matlab_user_guide2079 = py.get_figure('https://plot.ly/~matlab_user_guide/2079')
def set_scene_key(data, scene_key):
for trace in data:
trace.update({'scene': scene_key})
return [trace for trace in data]
data = (
set_scene_key(jackp1724['data'], 'scene') +
set_scene_key(matlab_user_guide1963['data'], 'scene2') +
set_scene_key(JodyMcintyre68['data'], 'scene3') +
set_scene_key(matlab_user_guide2079['data'], 'scene4')
)
def set_scene_domain(scene_layout, domain):
scene_layout.update({'domain': domain})
return scene_layout
layout = dict(
title='3D graph Hall of Fame',
scene=set_scene_domain(jackp1724['layout']['scene'],
{'x': [0,0.5], 'y':[0.5,1]}),
scene2=set_scene_domain(matlab_user_guide1963['layout']['scene'],
{'x': [0.5,1], 'y':[0.5,1]}),
scene3=set_scene_domain(JodyMcintyre68['layout']['scene'],
{'x': [0,0.5], 'y':[0,0.5]}),
scene4=set_scene_domain(matlab_user_guide2079['layout']['scene'],
{'x': [0.5,1], 'y':[0,0.5]}),
showlegend=False
)
fig = dict(data=data, layout=layout)
py.iplot(fig, validate=False, filename='3d-hall-of-fame')
Refer to
About Plotly
Big thanks to
from IPython.display import display, HTML
import urllib2
url = 'https://raw.githubusercontent.com/plotly/python-user-guide/master/custom.css'
display(HTML(urllib2.urlopen(url).read()))