Skip to content

Instantly share code, notes, and snippets.

@msund
Created June 27, 2014 08:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save msund/c6fddc92dcff392ef335 to your computer and use it in GitHub Desktop.
Save msund/c6fddc92dcff392ef335 to your computer and use it in GitHub Desktop.
NB for polar charts
{
"metadata": {
"name": "Untitled0"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": "Polar charts in MATLAB, <br> R, Python and the web"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "Plotly's [APIs](https://plot.ly/api) and [web app](https://plot.ly) let you collaboratively make and share plots online. We've just added polar charts to our graphing library. From [Wikipedia](http://en.wikipedia.org/wiki/Radar_chart):\n\n>\"A radar chart is a graphical method of displaying multivariate data in the form of a two-dimensional chart of three or more quantitative variables represented on axes starting from the same point.\"\n\nIn this IPython Notebook, we'll be plotting with our Python, [R](https://plot.ly/R), and [MATLAB](https://plot.ly/MATLAB) APIs. You can also use [our web app](https://plot.ly) to edit your plots (even if made with the API), make plots, analyze your data, and collaborate in the browser.\n\n<a href=\"http://imgur.com/4lczVk3\"><img src=\"http://i.imgur.com/4lczVk3.png?1\" title=\"Hosted by imgur.com\" /></a>"
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": "<br>I. Polar Charts in Python"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "If you'd like to run Plotly, you can use our public keys (shown below) or [sign-up](https://plot.ly/ssu). It's free, you own your data and control your privacy, and you don't need to install or download. \n\nYou can copy and paste this code right into a NB or console. Install by running `$ pip install plotly` or if that doesn't work try `$ sudo pip install plotly`. For more on installation and the Python API, check out our [user guide](http://nbviewer.ipython.org/github/plotly/python-user-guide/blob/master/s00_homepage/s00_homepage.ipynb#Table-of-Contents:). You'll want to import Plotly or update it if you've installed before, sign in, and then we can get started. "
},
{
"cell_type": "code",
"collapsed": false,
"input": "import plotly\nplotly.__version__ ",
"language": "python",
"metadata": {},
"outputs": [
{
"metadata": {},
"output_type": "pyout",
"prompt_number": 1,
"text": "'1.0.34'"
}
],
"prompt_number": 1
},
{
"cell_type": "code",
"collapsed": false,
"input": "import plotly.plotly as py \nimport plotly.tools as tls\npy.sign_in(\"IPython.Demo\", \"1fw3zw2o13\")",
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 2
},
{
"cell_type": "markdown",
"metadata": {},
"source": "Now we'll make our first plot. "
},
{
"cell_type": "code",
"collapsed": false,
"input": "import plotly.plotly as py\nfrom plotly.graph_objs import *\n\npy.sign_in(\"IPython.Demo\", \"1fw3zw2o13\")\n\ntrace1 = Scatter(\n r=[6.804985785265978, 3.389596010612268, 5.3814721107464445, 8.059540219420184, 5.318229227868589, 2.9850999356273773, 1.9665870023752283, 6.769265408206589, 4.073401898721205, 6.50437182526841, 7.556369818996649, 4.047456094066775, 7.386662496070009, 5.413624736983931, 7.470716531163242, 7.982110216939738, 4.737814080093381, 4.206453042929911, 5.478604804594065, 4.824520280697772, 5.599600609899737, 6.8667952170824735, 3.0856713662561464, 7.771810943227382, 3.6877944350967193, 5.360356685192225, 5.140446739300986, 6.045445680928888, 6.833920940193708, 3.6207694625408364, 3.9894305834039687, 5.3118244995018, 4.608213480282062, 6.640584716151912, 3.055188854482986, 7.492564163752965, 5.4850781777896715, 3.8977949966209358, 5.976245114026165, 5.447061560910957, 5.37703411681004, 4.690805787731301, 4.711640491184845, 3.629919329394875, 5.957668076372498, 5.357121284391151, 3.849235282821748, 6.250507136319218, 7.122243357145468, 3.399404233835391, 3.5105566722713313, 4.100997603660974, 4.096382100199779, 6.233583074805102, 3.939488526772935, 3.9254450773976983, 6.118132501462698, 3.9404503462852323, 7.583015573261159, 3.513202145338516],\n t=[-30.352944361883697, -25.611459854524096, -12.425227452676078, 13.96138051872652, -4.9509328406707445, -25.692274190905437, 12.46876416157031, -4.913764107032951, -10.967380287631935, 30.814194054910676, 2.4749594311442737, 17.97554375239156, 0.7711305933623585, 6.137488485631386, -14.451963574013497, 28.184534112915948, 12.538680065954864, -8.983230337131154, 5.231285164762417, -64.48900253584051, 11.357486681772649, 3.4540747915125176, 13.924346613092862, -25.364002046782343, -16.81800638602268, -10.260051030559755, -13.212134125591882, 2.5793388653025744, 8.717574965852519, -10.675498719239487, -2.926366012522306, 25.195880754767717, 40.59032932155964, -9.121433630189772, -24.297362381339184, -3.1769445056889345, 10.85049841917252, -31.33205974736701, 4.849567462214266, 15.048276954124187, 3.2951046992599635, -6.197091873129837, -8.77857413578066, 29.549174119407287, -5.1374487928814645, 23.02686048794348, -6.634816578371129, 2.7550149918614695, 21.733250113653973, -24.816994960101756, -7.83054706253201, 28.325796210205855, 12.300977467795988, -21.563157240034112, -19.335516283813288, 26.146443170846787, -1.7060712026841085, 16.071723694996702, 2.053266302846965, -5.097911612332572],\n mode='markers',\n name='Trial 1',\n marker=Marker(\n color='rgb(27,158,119)',\n size=110,\n line=Line(\n color='white'\n ),\n opacity=0.7\n )\n)\ntrace2 = Scatter(\n r=[3.488043923008057, 2.9184785763552368, 4.201827359971069, 8.227324606851074, 4.776690427237194, 3.041912303114453, 4.789947719076336, 5.663880780360856, 3.858262393172743, 8.260212881141047, 6.868624486428106, 5.7401975996748895, 6.594979282458134, 5.692703778211614, 5.337916574462772, 9.283604185175781, 5.7645908931363365, 4.028864552051332, 5.662344748373121, 0.42283723110061455, 6.201266463929336, 6.43926538131984, 5.096758513060891, 4.632081908733815, 3.4218461363102217, 4.369404703352921, 4.02833441941273, 5.80576719754376, 6.848189921425055, 3.8092955127795802, 4.385268183833586, 6.98332684554596, 7.396273186029126, 5.215125003141, 3.0861487792429205, 6.335394491488218, 6.0904147140584834, 2.4480560069033306, 5.942784020305152, 6.373129885590045, 5.454205341176391, 4.393337616563476, 4.2059446799773, 6.155542287959513, 5.119087171162872, 6.869860830828341, 4.104599860575049, 5.954348125582761, 8.092332877153778, 2.9617697054526295, 3.974012187582175, 6.373384128907529, 5.415409143179902, 3.876890919980343, 3.261446947424557, 6.145808529699159, 5.502451987192818, 5.571553295311899, 6.853049261089887, 4.140355074942654],\n t=[14.80662578088746, 79.00634037258273, 49.02206554130045, 49.69908313603149, 54.137491082859476, 86.41932102054662, 96.95239193571373, 41.463488263612184, 67.13769169339066, 68.06103943971128, 42.68193032273406, 76.39865660811795, 42.19479347220856, 59.57788897461255, 27.510866799296068, 60.7534448322685, 68.37083279914752, 65.74802814945305, 58.53300837209963, -176.7441064584909, 61.17401857996598, 47.4515085890397, 84.4266531857914, 12.479346550525074, 72.48080276184626, 50.578831757750606, 51.560228240214684, 52.43785618126272, 51.586827992137934, 73.87294477733714, 70.21705692787259, 70.71429915430754, 82.23439442637098, 38.93539044700985, 84.7093666701594, 38.16582843645038, 61.70405365378903, 70.19695629244305, 54.454292590141606, 64.33489496861428, 58.273893146586325, 60.49982239038519, 59.155232538950266, 83.86561846759426, 47.87340989732011, 69.28260156593979, 71.1899104286971, 51.04839646304676, 59.427582415206295, 78.59873696166098, 75.75586451521559, 79.97048372322382, 73.89378024632016, 31.733411131690488, 68.08475117701943, 80.41107997857199, 48.92425070886502, 76.65025575535202, 42.18286436288056, 76.03333589453311],\n mode='markers',\n name='Trial 2',\n marker=Marker(\n color='rgb(217,95,2)',\n size=110,\n line=Line(\n color='white'\n ),\n opacity=0.7\n )\n)\ntrace3 = Scatter(\n r=[1.855870835032611, 5.2869620620428215, 3.886013391943573, 6.282863313001057, 4.4534148477405155, 5.688008050761193, 7.330864282608489, 3.825660594787748, 4.989604176963506, 7.8974314697670955, 4.6566931130229525, 6.667153696311044, 4.4310062871369515, 5.346113253377259, 2.4799456958789263, 8.113477348526397, 6.081311682312096, 4.968216896207305, 5.24445392063028, 5.422207884171506, 5.792774616023354, 4.787580592225452, 6.784318637182092, 1.10893690948093, 5.138911105244, 4.042929657287297, 4.022892029681135, 4.828428791305017, 5.417378374307972, 5.378635210668265, 5.421097175459842, 7.1205619788552434, 8.349308539903586, 3.4104855883231204, 5.6283784708757345, 3.9149369761396855, 5.7639402623551526, 4.764374106798512, 5.076236267895072, 6.165558183200791, 5.105576516279834, 4.761036376933375, 4.5962495409437905, 7.504188411346776, 4.107031417919988, 6.920422299379973, 5.349128949563397, 4.798065719385607, 7.023251532304466, 5.283680965457643, 5.569071152430292, 7.383794908447646, 6.269233210443127, 2.656529645009885, 4.843984338804117, 7.247992361555254, 4.372959394411489, 6.570981081360247, 4.602479243892371, 5.6700520508263965],\n t=[151.29425518111282, 147.1880250282001, 125.2821571123002, 87.0672979717481, 119.62789835678657, 147.74082414730458, 139.56459814488954, 101.39149710201973, 134.5601842795838, 104.02444470480259, 89.39314294483763, 123.19403140008181, 91.47434051519816, 113.33237361373538, 96.1499255673322, 93.28073452263222, 118.21556522583221, 132.32293737819631, 112.9411863909871, -179.74623313781393, 110.3035135586484, 97.7508361660772, 131.60808925703367, 115.49691923085226, 140.58118216037175, 123.39666211932598, 128.34200904453573, 107.6088103983526, 97.90468978746796, 137.12844797536522, 130.43124491245027, 112.2270844807976, 118.63020224581525, 106.05822558950737, 146.90810970600344, 90.27734955816595, 111.50528236323856, 151.0897425364386, 107.7213941567982, 111.30085499702685, 114.68027793629503, 126.56937949315531, 128.2189522328928, 125.35485719537647, 112.4180682532985, 111.79735567917727, 133.41805225814235, 105.18411684151033, 97.23103612064705, 146.66803680360073, 136.23931520140337, 121.79184419346764, 123.91132797113666, 129.86224497019268, 141.34395084996186, 123.27096774880371, 108.45882172345216, 124.41237705630053, 89.02711073868319, 134.8767011451154],\n mode='markers',\n name='Trial 3',\n marker=Marker(\n color='rgb(117,112,179)',\n size=110,\n line=Line(\n color='white'\n ),\n opacity=0.7\n )\n)\ntrace4 = Scatter(\n r=[5.3724709243191295, 7.096355572040467, 4.883823903200083, 2.9201354412366496, 4.723963045684014, 7.423693950928521, 8.090946075397593, 3.3068445913715996, 6.050828482522597, 5.530232074438094, 2.47230695264053, 6.275670536862141, 2.6158961737877817, 4.653539944582694, 3.3354400138758, 4.795883604868761, 5.472711346482787, 5.881930490947868, 4.5715870720453795, 9.039861169796675, 4.6429075998956915, 3.1727677357988284, 7.044248138818528, 4.466336514107385, 6.557330289803022, 4.8208494372533615, 5.131915515212963, 3.9700122370488873, 3.4063238128284303, 6.476722963998372, 6.019218509330762, 5.664501534954291, 7.1587585225456705, 3.6007126616736462, 7.324127168758531, 2.552946156245396, 4.727133860387479, 6.971755207182515, 4.076578361066991, 4.946223407006624, 4.642155449043171, 5.3605748644110855, 5.391719067363011, 7.072524305096543, 4.101111570277392, 5.485732621016895, 6.192535286114146, 3.7687113918423396, 4.290311389760529, 7.060195369692179, 6.539691844176445, 6.679744406490943, 6.060825358695814, 4.786574040927106, 6.416686529666599, 6.70328133338789, 3.8888478104797555, 6.308591081194454, 2.4370447709043273, 6.508186347897975],\n t=[-140.20332764140605, -168.084245433406, -166.2851413292181, 138.24886675310003, -174.4243864364084, -169.96048275947723, 176.9918226866201, -169.90141624864253, -172.64158159443713, 142.9516688139347, 172.4157463673128, 168.5193591959272, 177.82205369393654, 172.85519034865231, -146.01452170111628, 128.1772930242011, 169.16707278067625, -173.58857378893256, 173.72699270456877, -151.20610477226074, 166.26047716274937, 172.50756608236046, 173.9491839042747, -131.80684093766672, -170.63527383147678, -168.57708548315375, -166.76550342128579, 176.07048734819648, 162.29750149829133, -174.05574631254976, -178.06092985664986, 156.47126885027095, 155.23914214477145, -163.00052639405448, -170.116713265192, -170.63927248749107, 167.38314369359566, -163.0988170562564, 172.8807370063752, 163.38600768186703, 176.1825419773446, -174.579680173718, -172.33584488196067, 165.33802569398378, -172.52566426066147, 157.54287773943665, -175.88151109326037, 175.42764399370765, 142.06967472256432, -168.3407340189972, -175.8058311226083, 163.06374541935153, 171.72097499708474, -151.40390456860604, -168.2713690903466, 165.04532787828478, -177.3153366647533, 170.04241289697416, 173.59919660957283, -177.25065674571294],\n mode='markers',\n name='Trial 4',\n marker=Marker(\n color='rgb(231,41,138)',\n size=110,\n line=Line(\n color='white'\n ),\n opacity=0.7\n )\n)\ntrace5 = Scatter(\n r=[7.937557871379145, 7.302746491515634, 5.929302221442996, 2.407178713166243, 5.27092188705965, 7.400596127535688, 6.810820338360006, 4.967759034422344, 6.190229370454795, 2.158518657950606, 4.00412589386977, 4.776617321633007, 4.232250451808441, 4.30765487269422, 6.200275172864116, 0.7275138485344722, 4.378006803811767, 6.004964939443091, 4.341931702915758, 10.237982935327496, 3.8021588886978415, 3.96928117013756, 5.7589801424664335, 7.674179069144705, 6.699953533011802, 5.7343103881346, 6.044275915297742, 4.3129430660866035, 3.3775452824133043, 6.367666727269062, 5.737244181549697, 3.3963514719893415, 4.216467481387725, 5.464885016717265, 7.311135577533859, 4.745400769362272, 3.9164685318876504, 7.6029729903258385, 4.125204829441439, 3.6767949496501635, 4.551235788519779, 5.606960531523096, 5.794844257485189, 5.030528155694793, 5.109586240991219, 3.4054402079637396, 6.02630612538526, 4.2211092636354195, 1.9097829365788486, 7.254669393921678, 6.268875872033599, 4.56258056659493, 4.9180579654382806, 6.83656096252698, 6.78648654914422, 4.751014334485786, 4.719926347642004, 4.9278052151809675, 4.059190587394083, 6.128338984290388],\n t=[-101.83378577584543, -127.47839157875458, -112.2442849973417, -82.32591087119675, -114.6888556206928, -130.53786336160334, -145.0102649759552, -98.7488450072409, -124.44174882126121, -152.45411926998403, -89.29423655225057, -139.83245171792495, -91.54359518437012, -119.44216300369413, -92.45583852737828, -129.6599243163198, -131.0512350992248, -123.85291745359059, -118.08673900439605, -121.97921713765797, -121.91502996793754, -99.36184757774758, -141.46770199726927, -93.5662631891479, -126.33690140499776, -112.8349441777883, -114.38647992914663, -109.79607232724634, -102.74326471243563, -128.2467289067651, -127.79209264323043, -142.47362974536523, -161.58729418706835, -99.94061077957295, -130.16311732570668, -90.22881200957039, -122.65049121443685, -123.26775057177692, -111.99730880084306, -127.52831680551732, -117.93129533779559, -120.39163424547179, -119.38687147866949, -149.6746954924951, -107.85051750555007, -138.98993134073962, -127.5954702142739, -107.32083544041386, -117.5738074233824, -127.48166096847307, -129.91203316621693, -148.49521167061027, -135.33164137019145, -104.42165927641673, -123.87544021115426, -146.81682661802307, -107.0584854241401, -138.9025648732907, -88.89688251951031, -130.75446735589105],\n mode='markers',\n name='Trial 5',\n marker=Marker(\n color='rgb(102,166,30)',\n size=110,\n line=Line(\n color='white'\n ),\n opacity=0.7\n )\n)\ntrace6 = Scatter(\n r=[8.46918052789063, 5.821997567373959, 6.1409183282181425, 5.831724284786043, 5.546754471857236, 5.62748770920125, 3.94832897601986, 6.490184614609525, 5.320618245151644, 3.2435930414929843, 6.444085331576761, 3.363778100648707, 6.463116810505407, 4.730944925781221, 7.796578411114142, 4.570127829915901, 3.926206816002813, 5.254348139870139, 4.8384111066133375, 8.694523998982934, 4.39953181821818, 5.8564839051788535, 3.62157703921442, 8.894912373110186, 5.494542836078211, 5.968980890853802, 6.047899573604184, 5.384671396722035, 5.381220018196653, 5.11157462273727, 4.7705611050578, 3.0983308826347407, 1.665083171936659, 6.740258533332946, 5.5944949288820025, 6.879630825669177, 4.382792466280775, 6.410843616485085, 5.154204317772818, 4.01515851865648, 4.9391488682598155, 5.298297314485713, 5.490417176946796, 2.6237512593812404, 5.9535886616652665, 3.3014793719195046, 4.954889001100974, 5.500053669614178, 4.4505123495497285, 5.786624513349857, 4.906834424064605, 2.6299694734469274, 3.769703608047238, 7.396735715500286, 5.7644819019579545, 2.794585195883112, 5.782033269824353, 3.4853519176219963, 6.500653598620165, 4.748640710129176],\n t=[-66.53583632728323, -84.514422676922, -63.339741699567846, -24.146812744223833, -59.70124532256676, -88.06537267996578, -98.44420453532204, -49.15839681719936, -73.63622331202959, -17.923874678608904, -38.41239945460549, -66.34036237792131, -40.88883873919996, -52.46063321002169, -52.61046255912479, -7.039351050913894, -57.23545869215697, -71.64220350197985, -52.345396169095466, -92.78303867354904, -47.18716305503351, -41.969208462875166, -82.14422824993427, -59.43916560317718, -79.19482259319774, -62.29990853531319, -65.53790403937941, -48.9060554475786, -37.74831103800929, -78.05333345828834, -71.87311766307504, -41.891092825900685, -53.11545548549721, -52.997628097314845, -87.0843610179252, -43.61190483837573, -48.79799840560851, -82.56680315713163, -47.90996299570176, -46.57048558531105, -54.5004832176089, -65.90072712679752, -66.87331746360131, -75.48080725209734, -54.777693866880114, -42.5983345913628, -74.50816626907293, -47.11021844342552, -22.356873183328428, -84.19298674498425, -78.50528475620209, -65.0363717923471, -66.51373368133282, -63.52677656175937, -77.80907855131592, -68.51017974013602, -51.296869310885135, -68.33991302765452, -38.631733068443026, -77.85184858511114],\n mode='markers',\n name='Trial 6',\n marker=Marker(\n color='rgb(230,171,2)',\n size=110,\n line=Line(\n color='white'\n ),\n opacity=0.7\n )\n)\ndata = Data([trace1, trace2, trace3, trace4, trace5, trace6])\nlayout = Layout(\n title='Hobbs-Pearson Trials',\n font=Font(\n size=15\n ),\n plot_bgcolor='rgb(223, 223, 223)',\n angularaxis=AngularAxis(\n tickcolor='rgb(253,253,253)'\n )\n)\nfig = Figure(data=data, layout=layout)\n\nplot_url = py.iplot(fig, filename='polar-scatter')",
"language": "python",
"metadata": {},
"outputs": [
{
"html": "<iframe id=\"igraph\" scrolling=\"no\" style=\"border:none;\"seamless=\"seamless\" src=\"https://plot.ly/~IPython.Demo/4022\" height=\"525\" width=\"100%\"></iframe>",
"metadata": {},
"output_type": "display_data",
"text": "<IPython.core.display.HTML at 0x7ffa7d501e90>"
}
],
"prompt_number": 3
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": "II. The data pipeline"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "In \"[The Secret History](http://www.amazon.com/The-Secret-History-Donna-Tartt/dp/1400031702)\" the author mentions the *Iliad's* notion of \"light shining from a dead star.\" Graphs are like that: a brief flash of light and brilliance from a dead dataset. Why is it dead? Because we'll never see or access the data used in plots. The data is buried in an email, desktop folder, or file. It's painful when we can't access data or code from a plot, whether it's one we just made, one we saw on Reddit or in a newspaper, or data from a long-ago published work.\n\nPlotly solves that problem by saving graphs with their related data and JSON structure. You can call the data or figures from your terminal or download a csv from the web app. Append the relevant ending to a URL of any graph--regardless of how it was made--to see it in another language. For example we just made a plot at [plot.ly/~IPython.Demo/4022](https://plot.ly/~IPython.Demo/4022); [plot.ly/~IPython.Demo/4022.py](https://plot.ly/~IPython.Demo/4022.py) gives you the Python script. Check out:\n\n* https://plot.ly/~IPython.Demo/4022.r\n* https://plot.ly/~IPython.Demo/4022.jl\n* https://plot.ly/~IPython.Demo/4022.js\n* https://plot.ly/~IPython.Demo/4022.json"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "That's how to get the script. How does it work to get data or the figure in your terminal? Let's get started."
},
{
"cell_type": "code",
"collapsed": false,
"input": "from plotly.graph_objs import Data, Layout, Figure",
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 4
},
{
"cell_type": "markdown",
"metadata": {},
"source": "If we need help as we're exploring, you can invoke help, for example:"
},
{
"cell_type": "code",
"collapsed": false,
"input": "help(Data)",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": "Help on class Data in module plotly.graph_objs.graph_objs:\n\nclass Data(PlotlyList)\n | A list of traces to be shown on a plot/graph.\n | \n | Any operation that can be done with a standard list may be used with Data.\n | Instantiation requires an iterable (just like list does), for example:\n | \n | Data([Scatter(), Heatmap(), Box()])\n | \n | Valid entry types: (dict or any subclass of Trace, i.e., Scatter, Box, etc.)\n | \n | \n | Quick method reference:\n | \n | Data.update(changes)\n | Data.strip_style()\n | Data.get_data()\n | Data.to_graph_objs()\n | Data.validate()\n | Data.to_string()\n | Data.force_clean()\n | \n | Method resolution order:\n | Data\n | PlotlyList\n | __builtin__.list\n | __builtin__.object\n | \n | Methods defined here:\n | \n | to_graph_objs(self, caller=True)\n | Change any nested collections to subclasses of PlotlyDict/List.\n | \n | Procedure:\n | 1. Attempt to convert all entries to a subclass of PlotlyTrace.\n | 2. Call `to_graph_objects` on each of these entries.\n | \n | ----------------------------------------------------------------------\n | Methods inherited from PlotlyList:\n | \n | __init__(self, *args)\n | \n | force_clean(self, caller=True)\n | Attempts to convert to graph_objs and calls force_clean() on entries.\n | \n | Calling force_clean() on a PlotlyList will ensure that the object is\n | valid and may be sent to plotly. This process will remove any entries\n | that end up with a length == 0. It will also remove itself from\n | enclosing trivial structures if it is enclosed by a collection with\n | length 1, meaning the data is the ONLY object in the collection.\n | \n | Careful! This will delete any invalid entries *silently*.\n | \n | get_data(self)\n | Returns the JSON for the plot with non-data elements stripped.\n | \n | get_ordered(self, caller=True)\n | \n | strip_style(self)\n | Strip style from the current representation.\n | \n | All PlotlyDicts and PlotlyLists are guaranteed to survive the\n | stripping process, though they made be left empty. This is allowable.\n | \n | Keys that will be stripped in this process are tagged with\n | `'type': 'style'` in the INFO dictionary listed in graph_objs_meta.py.\n | \n | This process first attempts to convert nested collections from dicts\n | or lists to subclasses of PlotlyList/PlotlyDict. This process forces\n | a validation, which may throw exceptions.\n | \n | Then, each of these objects call `strip_style` on themselves and so\n | on, recursively until the entire structure has been validated and\n | stripped.\n | \n | to_string(self, level=0, indent=4, eol='\\n', pretty=True, max_chars=80)\n | Returns a formatted string showing graph_obj constructors.\n | \n | Example:\n | \n | print obj.to_string()\n | \n | Keyword arguments:\n | level (default = 0) -- set number of indentations to start with\n | indent (default = 4) -- set indentation amount\n | eol (default = '\n | ') -- set end of line character(s)\n | pretty (default = True) -- curtail long list output with a '...'\n | max_chars (default = 80) -- set max characters per line\n | \n | update(self, changes)\n | Update current list with changed_list, which must be iterable.\n | The 'changes' should be a list of dictionaries, however,\n | it is permitted to be a single dict object.\n | \n | validate(self, caller=True)\n | Recursively check the validity of the entries in a PlotlyList.\n | \n | PlotlyList may only contain suclasses of PlotlyDict, or dictionary-like\n | objects that can be re-instantiated as subclasses of PlotlyDict.\n | \n | The validation process first requires that all nested collections be\n | converted to the appropriate subclass of PlotlyDict/PlotlyList. Then,\n | each of these objects call `validate` and so on, recursively,\n | until the entire list has been validated.\n | \n | ----------------------------------------------------------------------\n | Data descriptors inherited from PlotlyList:\n | \n | __dict__\n | dictionary for instance variables (if defined)\n | \n | __weakref__\n | list of weak references to the object (if defined)\n | \n | ----------------------------------------------------------------------\n | Data and other attributes inherited from PlotlyList:\n | \n | __metaclass__ = <class 'plotly.graph_objs.graph_objs.ListMeta'>\n | A meta class for PlotlyList class creation.\n | \n | The sole purpose of this meta class is to properly create the __doc__\n | attribute so that running help(Obj), where Obj is a subclass of PlotlyList,\n | will return useful information for that object.\n | \n | ----------------------------------------------------------------------\n | Methods inherited from __builtin__.list:\n | \n | __add__(...)\n | x.__add__(y) <==> x+y\n | \n | __contains__(...)\n | x.__contains__(y) <==> y in x\n | \n | __delitem__(...)\n | x.__delitem__(y) <==> del x[y]\n | \n | __delslice__(...)\n | x.__delslice__(i, j) <==> del x[i:j]\n | \n | Use of negative indices is not supported.\n | \n | __eq__(...)\n | x.__eq__(y) <==> x==y\n | \n | __ge__(...)\n | x.__ge__(y) <==> x>=y\n | \n | __getattribute__(...)\n | x.__getattribute__('name') <==> x.name\n | \n | __getitem__(...)\n | x.__getitem__(y) <==> x[y]\n | \n | __getslice__(...)\n | x.__getslice__(i, j) <==> x[i:j]\n | \n | Use of negative indices is not supported.\n | \n | __gt__(...)\n | x.__gt__(y) <==> x>y\n | \n | __iadd__(...)\n | x.__iadd__(y) <==> x+=y\n | \n | __imul__(...)\n | x.__imul__(y) <==> x*=y\n | \n | __iter__(...)\n | x.__iter__() <==> iter(x)\n | \n | __le__(...)\n | x.__le__(y) <==> x<=y\n | \n | __len__(...)\n | x.__len__() <==> len(x)\n | \n | __lt__(...)\n | x.__lt__(y) <==> x<y\n | \n | __mul__(...)\n | x.__mul__(n) <==> x*n\n | \n | __ne__(...)\n | x.__ne__(y) <==> x!=y\n | \n | __repr__(...)\n | x.__repr__() <==> repr(x)\n | \n | __reversed__(...)\n | L.__reversed__() -- return a reverse iterator over the list\n | \n | __rmul__(...)\n | x.__rmul__(n) <==> n*x\n | \n | __setitem__(...)\n | x.__setitem__(i, y) <==> x[i]=y\n | \n | __setslice__(...)\n | x.__setslice__(i, j, y) <==> x[i:j]=y\n | \n | Use of negative indices is not supported.\n | \n | __sizeof__(...)\n | L.__sizeof__() -- size of L in memory, in bytes\n | \n | append(...)\n | L.append(object) -- append object to end\n | \n | count(...)\n | L.count(value) -> integer -- return number of occurrences of value\n | \n | extend(...)\n | L.extend(iterable) -- extend list by appending elements from the iterable\n | \n | index(...)\n | L.index(value, [start, [stop]]) -> integer -- return first index of value.\n | Raises ValueError if the value is not present.\n | \n | insert(...)\n | L.insert(index, object) -- insert object before index\n | \n | pop(...)\n | L.pop([index]) -> item -- remove and return item at index (default last).\n | Raises IndexError if list is empty or index is out of range.\n | \n | remove(...)\n | L.remove(value) -- remove first occurrence of value.\n | Raises ValueError if the value is not present.\n | \n | reverse(...)\n | L.reverse() -- reverse *IN PLACE*\n | \n | sort(...)\n | L.sort(cmp=None, key=None, reverse=False) -- stable sort *IN PLACE*;\n | cmp(x, y) -> -1, 0, 1\n | \n | ----------------------------------------------------------------------\n | Data and other attributes inherited from __builtin__.list:\n | \n | __hash__ = None\n | \n | __new__ = <built-in method __new__ of type object>\n | T.__new__(S, ...) -> a new object with type S, a subtype of T\n\n"
}
],
"prompt_number": 5
},
{
"cell_type": "markdown",
"metadata": {},
"source": "Now, you'll recall we named our figure above `fig`. Let's call the data for it."
},
{
"cell_type": "code",
"collapsed": false,
"input": "my_data = fig.get_data()\nmy_data",
"language": "python",
"metadata": {},
"outputs": [
{
"metadata": {},
"output_type": "pyout",
"prompt_number": 6,
"text": "[{'name': 'Trial 1',\n 'r': [6.804985785265978,\n 3.389596010612268,\n 5.3814721107464445,\n 8.059540219420184,\n 5.318229227868589,\n 2.9850999356273773,\n 1.9665870023752283,\n 6.769265408206589,\n 4.073401898721205,\n 6.50437182526841,\n 7.556369818996649,\n 4.047456094066775,\n 7.386662496070009,\n 5.413624736983931,\n 7.470716531163242,\n 7.982110216939738,\n 4.737814080093381,\n 4.206453042929911,\n 5.478604804594065,\n 4.824520280697772,\n 5.599600609899737,\n 6.8667952170824735,\n 3.0856713662561464,\n 7.771810943227382,\n 3.6877944350967193,\n 5.360356685192225,\n 5.140446739300986,\n 6.045445680928888,\n 6.833920940193708,\n 3.6207694625408364,\n 3.9894305834039687,\n 5.3118244995018,\n 4.608213480282062,\n 6.640584716151912,\n 3.055188854482986,\n 7.492564163752965,\n 5.4850781777896715,\n 3.8977949966209358,\n 5.976245114026165,\n 5.447061560910957,\n 5.37703411681004,\n 4.690805787731301,\n 4.711640491184845,\n 3.629919329394875,\n 5.957668076372498,\n 5.357121284391151,\n 3.849235282821748,\n 6.250507136319218,\n 7.122243357145468,\n 3.399404233835391,\n 3.5105566722713313,\n 4.100997603660974,\n 4.096382100199779,\n 6.233583074805102,\n 3.939488526772935,\n 3.9254450773976983,\n 6.118132501462698,\n 3.9404503462852323,\n 7.583015573261159,\n 3.513202145338516],\n 't': [-30.352944361883697,\n -25.611459854524096,\n -12.425227452676078,\n 13.96138051872652,\n -4.9509328406707445,\n -25.692274190905437,\n 12.46876416157031,\n -4.913764107032951,\n -10.967380287631935,\n 30.814194054910676,\n 2.4749594311442737,\n 17.97554375239156,\n 0.7711305933623585,\n 6.137488485631386,\n -14.451963574013497,\n 28.184534112915948,\n 12.538680065954864,\n -8.983230337131154,\n 5.231285164762417,\n -64.48900253584051,\n 11.357486681772649,\n 3.4540747915125176,\n 13.924346613092862,\n -25.364002046782343,\n -16.81800638602268,\n -10.260051030559755,\n -13.212134125591882,\n 2.5793388653025744,\n 8.717574965852519,\n -10.675498719239487,\n -2.926366012522306,\n 25.195880754767717,\n 40.59032932155964,\n -9.121433630189772,\n -24.297362381339184,\n -3.1769445056889345,\n 10.85049841917252,\n -31.33205974736701,\n 4.849567462214266,\n 15.048276954124187,\n 3.2951046992599635,\n -6.197091873129837,\n -8.77857413578066,\n 29.549174119407287,\n -5.1374487928814645,\n 23.02686048794348,\n -6.634816578371129,\n 2.7550149918614695,\n 21.733250113653973,\n -24.816994960101756,\n -7.83054706253201,\n 28.325796210205855,\n 12.300977467795988,\n -21.563157240034112,\n -19.335516283813288,\n 26.146443170846787,\n -1.7060712026841085,\n 16.071723694996702,\n 2.053266302846965,\n -5.097911612332572]},\n {'name': 'Trial 2',\n 'r': [3.488043923008057,\n 2.9184785763552368,\n 4.201827359971069,\n 8.227324606851074,\n 4.776690427237194,\n 3.041912303114453,\n 4.789947719076336,\n 5.663880780360856,\n 3.858262393172743,\n 8.260212881141047,\n 6.868624486428106,\n 5.7401975996748895,\n 6.594979282458134,\n 5.692703778211614,\n 5.337916574462772,\n 9.283604185175781,\n 5.7645908931363365,\n 4.028864552051332,\n 5.662344748373121,\n 0.42283723110061455,\n 6.201266463929336,\n 6.43926538131984,\n 5.096758513060891,\n 4.632081908733815,\n 3.4218461363102217,\n 4.369404703352921,\n 4.02833441941273,\n 5.80576719754376,\n 6.848189921425055,\n 3.8092955127795802,\n 4.385268183833586,\n 6.98332684554596,\n 7.396273186029126,\n 5.215125003141,\n 3.0861487792429205,\n 6.335394491488218,\n 6.0904147140584834,\n 2.4480560069033306,\n 5.942784020305152,\n 6.373129885590045,\n 5.454205341176391,\n 4.393337616563476,\n 4.2059446799773,\n 6.155542287959513,\n 5.119087171162872,\n 6.869860830828341,\n 4.104599860575049,\n 5.954348125582761,\n 8.092332877153778,\n 2.9617697054526295,\n 3.974012187582175,\n 6.373384128907529,\n 5.415409143179902,\n 3.876890919980343,\n 3.261446947424557,\n 6.145808529699159,\n 5.502451987192818,\n 5.571553295311899,\n 6.853049261089887,\n 4.140355074942654],\n 't': [14.80662578088746,\n 79.00634037258273,\n 49.02206554130045,\n 49.69908313603149,\n 54.137491082859476,\n 86.41932102054662,\n 96.95239193571373,\n 41.463488263612184,\n 67.13769169339066,\n 68.06103943971128,\n 42.68193032273406,\n 76.39865660811795,\n 42.19479347220856,\n 59.57788897461255,\n 27.510866799296068,\n 60.7534448322685,\n 68.37083279914752,\n 65.74802814945305,\n 58.53300837209963,\n -176.7441064584909,\n 61.17401857996598,\n 47.4515085890397,\n 84.4266531857914,\n 12.479346550525074,\n 72.48080276184626,\n 50.578831757750606,\n 51.560228240214684,\n 52.43785618126272,\n 51.586827992137934,\n 73.87294477733714,\n 70.21705692787259,\n 70.71429915430754,\n 82.23439442637098,\n 38.93539044700985,\n 84.7093666701594,\n 38.16582843645038,\n 61.70405365378903,\n 70.19695629244305,\n 54.454292590141606,\n 64.33489496861428,\n 58.273893146586325,\n 60.49982239038519,\n 59.155232538950266,\n 83.86561846759426,\n 47.87340989732011,\n 69.28260156593979,\n 71.1899104286971,\n 51.04839646304676,\n 59.427582415206295,\n 78.59873696166098,\n 75.75586451521559,\n 79.97048372322382,\n 73.89378024632016,\n 31.733411131690488,\n 68.08475117701943,\n 80.41107997857199,\n 48.92425070886502,\n 76.65025575535202,\n 42.18286436288056,\n 76.03333589453311]},\n {'name': 'Trial 3',\n 'r': [1.855870835032611,\n 5.2869620620428215,\n 3.886013391943573,\n 6.282863313001057,\n 4.4534148477405155,\n 5.688008050761193,\n 7.330864282608489,\n 3.825660594787748,\n 4.989604176963506,\n 7.8974314697670955,\n 4.6566931130229525,\n 6.667153696311044,\n 4.4310062871369515,\n 5.346113253377259,\n 2.4799456958789263,\n 8.113477348526397,\n 6.081311682312096,\n 4.968216896207305,\n 5.24445392063028,\n 5.422207884171506,\n 5.792774616023354,\n 4.787580592225452,\n 6.784318637182092,\n 1.10893690948093,\n 5.138911105244,\n 4.042929657287297,\n 4.022892029681135,\n 4.828428791305017,\n 5.417378374307972,\n 5.378635210668265,\n 5.421097175459842,\n 7.1205619788552434,\n 8.349308539903586,\n 3.4104855883231204,\n 5.6283784708757345,\n 3.9149369761396855,\n 5.7639402623551526,\n 4.764374106798512,\n 5.076236267895072,\n 6.165558183200791,\n 5.105576516279834,\n 4.761036376933375,\n 4.5962495409437905,\n 7.504188411346776,\n 4.107031417919988,\n 6.920422299379973,\n 5.349128949563397,\n 4.798065719385607,\n 7.023251532304466,\n 5.283680965457643,\n 5.569071152430292,\n 7.383794908447646,\n 6.269233210443127,\n 2.656529645009885,\n 4.843984338804117,\n 7.247992361555254,\n 4.372959394411489,\n 6.570981081360247,\n 4.602479243892371,\n 5.6700520508263965],\n 't': [151.29425518111282,\n 147.1880250282001,\n 125.2821571123002,\n 87.0672979717481,\n 119.62789835678657,\n 147.74082414730458,\n 139.56459814488954,\n 101.39149710201973,\n 134.5601842795838,\n 104.02444470480259,\n 89.39314294483763,\n 123.19403140008181,\n 91.47434051519816,\n 113.33237361373538,\n 96.1499255673322,\n 93.28073452263222,\n 118.21556522583221,\n 132.32293737819631,\n 112.9411863909871,\n -179.74623313781393,\n 110.3035135586484,\n 97.7508361660772,\n 131.60808925703367,\n 115.49691923085226,\n 140.58118216037175,\n 123.39666211932598,\n 128.34200904453573,\n 107.6088103983526,\n 97.90468978746796,\n 137.12844797536522,\n 130.43124491245027,\n 112.2270844807976,\n 118.63020224581525,\n 106.05822558950737,\n 146.90810970600344,\n 90.27734955816595,\n 111.50528236323856,\n 151.0897425364386,\n 107.7213941567982,\n 111.30085499702685,\n 114.68027793629503,\n 126.56937949315531,\n 128.2189522328928,\n 125.35485719537647,\n 112.4180682532985,\n 111.79735567917727,\n 133.41805225814235,\n 105.18411684151033,\n 97.23103612064705,\n 146.66803680360073,\n 136.23931520140337,\n 121.79184419346764,\n 123.91132797113666,\n 129.86224497019268,\n 141.34395084996186,\n 123.27096774880371,\n 108.45882172345216,\n 124.41237705630053,\n 89.02711073868319,\n 134.8767011451154]},\n {'name': 'Trial 4',\n 'r': [5.3724709243191295,\n 7.096355572040467,\n 4.883823903200083,\n 2.9201354412366496,\n 4.723963045684014,\n 7.423693950928521,\n 8.090946075397593,\n 3.3068445913715996,\n 6.050828482522597,\n 5.530232074438094,\n 2.47230695264053,\n 6.275670536862141,\n 2.6158961737877817,\n 4.653539944582694,\n 3.3354400138758,\n 4.795883604868761,\n 5.472711346482787,\n 5.881930490947868,\n 4.5715870720453795,\n 9.039861169796675,\n 4.6429075998956915,\n 3.1727677357988284,\n 7.044248138818528,\n 4.466336514107385,\n 6.557330289803022,\n 4.8208494372533615,\n 5.131915515212963,\n 3.9700122370488873,\n 3.4063238128284303,\n 6.476722963998372,\n 6.019218509330762,\n 5.664501534954291,\n 7.1587585225456705,\n 3.6007126616736462,\n 7.324127168758531,\n 2.552946156245396,\n 4.727133860387479,\n 6.971755207182515,\n 4.076578361066991,\n 4.946223407006624,\n 4.642155449043171,\n 5.3605748644110855,\n 5.391719067363011,\n 7.072524305096543,\n 4.101111570277392,\n 5.485732621016895,\n 6.192535286114146,\n 3.7687113918423396,\n 4.290311389760529,\n 7.060195369692179,\n 6.539691844176445,\n 6.679744406490943,\n 6.060825358695814,\n 4.786574040927106,\n 6.416686529666599,\n 6.70328133338789,\n 3.8888478104797555,\n 6.308591081194454,\n 2.4370447709043273,\n 6.508186347897975],\n 't': [-140.20332764140605,\n -168.084245433406,\n -166.2851413292181,\n 138.24886675310003,\n -174.4243864364084,\n -169.96048275947723,\n 176.9918226866201,\n -169.90141624864253,\n -172.64158159443713,\n 142.9516688139347,\n 172.4157463673128,\n 168.5193591959272,\n 177.82205369393654,\n 172.85519034865231,\n -146.01452170111628,\n 128.1772930242011,\n 169.16707278067625,\n -173.58857378893256,\n 173.72699270456877,\n -151.20610477226074,\n 166.26047716274937,\n 172.50756608236046,\n 173.9491839042747,\n -131.80684093766672,\n -170.63527383147678,\n -168.57708548315375,\n -166.76550342128579,\n 176.07048734819648,\n 162.29750149829133,\n -174.05574631254976,\n -178.06092985664986,\n 156.47126885027095,\n 155.23914214477145,\n -163.00052639405448,\n -170.116713265192,\n -170.63927248749107,\n 167.38314369359566,\n -163.0988170562564,\n 172.8807370063752,\n 163.38600768186703,\n 176.1825419773446,\n -174.579680173718,\n -172.33584488196067,\n 165.33802569398378,\n -172.52566426066147,\n 157.54287773943665,\n -175.88151109326037,\n 175.42764399370765,\n 142.06967472256432,\n -168.3407340189972,\n -175.8058311226083,\n 163.06374541935153,\n 171.72097499708474,\n -151.40390456860604,\n -168.2713690903466,\n 165.04532787828478,\n -177.3153366647533,\n 170.04241289697416,\n 173.59919660957283,\n -177.25065674571294]},\n {'name': 'Trial 5',\n 'r': [7.937557871379145,\n 7.302746491515634,\n 5.929302221442996,\n 2.407178713166243,\n 5.27092188705965,\n 7.400596127535688,\n 6.810820338360006,\n 4.967759034422344,\n 6.190229370454795,\n 2.158518657950606,\n 4.00412589386977,\n 4.776617321633007,\n 4.232250451808441,\n 4.30765487269422,\n 6.200275172864116,\n 0.7275138485344722,\n 4.378006803811767,\n 6.004964939443091,\n 4.341931702915758,\n 10.237982935327496,\n 3.8021588886978415,\n 3.96928117013756,\n 5.7589801424664335,\n 7.674179069144705,\n 6.699953533011802,\n 5.7343103881346,\n 6.044275915297742,\n 4.3129430660866035,\n 3.3775452824133043,\n 6.367666727269062,\n 5.737244181549697,\n 3.3963514719893415,\n 4.216467481387725,\n 5.464885016717265,\n 7.311135577533859,\n 4.745400769362272,\n 3.9164685318876504,\n 7.6029729903258385,\n 4.125204829441439,\n 3.6767949496501635,\n 4.551235788519779,\n 5.606960531523096,\n 5.794844257485189,\n 5.030528155694793,\n 5.109586240991219,\n 3.4054402079637396,\n 6.02630612538526,\n 4.2211092636354195,\n 1.9097829365788486,\n 7.254669393921678,\n 6.268875872033599,\n 4.56258056659493,\n 4.9180579654382806,\n 6.83656096252698,\n 6.78648654914422,\n 4.751014334485786,\n 4.719926347642004,\n 4.9278052151809675,\n 4.059190587394083,\n 6.128338984290388],\n 't': [-101.83378577584543,\n -127.47839157875458,\n -112.2442849973417,\n -82.32591087119675,\n -114.6888556206928,\n -130.53786336160334,\n -145.0102649759552,\n -98.7488450072409,\n -124.44174882126121,\n -152.45411926998403,\n -89.29423655225057,\n -139.83245171792495,\n -91.54359518437012,\n -119.44216300369413,\n -92.45583852737828,\n -129.6599243163198,\n -131.0512350992248,\n -123.85291745359059,\n -118.08673900439605,\n -121.97921713765797,\n -121.91502996793754,\n -99.36184757774758,\n -141.46770199726927,\n -93.5662631891479,\n -126.33690140499776,\n -112.8349441777883,\n -114.38647992914663,\n -109.79607232724634,\n -102.74326471243563,\n -128.2467289067651,\n -127.79209264323043,\n -142.47362974536523,\n -161.58729418706835,\n -99.94061077957295,\n -130.16311732570668,\n -90.22881200957039,\n -122.65049121443685,\n -123.26775057177692,\n -111.99730880084306,\n -127.52831680551732,\n -117.93129533779559,\n -120.39163424547179,\n -119.38687147866949,\n -149.6746954924951,\n -107.85051750555007,\n -138.98993134073962,\n -127.5954702142739,\n -107.32083544041386,\n -117.5738074233824,\n -127.48166096847307,\n -129.91203316621693,\n -148.49521167061027,\n -135.33164137019145,\n -104.42165927641673,\n -123.87544021115426,\n -146.81682661802307,\n -107.0584854241401,\n -138.9025648732907,\n -88.89688251951031,\n -130.75446735589105]},\n {'name': 'Trial 6',\n 'r': [8.46918052789063,\n 5.821997567373959,\n 6.1409183282181425,\n 5.831724284786043,\n 5.546754471857236,\n 5.62748770920125,\n 3.94832897601986,\n 6.490184614609525,\n 5.320618245151644,\n 3.2435930414929843,\n 6.444085331576761,\n 3.363778100648707,\n 6.463116810505407,\n 4.730944925781221,\n 7.796578411114142,\n 4.570127829915901,\n 3.926206816002813,\n 5.254348139870139,\n 4.8384111066133375,\n 8.694523998982934,\n 4.39953181821818,\n 5.8564839051788535,\n 3.62157703921442,\n 8.894912373110186,\n 5.494542836078211,\n 5.968980890853802,\n 6.047899573604184,\n 5.384671396722035,\n 5.381220018196653,\n 5.11157462273727,\n 4.7705611050578,\n 3.0983308826347407,\n 1.665083171936659,\n 6.740258533332946,\n 5.5944949288820025,\n 6.879630825669177,\n 4.382792466280775,\n 6.410843616485085,\n 5.154204317772818,\n 4.01515851865648,\n 4.9391488682598155,\n 5.298297314485713,\n 5.490417176946796,\n 2.6237512593812404,\n 5.9535886616652665,\n 3.3014793719195046,\n 4.954889001100974,\n 5.500053669614178,\n 4.4505123495497285,\n 5.786624513349857,\n 4.906834424064605,\n 2.6299694734469274,\n 3.769703608047238,\n 7.396735715500286,\n 5.7644819019579545,\n 2.794585195883112,\n 5.782033269824353,\n 3.4853519176219963,\n 6.500653598620165,\n 4.748640710129176],\n 't': [-66.53583632728323,\n -84.514422676922,\n -63.339741699567846,\n -24.146812744223833,\n -59.70124532256676,\n -88.06537267996578,\n -98.44420453532204,\n -49.15839681719936,\n -73.63622331202959,\n -17.923874678608904,\n -38.41239945460549,\n -66.34036237792131,\n -40.88883873919996,\n -52.46063321002169,\n -52.61046255912479,\n -7.039351050913894,\n -57.23545869215697,\n -71.64220350197985,\n -52.345396169095466,\n -92.78303867354904,\n -47.18716305503351,\n -41.969208462875166,\n -82.14422824993427,\n -59.43916560317718,\n -79.19482259319774,\n -62.29990853531319,\n -65.53790403937941,\n -48.9060554475786,\n -37.74831103800929,\n -78.05333345828834,\n -71.87311766307504,\n -41.891092825900685,\n -53.11545548549721,\n -52.997628097314845,\n -87.0843610179252,\n -43.61190483837573,\n -48.79799840560851,\n -82.56680315713163,\n -47.90996299570176,\n -46.57048558531105,\n -54.5004832176089,\n -65.90072712679752,\n -66.87331746360131,\n -75.48080725209734,\n -54.777693866880114,\n -42.5983345913628,\n -74.50816626907293,\n -47.11021844342552,\n -22.356873183328428,\n -84.19298674498425,\n -78.50528475620209,\n -65.0363717923471,\n -66.51373368133282,\n -63.52677656175937,\n -77.80907855131592,\n -68.51017974013602,\n -51.296869310885135,\n -68.33991302765452,\n -38.631733068443026,\n -77.85184858511114]}]"
}
],
"prompt_number": 6
},
{
"cell_type": "markdown",
"metadata": {},
"source": "Now you could use Python to analyze and re-plot your data. Not bad. We can also check out the figure itself."
},
{
"cell_type": "code",
"collapsed": false,
"input": "print fig.to_string()",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": "Figure(\n data=Data([\n Scatter(\n name='Trial 1',\n mode='markers',\n marker=Marker(\n line=Line(\n color='white'\n ),\n size=110,\n color='rgb(27,158,119)',\n opacity=0.7\n ),\n r=[6.804985785265978, 3.389596010612268, 5.3814721107464445, 8....],\n t=[-30.352944361883697, -25.611459854524096, -12.42522745267607...]\n ),\n Scatter(\n name='Trial 2',\n mode='markers',\n marker=Marker(\n line=Line(\n color='white'\n ),\n size=110,\n color='rgb(217,95,2)',\n opacity=0.7\n ),\n r=[3.488043923008057, 2.9184785763552368, 4.201827359971069, 8....],\n t=[14.80662578088746, 79.00634037258273, 49.02206554130045, 49....]\n ),\n Scatter(\n name='Trial 3',\n mode='markers',\n marker=Marker(\n line=Line(\n color='white'\n ),\n size=110,\n color='rgb(117,112,179)',\n opacity=0.7\n ),\n r=[1.855870835032611, 5.2869620620428215, 3.886013391943573, 6....],\n t=[151.29425518111282, 147.1880250282001, 125.2821571123002, 87...]\n ),\n Scatter(\n name='Trial 4',\n mode='markers',\n marker=Marker(\n line=Line(\n color='white'\n ),\n size=110,\n color='rgb(231,41,138)',\n opacity=0.7\n ),\n r=[5.3724709243191295, 7.096355572040467, 4.883823903200083, 2....],\n t=[-140.20332764140605, -168.084245433406, -166.2851413292181, ...]\n ),\n Scatter(\n name='Trial 5',\n mode='markers',\n marker=Marker(\n line=Line(\n color='white'\n ),\n size=110,\n color='rgb(102,166,30)',\n opacity=0.7\n ),\n r=[7.937557871379145, 7.302746491515634, 5.929302221442996, 2.4...],\n t=[-101.83378577584543, -127.47839157875458, -112.2442849973417...]\n ),\n Scatter(\n name='Trial 6',\n mode='markers',\n marker=Marker(\n line=Line(\n color='white'\n ),\n size=110,\n color='rgb(230,171,2)',\n opacity=0.7\n ),\n r=[8.46918052789063, 5.821997567373959, 6.1409183282181425, 5.8...],\n t=[-66.53583632728323, -84.514422676922, -63.339741699567846, -...]\n )\n ]),\n layout=Layout(\n title='Hobbs-Pearson Trials',\n plot_bgcolor='rgb(223, 223, 223)',\n font=Font(\n size=15\n ),\n angularaxis=AngularAxis(\n tickcolor='rgb(253,253,253)'\n )\n )\n)\n"
}
],
"prompt_number": 7
},
{
"cell_type": "markdown",
"metadata": {},
"source": "We can also access the data within Plotly. You can fork and share e.g., https://plot.ly/~MattSundquist/1600 and edit or analyze the data to make new plots (polar and beyond). You can also extend that data from our APIs, copy and paste new data into your grid, or add data to pre-existing plots."
},
{
"cell_type": "markdown",
"metadata": {},
"source": "<a href=\"http://imgur.com/ZGWdHdk\"><img src=\"http://i.imgur.com/ZGWdHdk.png\" title=\"Hosted by imgur.com\"/></a>"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "The goal is to be a neutral middle-ground for plotting and sharing between Python, matplotlib, R, ggplot2, MATLAB, Excel, Julia, node.js, Arduino, Raspberry Pi, and Tableau. To embed plots, you can use this iframe snippet and include your desired URL:\n\n<pre style=\"background:#f1f1f1;color:#000\">&lt;iframe src=<span style=\"color:#c03030\">\"https://plot.ly/~MattSundquist/1334/650/550\"</span> width=<span style=\"color:#c03030\">\"650\"</span> height=550<span style=\"color:#c03030\">\" frameBorder=\"</span>0<span style=\"color:#c03030\">\" seamless=\"</span>seamless<span style=\"color:#c03030\">\" scrolling=\"</span>no<span style=\"color:#c03030\">\">&lt;/iframe>\n</span></pre>\n\nIframes are like windows across the internet, letting one page open up a bit of space for another page to show through. You can embed any interactive Plotly graph in an iframe, thus letting you share a beautiful, interactive graph on your blog or website. That offers the experience you see below, in this case an embedded plot in [this Tableau Workbook](http://public.tableausoftware.com/profile/digitalteam#!/vizhome/plotlyinTableau/Dashboard2).\n\n<br>\n\n<a href=\"http://imgur.com/5CR3iSf\"><img src=\"http://i.imgur.com/5CR3iSf.png\" title=\"Hosted by imgur.com\"/></a>"
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": "III. Polar charts in R"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "Next up, R. You can run all these plots in Python or MATLAB by getting them [from our docs](https://plot.ly/api). Head over to our [R API](https://plot.ly/r) to see more and install the API."
},
{
"cell_type": "code",
"collapsed": false,
"input": "library(plotly)\n\np <- plotly(username=\"IPython.Demo\", key=\"1fw3zw2o13\")\n\ntrace1 <- list(\n r = c(1, 0.995, 0.978, 0.951, 0.914, 0.866, 0.809, 0.743, 0.669, 0.588, 0.5, 0.407, 0.309, 0.208, 0.105, 0, 0.105, 0.208, 0.309, 0.407, 0.5, 0.588, 0.669, 0.743, 0.809, 0.866, 0.914, 0.951, 0.978, 0.995, 1, 0.995, 0.978, 0.951, 0.914, 0.866, 0.809, 0.743, 0.669, 0.588, 0.5, 0.407, 0.309, 0.208, 0.105, 0, 0.105, 0.208, 0.309, 0.407, 0.5, 0.588, 0.669, 0.743, 0.809, 0.866, 0.914, 0.951, 0.978, 0.995, 1), \n t = c(0, 6, 12, 18, 24, 30, 36, 42, 48, 54, 60, 66, 72, 78, 84, 90, 96, 102, 108, 114, 120, 126, 132, 138, 144, 150, 156, 162, 168, 174, 180, 186, 192, 198, 204, 210, 216, 222, 228, 234, 240, 246, 252, 258, 264, 270, 276, 282, 288, 294, 300, 306, 312, 318, 324, 330, 336, 342, 348, 354, 360), \n mode = \"lines\", \n name = \"Figure8\", \n marker = list(\n color = \"none\", \n line = list(color = \"peru\")\n ), \n type = \"scatter\"\n)\ntrace2 <- list(\n r = c(1, 0.997, 0.989, 0.976, 0.957, 0.933, 0.905, 0.872, 0.835, 0.794, 0.75, 0.703, 0.655, 0.604, 0.552, 0.5, 0.448, 0.396, 0.345, 0.297, 0.25, 0.206, 0.165, 0.128, 0.095, 0.067, 0.043, 0.024, 0.011, 0.003, 0, 0.003, 0.011, 0.024, 0.043, 0.067, 0.095, 0.128, 0.165, 0.206, 0.25, 0.297, 0.345, 0.396, 0.448, 0.5, 0.552, 0.604, 0.655, 0.703, 0.75, 0.794, 0.835, 0.872, 0.905, 0.933, 0.957, 0.976, 0.989, 0.997, 1), \n t = c(0, 6, 12, 18, 24, 30, 36, 42, 48, 54, 60, 66, 72, 78, 84, 90, 96, 102, 108, 114, 120, 126, 132, 138, 144, 150, 156, 162, 168, 174, 180, 186, 192, 198, 204, 210, 216, 222, 228, 234, 240, 246, 252, 258, 264, 270, 276, 282, 288, 294, 300, 306, 312, 318, 324, 330, 336, 342, 348, 354, 360), \n mode = \"lines\", \n name = \"Cardioid\", \n marker = list(\n color = \"none\", \n line = list(color = \"darkviolet\")\n ), \n type = \"scatter\"\n)\ntrace3 <- list(\n r = c(1, 0.996, 0.984, 0.963, 0.935, 0.9, 0.857, 0.807, 0.752, 0.691, 0.625, 0.555, 0.482, 0.406, 0.328, 0.25, 0.172, 0.094, 0.018, 0.055, 0.125, 0.191, 0.252, 0.307, 0.357, 0.4, 0.435, 0.463, 0.484, 0.496, 0.5, 0.496, 0.484, 0.463, 0.435, 0.4, 0.357, 0.307, 0.252, 0.191, 0.125, 0.055, 0.018, 0.094, 0.172, 0.25, 0.328, 0.406, 0.482, 0.555, 0.625, 0.691, 0.752, 0.807, 0.857, 0.9, 0.935, 0.963, 0.984, 0.996, 1), \n t = c(0, 6, 12, 18, 24, 30, 36, 42, 48, 54, 60, 66, 72, 78, 84, 90, 96, 102, 108, 114, 120, 126, 132, 138, 144, 150, 156, 162, 168, 174, 180, 186, 192, 198, 204, 210, 216, 222, 228, 234, 240, 246, 252, 258, 264, 270, 276, 282, 288, 294, 300, 306, 312, 318, 324, 330, 336, 342, 348, 354, 360), \n mode = \"lines\", \n name = \"Hypercardioid\", \n marker = list(\n color = \"none\", \n line = list(color = \"deepskyblue\")\n ), \n type = \"scatter\"\n)\ntrace4 <- list(\n r = c(1, 0.998, 0.993, 0.985, 0.974, 0.96, 0.943, 0.923, 0.901, 0.876, 0.85, 0.822, 0.793, 0.762, 0.731, 0.7, 0.669, 0.638, 0.607, 0.578, 0.55, 0.524, 0.499, 0.477, 0.457, 0.44, 0.426, 0.415, 0.407, 0.402, 0.4, 0.402, 0.407, 0.415, 0.426, 0.44, 0.457, 0.477, 0.499, 0.524, 0.55, 0.578, 0.607, 0.638, 0.669, 0.7, 0.731, 0.762, 0.793, 0.822, 0.85, 0.876, 0.901, 0.923, 0.943, 0.96, 0.974, 0.985, 0.993, 0.998, 1), \n t = c(0, 6, 12, 18, 24, 30, 36, 42, 48, 54, 60, 66, 72, 78, 84, 90, 96, 102, 108, 114, 120, 126, 132, 138, 144, 150, 156, 162, 168, 174, 180, 186, 192, 198, 204, 210, 216, 222, 228, 234, 240, 246, 252, 258, 264, 270, 276, 282, 288, 294, 300, 306, 312, 318, 324, 330, 336, 342, 348, 354, 360), \n mode = \"lines\", \n name = \"Subcardioid\", \n marker = list(\n color = \"none\", \n line = list(color = \"orangered\")\n ), \n type = \"scatter\"\n)\ntrace5 <- list(\n r = c(1, 0.997, 0.986, 0.969, 0.946, 0.916, 0.88, 0.838, 0.792, 0.74, 0.685, 0.626, 0.565, 0.501, 0.436, 0.37, 0.304, 0.239, 0.175, 0.114, 0.055, 0, 0.052, 0.098, 0.14, 0.176, 0.206, 0.229, 0.246, 0.257, 0.26, 0.257, 0.246, 0.229, 0.206, 0.176, 0.14, 0.098, 0.052, 0, 0.055, 0.114, 0.175, 0.239, 0.304, 0.37, 0.436, 0.501, 0.565, 0.626, 0.685, 0.74, 0.792, 0.838, 0.88, 0.916, 0.946, 0.969, 0.986, 0.997, 1), \n t = c(0, 6, 12, 18, 24, 30, 36, 42, 48, 54, 60, 66, 72, 78, 84, 90, 96, 102, 108, 114, 120, 126, 132, 138, 144, 150, 156, 162, 168, 174, 180, 186, 192, 198, 204, 210, 216, 222, 228, 234, 240, 246, 252, 258, 264, 270, 276, 282, 288, 294, 300, 306, 312, 318, 324, 330, 336, 342, 348, 354, 360), \n mode = \"lines\", \n name = \"Supercardioid\", \n marker = list(\n color = \"none\", \n line = list(color = \"green\")\n ), \n type = \"scatter\"\n)\ndata <- list(trace1, trace2, trace3, trace4, trace5)\nlayout <- list(\n title = \"Mic Patterns\", \n font = list(\n family = \"Arial, sans-serif;\", \n size = 12, \n color = \"#000\"\n ), \n showlegend = TRUE, \n width = 500, \n height = 400, \n margin = list(\n l = 40, \n r = 40, \n b = 20, \n t = 40, \n pad = 0\n ), \n paper_bgcolor = \"rgb(255, 255, 255)\", \n plot_bgcolor = \"rgb(255, 255, 255)\", \n orientation = -90\n)\n\nresponse <- p$plotly(data, kwargs=list(layout=layout, filename=\"polar-line\", fileopt=\"overwrite\"))\nurl <- response$url\nfilename <- response$filename",
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 7
},
{
"cell_type": "code",
"collapsed": false,
"input": "tls.embed('PlotBot','36')",
"language": "python",
"metadata": {},
"outputs": [
{
"html": "<iframe id=\"igraph\" scrolling=\"no\" style=\"border:none;\"seamless=\"seamless\" src=\"https://plot.ly/~PlotBot/36\" height=\"525\" width=\"100%\"></iframe>",
"metadata": {},
"output_type": "display_data",
"text": "<IPython.core.display.HTML at 0x7ffa7d486090>"
}
],
"prompt_number": 8
},
{
"cell_type": "markdown",
"metadata": {},
"source": "If you'd like to access the data from the plot with a GUI, import data from Excel, and then re-plot the figure, you can. IPython also supports R, meaning you can [call figures and data using the R kernel or RStudio](http://nbviewer.ipython.org/403910de45e282d658fa). Like a boss.\n\n<br>\n<a href=\"http://imgur.com/sfHUk8X\"><img src=\"http://i.imgur.com/sfHUk8X.png\" title=\"Hosted by imgur.com\"/></a>\n<br>"
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": "<br>\nIV. Polar charts in MATLAB"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "And now, MATLAB. Head over to [the API](https://plot.ly/MATLAB) to install the API and run this plot."
},
{
"cell_type": "code",
"collapsed": false,
"input": "signin('IPython.Demo', '1fw3zw2o13')\n\ntrace1 = struct(...\n 'r', [77.5, 72.5, 70.0, 45.0, 22.5, 42.5, 40.0, 62.5], ...\n 't', { {'North', 'N-E', 'East', 'S-E', 'South', 'S-W', 'West', 'N-W'} }, ...\n 'name', '11-14 m/s', ...\n 'marker', struct('color', 'rgb(106,81,163)'), ...\n 'type', 'area');\ntrace2 = struct(...\n 'r', [57.5, 50.0, 45.0, 35.0, 20.0, 22.5, 37.5, 55.0], ...\n 't', { {'North', 'N-E', 'East', 'S-E', 'South', 'S-W', 'West', 'N-W'} }, ...\n 'name', '8-11 m/s', ...\n 'marker', struct('color', 'rgb(158,154,200)'), ...\n 'type', 'area');\ntrace3 = struct(...\n 'r', [40.0, 30.0, 30.0, 35.0, 7.5, 7.5, 32.5, 40.0], ...\n 't', { {'North', 'N-E', 'East', 'S-E', 'South', 'S-W', 'West', 'N-W'} }, ...\n 'name', '5-8 m/s', ...\n 'marker', struct('color', 'rgb(203,201,226)'), ...\n 'type', 'area');\ntrace4 = struct(...\n 'r', [20.0, 7.5, 15.0, 22.5, 2.5, 2.5, 12.5, 22.5], ...\n 't', { {'North', 'N-E', 'East', 'S-E', 'South', 'S-W', 'West', 'N-W'} }, ...\n 'name', '< 5 m/s', ...\n 'marker', struct('color', 'rgb(242,240,247)'), ...\n 'type', 'area');\ndata = {trace1, trace2, trace3, trace4};\nlayout = struct(...\n 'title', 'Wind Speed Distribution in Laurel, NE', ...\n 'font', struct('size', 16), ...\n 'legend', struct('font', struct('size', 16)), ...\n 'radialaxis', struct('ticksuffix', '%'), ...\n 'orientation', 270);\n\nresponse = plotly(data, struct('layout', layout, 'filename', 'polar-area-chart', 'fileopt', 'overwrite'));\nplot_url = response.url",
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 8
},
{
"cell_type": "code",
"collapsed": false,
"input": "tls.embed('PlotBot', '37')",
"language": "python",
"metadata": {},
"outputs": [
{
"html": "<iframe id=\"igraph\" scrolling=\"no\" style=\"border:none;\"seamless=\"seamless\" src=\"https://plot.ly/~PlotBot/37\" height=\"525\" width=\"100%\"></iframe>",
"metadata": {},
"output_type": "display_data",
"text": "<IPython.core.display.HTML at 0x7ffa7d4d7f90>"
}
],
"prompt_number": 9
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": "V. Plotly for collaboration and your workflow"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "When you call a graph with `iplot` it draws the graph and embeds the graph in an iframe in your NB. You control [the privacy](https://plot.ly/python/privacy/) of your downloadable plots. Plots are also stored on Instagram-esque profiles at, for example, [plot.ly/~IPython.Demo](https://plot.ly/~IPython.Demo/). \n\nYou can then keep all your your data, scripts, and graphs together online, and do your collaboration there as well. Adding IPython and Plotly to your workflow means you can create, execute, save, and publish images, Markdown, code, graphs, and text all together online. See below for a bit of illustration.\n\nWe'd love to hear your thoughts. We're at feedback@plot.ly and [@plotlygraphs](https://twitter.com/plotlygraphs). Happy plotting.</i>\n\n<a href=\"http://imgur.com/jQAS6Sj\"><img src=\"http://i.imgur.com/jQAS6Sj.png\" title=\"Hosted by imgur.com\"/></a>\n\n<br>\n\n<a href=\"http://imgur.com/yPbgErd\"><img src=\"http://i.imgur.com/yPbgErd.png?1\" title=\"Hosted by imgur.com\" /></a>\n\n<br>\n\n<a href=\"http://imgur.com/5y6iQ7t\"><img src=\"http://i.imgur.com/5y6iQ7t.png\" title=\"Hosted by imgur.com\"/></a>"
},
{
"cell_type": "code",
"collapsed": false,
"input": "from IPython.display import display, HTML\nimport urllib2\ndisplay(HTML( urllib2.urlopen('https://raw.githubusercontent.com/plotly/python-user-guide/master/custom.css').read()))",
"language": "python",
"metadata": {},
"outputs": [
{
"html": "<style>\n /*body {\n background-color: #F5F5F5;\n }*/\n div.cell{\n width: 850px;\n margin-left: 10% !important;\n margin-right: auto;\n }\n h1 {\n font-family: \"Open sans\",verdana,arial,sans-serif;\n }\n .text_cell_render h1 {\n font-weight: 200;\n font-size: 40pt;\n line-height: 100%;\n color:#447adb;\n margin-bottom: 0em;\n margin-top: 0em;\n display: block;\n white-space: nowrap;\n } \n h2 {\n font-family: \"Open sans\",verdana,arial,sans-serif;\n text-indent:1em;\n }\n .text_cell_render h2 {\n font-weight: 200;\n font-size: 20pt;\n font-style: italic;\n line-height: 100%;\n color:#447adb;\n margin-bottom: 1.5em;\n margin-top: 0.5em;\n display: block;\n white-space: nowrap;\n } \n h3 {\n font-family: \"Open sans\",verdana,arial,sans-serif;\n }\n .text_cell_render h3 {\n font-weight: 300;\n font-size: 18pt;\n line-height: 100%;\n color:#447adb;\n margin-bottom: 0.5em;\n margin-top: 2em;\n display: block;\n white-space: nowrap;\n }\n h4 {\n font-family: \"Open sans\",verdana,arial,sans-serif;\n }\n .text_cell_render h4 {\n font-weight: 300;\n font-size: 16pt;\n color:#447adb;\n margin-bottom: 0.5em;\n margin-top: 0.5em;\n display: block;\n white-space: nowrap;\n }\n h5 {\n font-family: \"Open sans\",verdana,arial,sans-serif;\n }\n .text_cell_render h5 {\n font-weight: 300;\n font-style: normal;\n color: #1d3b84;\n font-size: 16pt;\n margin-bottom: 0em;\n margin-top: 1.5em;\n display: block;\n white-space: nowrap;\n }\n div.text_cell_render{\n font-family: \"Open sans\",verdana,arial,sans-serif;\n line-height: 135%;\n font-size: 125%;\n width:750px;\n margin-left:auto;\n margin-right:auto;\n text-align:justify;\n text-justify:inter-word;\n }\n div.output_subarea.output_text.output_pyout {\n overflow-x: auto;\n overflow-y: scroll;\n max-height: 300px;\n }\n div.output_subarea.output_stream.output_stdout.output_text {\n overflow-x: auto;\n overflow-y: scroll;\n max-height: 300px;\n }\n div.output_subarea.output_html.rendered_html {\n overflow-x: scroll;\n max-width: 100%;\n /* overflow-y: scroll; */\n /* max-height: 300px; */\n }\n code{\n font-size: 78%;\n }\n .rendered_html code{\n background-color: transparent;\n }\n ul{\n /* color:#447adb; */ \n margin: 2em;\n }\n ul li{\n padding-left: 0.5em; \n margin-bottom: 0.5em; \n margin-top: 0.5em; \n }\n ul li li{\n padding-left: 0.2em; \n margin-bottom: 0.2em; \n margin-top: 0.2em; \n }\n ol{\n /* color:#447adb; */ \n margin: 2em;\n }\n ol li{\n padding-left: 0.5em; \n margin-bottom: 0.5em; \n margin-top: 0.5em; \n }\n /*.prompt{\n display: None;\n } */\n ul li{\n padding-left: 0.5em; \n margin-bottom: 0.5em; \n margin-top: 0.2em; \n }\n a:link{\n font-weight: bold;\n color:#447adb;\n }\n a:visited{\n font-weight: bold;\n color: #1d3b84;\n }\n a:hover{\n font-weight: bold;\n color: #1d3b84;\n }\n a:focus{\n font-weight: bold;\n color:#447adb;\n }\n a:active{\n font-weight: bold;\n color:#447adb;\n }\n .rendered_html :link {\n text-decoration: none; \n }\n .rendered_html :hover {\n text-decoration: none; \n }\n .rendered_html :visited {\n text-decoration: none;\n }\n .rendered_html :focus {\n text-decoration: none;\n }\n .rendered_html :active {\n text-decoration: none;\n }\n .warning{\n color: rgb( 240, 20, 20 )\n } \n hr {\n color: #f3f3f3;\n background-color: #f3f3f3;\n height: 1px;\n }\n blockquote{\n display:block;\n background: #f3f3f3;\n font-family: \"Open sans\",verdana,arial,sans-serif;\n width:610px;\n padding: 15px 15px 15px 15px;\n text-align:justify;\n text-justify:inter-word;\n }\n blockquote p {\n margin-bottom: 0;\n line-height: 125%;\n font-size: 100%;\n }\n /* element.style {\n } */ \n</style>\n<script>\n MathJax.Hub.Config({\n TeX: {\n extensions: [\"AMSmath.js\"]\n },\n tex2jax: {\n inlineMath: [ [\"$\",\"$\"], [\"\\\\(\",\"\\\\)\"] ],\n displayMath: [ [\"$$\",\"$$\"], [\"\\\\[\",\"\\\\]\"] ]\n },\n displayAlign: \"center\", // Change this to \"center\" to center equations.\n \"HTML-CSS\": {\n styles: {\".MathJax_Display\": {\"margin\": 4}}\n }\n });\n</script>\n",
"metadata": {},
"output_type": "display_data",
"text": "<IPython.core.display.HTML at 0x7ffa7d463290>"
}
],
"prompt_number": 10
}
],
"metadata": {}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment