Plotly Hall of Fame

of 3d graphs

In [1]:
import plotly.plotly as py
In [2]:
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')
In [3]:
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')
)
In [4]:
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
)
In [6]:
fig = dict(data=data, layout=layout)
py.iplot(fig, validate=False, filename='3d-hall-of-fame')
Out[6]:



To learn more about Plotly's Python API

Refer to

Got Questions or Feedback?

About Plotly

  • email: [email protected]
  • tweet: @plotlygraphs

Notebook styling ideas

Big thanks to


In [7]:
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()))