{
"metadata": {
"name": "",
"signature": "sha256:7bc679b9eef84919ce43769f8f2353fe56b748c5d6b38d3691a2fa252df2b0c2"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Plotly Hall of Fame "
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"of 3d graphs"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import plotly.plotly as py"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 1
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"jackp1724 = py.get_figure('https://plot.ly/~jackp/1724')\n",
"matlab_user_guide1963 = py.get_figure('https://plot.ly/~matlab_user_guide/1963')\n",
"JodyMcintyre68 = py.get_figure('https://plot.ly/~JodyMcintyre/68/meow/')\n",
"matlab_user_guide2079 = py.get_figure('https://plot.ly/~matlab_user_guide/2079')"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 2
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"def set_scene_key(data, scene_key):\n",
" for trace in data:\n",
" trace.update({'scene': scene_key})\n",
" return [trace for trace in data]\n",
"\n",
"data = (\n",
" set_scene_key(jackp1724['data'], 'scene') +\n",
" set_scene_key(matlab_user_guide1963['data'], 'scene2') +\n",
" set_scene_key(JodyMcintyre68['data'], 'scene3') +\n",
" set_scene_key(matlab_user_guide2079['data'], 'scene4')\n",
")"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 3
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"def set_scene_domain(scene_layout, domain):\n",
" scene_layout.update({'domain': domain})\n",
" return scene_layout\n",
"\n",
"layout = dict(\n",
" title='3D graph Hall of Fame',\n",
" scene=set_scene_domain(jackp1724['layout']['scene'], \n",
" {'x': [0,0.5], 'y':[0.5,1]}),\n",
" scene2=set_scene_domain(matlab_user_guide1963['layout']['scene'], \n",
" {'x': [0.5,1], 'y':[0.5,1]}),\n",
" scene3=set_scene_domain(JodyMcintyre68['layout']['scene'], \n",
" {'x': [0,0.5], 'y':[0,0.5]}),\n",
" scene4=set_scene_domain(matlab_user_guide2079['layout']['scene'], \n",
" {'x': [0.5,1], 'y':[0,0.5]}),\n",
" showlegend=False\n",
")"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 4
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"fig = dict(data=data, layout=layout)\n",
"py.iplot(fig, validate=False, filename='3d-hall-of-fame')"
],
"language": "python",
"metadata": {},
"outputs": [
{
"html": [
""
],
"metadata": {},
"output_type": "pyout",
"prompt_number": 6,
"text": [
""
]
}
],
"prompt_number": 6
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
\n",
"
"
]
},
{
"cell_type": "heading",
"level": 3,
"metadata": {},
"source": [
"To learn more about Plotly's Python API"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Refer to\n",
"\n",
"* our online documentation page or\n",
"* our User Guide."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"
\n",
"
\n",
"\n",
" Got Questions or Feedback?
\n",
"\n",
"About Plotly\n",
"\n",
"* email: feedback@plot.ly \n",
"* tweet: \n",
"@plotlygraphs\n",
"\n",
"Notebook styling ideas
\n",
"\n",
"Big thanks to\n",
"\n",
"* Cam Davidson-Pilon\n",
"* Lorena A. Barba\n",
"\n",
"
"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"from IPython.display import display, HTML\n",
"import urllib2\n",
"url = 'https://raw.githubusercontent.com/plotly/python-user-guide/master/custom.css'\n",
"display(HTML(urllib2.urlopen(url).read()))"
],
"language": "python",
"metadata": {},
"outputs": [
{
"html": [
"\n",
"\n"
],
"metadata": {},
"output_type": "display_data",
"text": [
""
]
}
],
"prompt_number": 7
}
],
"metadata": {}
}
]
}