Skip to content

Instantly share code, notes, and snippets.

@chriddyp
Created February 17, 2015 03:33
Show Gist options
  • Save chriddyp/e8c21827120220791684 to your computer and use it in GitHub Desktop.
Save chriddyp/e8c21827120220791684 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"metadata": {
"name": "",
"signature": "sha256:0f62d18ea9a334a69058efb1811dca7be298f237d0ba75500a97dec106d6300e"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "code",
"collapsed": false,
"input": [
"import plotly.plotly as py\n",
"from plotly.widgets import GraphWidget\n",
"from plotly.graph_objs import *"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 16
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"g = GraphWidget('https://local.plot.ly/~chris/4')"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 10
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"g"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 11
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"g.plot([{'x': [1,2,3], 'y': [10,3,7]}])"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 12
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"g.plot({\n",
" 'data': [{'x': [1,2,3], 'y': [10,20,30], 'type': 'bar'}],\n",
" 'layout': {'title': 'bar chart'}\n",
"})"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 15
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"g.plot({\n",
" 'data': [Histogram2dContour(x=[1,2,3], y=[10,20,30])],\n",
" 'layout': Layout(title = 'histogram2d contour')\n",
"})"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 18
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"g.plot(py.get_figure('https://plot.ly/~cimar/38'))"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 13
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"fig = py.get_figure('https://plot.ly/~chris/1638')"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 19
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"g.plot(fig)"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 20
},
{
"cell_type": "code",
"collapsed": false,
"input": [],
"language": "python",
"metadata": {},
"outputs": []
}
],
"metadata": {}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment