{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## 3.3 3Dグラフ" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 3.3.1 3D 散布図(Scatter3d trace)" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "data": { "text/html": [ " \n", " " ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "marker": { "color": [ 0.9594343210617524, 0.8039608914986468, 0.03232306662357398, 0.7093872512312951, 0.46500148156350607, 0.9475489413950998, 0.2214327343234883, 0.2670720196843658, 0.081473964877262, 0.42861882866378653, 0.10901876401906829, 0.6337867606119179, 0.8029632373737379, 0.6968004961201785, 0.7662113810757705, 0.3424541198435198, 0.8458514830276777, 0.42876877499944255, 0.8240098704123188, 0.6264961586242938, 0.1434230486702449, 0.07838689985494796, 0.01833264291300729, 0.06672499763935646, 0.4585838137084318, 0.11334192276759048, 0.027783348848669953, 0.7548614813904674, 0.3948504804606394, 0.7469384956075251, 0.45240482674645155, 0.4500867470007611, 0.47807250671783097, 0.47400392656219403, 0.8031633421141696, 0.40239251985773583, 0.904686160343623, 0.037061047954035864, 0.7738743427204187, 0.12564138113773882, 0.6185135669120855, 0.010364261335231939, 0.538627282576347, 0.0030179566195963625, 0.9511937854902045, 0.905402033702778, 0.7959669419422694, 0.9152743199147875, 0.14555823115839706, 0.15773006987053328, 0.187631672902434, 0.6224959022999211, 0.9058094960083019, 0.9899551783590737, 0.7111224587658159, 0.7318004091422953, 0.9092932045442544, 0.4008737323711209, 0.24985068022503676, 0.17343017078712286, 0.119457050333729, 0.8126105880328287, 0.14679237341724316, 0.2642974827269007, 0.8190891786335308, 0.31058725179421, 0.9824174492929428, 0.2666387021516352, 0.5336533449712114, 0.31446701118584963, 0.9107728311738374, 0.36655664385123443, 0.43359232727316455, 0.5122926922783614, 0.9388864773697133, 0.030949006271150714, 0.7168786636316892, 0.8910189542923389, 0.027287223517468817, 0.5220512472525107, 0.3259898117700253, 0.8594893208655858, 0.5585165509225178, 0.6902278681627478, 0.45285349995153745, 0.6283090375213571, 0.2900968516874258, 0.009348577966515781, 0.5767559349870908, 0.3114442141324628, 0.5172675985011298, 0.9164058530538978, 0.426474788501396, 0.2473960366023854, 0.37129376127905445, 0.9318611166365406, 0.9368683813090937, 0.8443299485657132, 0.9202065143056605, 0.22790028995131695 ], "size": [ 8.118586977205398, 8.749616449558982, 6.884132523859433, 5.694944127453757, 1.6097143681560877, 4.668800227633064, 3.45172051155215, 2.250399578140846, 5.925118687657967, 3.1226983770191694, 9.163055534683508, 9.096355249515572, 2.5711829378219617, 1.108913007440292, 1.9296273201911285, 4.995841706788861, 7.2858566797459625, 2.081944384087915, 2.480335583772307, 8.516718749363669, 4.158487182675273, 6.166850671552362, 2.3366613923925006, 1.0196725942579743, 5.158570169685298, 4.771409870497823, 1.5267164409316325, 6.218062317404155, 5.440101188139382, 6.541373469707443, 1.445455401246598, 7.515278171352438, 2.220491397999227, 5.19351824366033, 7.8529602822161895, 0.2233042799180618, 3.243624597261865, 8.72922376400111, 8.447096076020696, 5.384405925945437, 8.66608274166513, 9.498059913536265, 8.264069976293413, 8.541154438365387, 0.9874340182034835, 6.51304332340991, 7.03516988152653, 6.102408126466297, 7.996152617360281, 0.3457121987163425, 7.702387345549799, 7.3172860073952695, 2.596983932983531, 2.5706929882214666, 6.323033174301278, 3.4529746159108154, 7.965886780072875, 4.461462320034572, 7.827494147841719, 9.904717836238406, 3.0024833953390004, 1.4300582825809938, 9.013084363492737, 5.415593788873733, 9.747403708550822, 6.366044000018972, 9.939130246104789, 5.460708041429516, 5.264259339055213, 1.354279030721699, 3.5570517098388112, 0.26218567296373285, 1.603951795196491, 7.456371927074961, 0.3039968992878883, 3.665430972437443, 8.623462528380442, 6.926777175073543, 6.909421420661685, 1.8863680095531088, 4.419042807484233, 5.8157740734429115, 9.897517076637053, 2.0390622523312185, 2.4773290176235485, 2.6217308377291193, 7.501724132979928, 4.569753274356928, 0.5692943841109499, 5.085162406102396, 2.1196016464367595, 7.986042447602102, 2.9733138150727223, 0.2760601195450363, 5.93432449464621, 8.438404289311888, 3.8101612406221417, 7.4985831072614335, 5.111414782971282, 5.409518049621886 ] }, "mode": "markers", "type": "scatter3d", "x": [ 0.417022004702574, 0.7203244934421581, 0.00011437481734488664, 0.30233257263183977, 0.14675589081711304, 0.0923385947687978, 0.1862602113776709, 0.34556072704304774, 0.39676747423066994, 0.538816734003357, 0.4191945144032948, 0.6852195003967595, 0.20445224973151743, 0.8781174363909454, 0.027387593197926163, 0.6704675101784022, 0.41730480236712697, 0.5586898284457517, 0.14038693859523377, 0.1981014890848788, 0.8007445686755367, 0.9682615757193975, 0.31342417815924284, 0.6923226156693141, 0.8763891522960383, 0.8946066635038473, 0.08504421136977791, 0.03905478323288236, 0.1698304195645689, 0.8781425034294131, 0.0983468338330501, 0.42110762500505217, 0.9578895301505019, 0.5331652849730171, 0.6918771139504734, 0.31551563100606295, 0.6865009276815837, 0.8346256718973729, 0.018288277344191806, 0.7501443149449675, 0.9888610889064947, 0.7481656543798394, 0.2804439920644052, 0.7892793284514885, 0.10322600657764203, 0.44789352617590517, 0.9085955030930956, 0.2936141483736795, 0.28777533858634874, 0.13002857211827767, 0.019366957870297075, 0.678835532939891, 0.21162811600005904, 0.2655466593722262, 0.4915731592803383, 0.053362545117080384, 0.5741176054920131, 0.14672857490581015, 0.5893055369032842, 0.6997583600209312, 0.10233442882782584, 0.4140559878195683, 0.6944001577277451, 0.41417926952690265, 0.04995345894608716, 0.5358964059155116, 0.6637946452197888, 0.5148891120583086, 0.9445947559908133, 0.5865550405019929, 0.9034019152878835, 0.13747470414623753, 0.13927634725075855, 0.8073912887095238, 0.3976768369855336, 0.16535419711693278, 0.9275085803960339, 0.34776585974550656, 0.7508121031361555, 0.7259979853504515, 0.8833060912058098, 0.6236722070556089, 0.7509424340273372, 0.34889834197784253, 0.2699278917650261, 0.8958862181960668, 0.4280911898712949, 0.9648400471483856, 0.6634414978184481, 0.6216957202091218, 0.11474597295337519, 0.9494892587070712, 0.4499121334799405, 0.5783896143871318, 0.40813680276128117, 0.2370269802430277, 0.9033795205622538, 0.5736794866722859, 0.00287032703115897, 0.6171449136207239 ], "y": [ 0.32664490177209615, 0.5270581022576093, 0.8859420993107745, 0.35726976000249977, 0.9085351509197992, 0.6233601157918027, 0.015821242846556283, 0.9294372337437613, 0.690896917516924, 0.9973228504514805, 0.17234050834532855, 0.13713574962887776, 0.9325954630371636, 0.6968181614899002, 0.06600017272206249, 0.7554630526024664, 0.7538761884612464, 0.9230245355464833, 0.7115247586284718, 0.1242709619721647, 0.01988013383979559, 0.026210986877719278, 0.028306488020794607, 0.2462110676030459, 0.860027948682888, 0.5388310643416528, 0.5528219786857659, 0.8420308923596057, 0.12417331511991114, 0.2791836790111395, 0.5857592714582879, 0.9695957483196745, 0.56103021925571, 0.01864728937294302, 0.8006326726806163, 0.23297427384102043, 0.8071051956187791, 0.38786064406417176, 0.8635418545594287, 0.7471216427371846, 0.5562402339904189, 0.13645522566068502, 0.05991768951221166, 0.12134345574073735, 0.044551878544761725, 0.1074941291060929, 0.2257093386078547, 0.7129889803826767, 0.5597169820541424, 0.012555980159115854, 0.07197427968948678, 0.967276330000272, 0.5681004619199421, 0.20329323466099047, 0.2523257445703234, 0.7438258540750929, 0.1954294811093188, 0.5813589272732578, 0.9700199890883123, 0.8468288014900353, 0.23984775914758616, 0.49376971426872995, 0.6199557183813798, 0.8289808995501787, 0.15679139464608427, 0.018576202177409518, 0.07002214371922233, 0.4863451109370318, 0.6063294616533303, 0.5688514370864813, 0.31736240932216075, 0.9886161544124489, 0.5797452192457969, 0.3801411726235504, 0.5509482191178968, 0.7453344309065021, 0.6692328934531846, 0.2649195576628094, 0.06633483442844157, 0.3700841979141063, 0.6297175070215645, 0.2101740099148396, 0.7527555537388139, 0.06653648135411494, 0.26031509857854096, 0.8047545637433454, 0.19343428262332774, 0.6394608808799401, 0.5246703091237337, 0.9248079703993507, 0.263296770487111, 0.06596109068402378, 0.7350659632886695, 0.7721780295432468, 0.907815852503524, 0.9319720691968373, 0.013951572975597015, 0.2343620861214205, 0.6167783570016576, 0.9490163206876164 ], "z": [ 0.9501761192470797, 0.5566531881951564, 0.9156063497662745, 0.6415662089463375, 0.39000771414124624, 0.48599066709690975, 0.6043104829199732, 0.5495479215085626, 0.9261814267064536, 0.9187334356336061, 0.3948756129235549, 0.9632625284407118, 0.17395566668046436, 0.12632951943963733, 0.13507915804673132, 0.5056621656768967, 0.021524805274197978, 0.947970211217681, 0.8271154711707325, 0.015018980742122379, 0.17619625557505525, 0.332063574366837, 0.1309968448109169, 0.8094906921265821, 0.34473665268329345, 0.9401074823333672, 0.58201417994708, 0.8788319844118441, 0.8447344453922219, 0.9053923187086492, 0.45988026581680697, 0.5463468160203733, 0.7986035911520394, 0.28571885173414757, 0.4902535226199277, 0.5991103076458784, 0.015533275550835723, 0.5934814081966372, 0.4336763489894583, 0.8073605288848414, 0.31524480309537295, 0.8928887085251513, 0.5778572152845355, 0.18401020162746506, 0.7879292338255043, 0.6120311770449339, 0.053909272073752956, 0.4201936800011322, 0.6790688365654296, 0.9186017779775258, 0.00040202489135743313, 0.9767591490310596, 0.37658031474577447, 0.9737835383583225, 0.604716100974053, 0.828845807980693, 0.5747115047081023, 0.6280761983073504, 0.28557628169569393, 0.586833340656083, 0.7500217637026599, 0.8583138364290424, 0.7550821884676802, 0.698057248447303, 0.8644794300545998, 0.32268099683674645, 0.6707887907875872, 0.45087393641334916, 0.3821027520315172, 0.4108113499221856, 0.4014795834695406, 0.3173839459582769, 0.6219193679203014, 0.43024727082126435, 0.9738020779272523, 0.6778008914343111, 0.19856988842711087, 0.4267010093480328, 0.343346239774423, 0.7976388039585666, 0.8799982885634318, 0.903841955826372, 0.6627198123752622, 0.2702082620297578, 0.25236670150458973, 0.8548979426974024, 0.5277146463087466, 0.8021610840045981, 0.5724885171916063, 0.7331425252875111, 0.5190116274640558, 0.770883910501888, 0.5688579907047155, 0.4657098785919809, 0.3426889079532818, 0.06820934841670412, 0.37792417932809985, 0.07962607769825236, 0.982817113730445, 0.18161285133076377 ] } ], "layout": { "template": { "data": { "bar": [ { "error_x": { "color": "#2a3f5f" }, "error_y": { "color": "#2a3f5f" }, "marker": { "line": { "color": "#E5ECF6", "width": 0.5 } }, "type": "bar" } ], "barpolar": [ { "marker": { "line": { "color": "#E5ECF6", "width": 0.5 } }, "type": "barpolar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "baxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "type": "carpet" } ], "choropleth": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "choropleth" } ], "contour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "contour" } ], "contourcarpet": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "contourcarpet" } ], "heatmap": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmap" } ], "heatmapgl": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmapgl" } ], "histogram": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "histogram" } ], "histogram2d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2d" } ], "histogram2dcontour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2dcontour" } ], "mesh3d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "mesh3d" } ], "parcoords": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "parcoords" } ], "pie": [ { "automargin": true, "type": "pie" } ], "scatter": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter" } ], "scatter3d": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter3d" } ], "scattercarpet": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattercarpet" } ], "scattergeo": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergeo" } ], "scattergl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergl" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#EBF0F8" }, "line": { "color": "white" } }, "header": { "fill": { "color": "#C8D4E3" }, "line": { "color": "white" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#2a3f5f", "arrowhead": 0, "arrowwidth": 1 }, "coloraxis": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "colorscale": { "diverging": [ [ 0, "#8e0152" ], [ 0.1, "#c51b7d" ], [ 0.2, "#de77ae" ], [ 0.3, "#f1b6da" ], [ 0.4, "#fde0ef" ], [ 0.5, "#f7f7f7" ], [ 0.6, "#e6f5d0" ], [ 0.7, "#b8e186" ], [ 0.8, "#7fbc41" ], [ 0.9, "#4d9221" ], [ 1, "#276419" ] ], "sequential": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "sequentialminus": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ] }, "colorway": [ "#636efa", "#EF553B", "#00cc96", "#ab63fa", "#FFA15A", "#19d3f3", "#FF6692", "#B6E880", "#FF97FF", "#FECB52" ], "font": { "color": "#2a3f5f" }, "geo": { "bgcolor": "white", "lakecolor": "white", "landcolor": "#E5ECF6", "showlakes": true, "showland": true, "subunitcolor": "white" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "light" }, "paper_bgcolor": "white", "plot_bgcolor": "#E5ECF6", "polar": { "angularaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "radialaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "yaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "zaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" } }, "shapedefaults": { "line": { "color": "#2a3f5f" } }, "ternary": { "aaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "baxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "caxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "title": { "x": 0.05 }, "xaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 } } } } }, "text/html": [ "
\n", " \n", " \n", "
\n", " \n", "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "import numpy as np\n", "import plotly.graph_objects as go\n", "\n", "np.random.seed(1)\n", "bubble3d_data = np.random.rand(5, 100)\n", "go.Figure(\n", " go.Scatter3d(\n", " x=bubble3d_data[0],\n", " y=bubble3d_data[1],\n", " z=bubble3d_data[2],\n", " mode=\"markers\", # ❶ 点で描画\n", " # ❷ 要素のサイズと色を指定\n", " marker={\"size\": bubble3d_data[3] * 10, \"color\": bubble3d_data[4]},\n", " )\n", ").show()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 3. 3. 2 3D 折れ線グラフ(Scatter3d trace)" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "mode": "lines", "type": "scatter3d", "x": [ 4.408728476930472e-15, 2.2201523066376896, 4.2217909627416, 5.886266242109593, 7.12040606431218, 7.861453623087532, 8.079910368102036, 7.78018616185719, 6.999100025866642, 5.802407889050457, 4.279650144889836, 2.5377050140583512, 0.6934988650612787, -1.1336410739967333, -2.829503540816259, -4.2919192789843885, -5.436691011507502, -6.202199750327768, -6.552454338401877, -6.478455836747787, -5.997856412470451, -5.152997000619616, -4.007502998662991, -2.641697306311986, -1.147151022978018, 0.3792686978014123, 1.8414780667938209, 3.150014680216502, 4.227293843484701, 5.011990051175422, 5.462312772918641, 5.558018809284806, 5.301082701476754, 4.71502719838194, 3.8429929867566073, 2.7446965941544397, 1.4924840407880682, 0.16673270225669998, -1.1491169009877311, -2.373604967001219, -3.4320813495609017, -4.261048513247096, -4.811781028257885, -5.053029499445817, -4.972671246691274, -4.578230455957864, -3.8962536669338568, -2.970589108889715, -1.8596774296539187, -0.633013932986007, 0.6330139329860159, 1.8596774296539271, 2.970589108889722, 3.8962536669338568, 4.5782304559578675, 4.972671246691274, 5.053029499445817, 4.811781028257885, 4.261048513247091, 3.4320813495609026, 2.3736049670012105, 1.1491169009877311, -0.1667327022567093, -1.4924840407880684, -2.7446965941544477, -3.8429929867566073, -4.71502719838195, -5.301082701476758, -5.558018809284807, -5.462312772918641, -5.011990051175416, -4.227293843484695, -3.1500146802164974, -1.841478066793821, -0.3792686978013964, 1.1471510229780288, 2.641697306311987, 4.007502998662987, 5.152997000619623, 5.997856412470454, 6.478455836747789, 6.552454338401876, 6.202199750327764, 5.436691011507503, 4.2919192789843885, 2.829503540816237, 1.1336410739967209, -0.6934988650612789, -2.5377050140583517, -4.27965014488985, -5.802407889050468, -6.999100025866643, -7.780186161857192, -8.079910368102036, -7.861453623087529, -7.120406064312181, -5.8862662421095715, -4.221790962741587, -2.2201523066376745, -4.408728476930472e-15 ], "y": [ 9, 8.55668232197548, 7.587894218500565, 6.173338365434334, 4.417967598141305, 2.4444656835897445, 0.3848935688625753, -1.627942401348715, -3.4688484774727755, -5.027815056489011, -6.216358846218069, -6.9722872233621125, -7.26264869131603, -7.084755646425132, -6.465289857373613, -5.457619329063557, -4.137560479586299, -2.5979058778497723, -0.9421007062553809, 0.722512167480432, 2.291449141776851, 3.6694325528337792, 4.775956095988691, 5.549759982953203, 5.951984692957877, 5.96786053681672, 5.606883330400367, 4.901518517735392, 3.9045617101554715, 2.685358098766126, 1.3251427403610656, -0.08819442665893293, -1.4655923810796205, -2.722222222222229, -3.7824963106204867, -4.584402955586424, -5.082933851957792, -5.25243030460626, -5.087740652522079, -4.604151300149147, -3.8361234794094625, -2.8349336112221115, -1.6653736056888, -0.401715856198558, 0.8768161069848699, 2.090807792711977, 3.165373102053421, 4.0345674927112185, 4.645249648305402, 4.960178902359397, 4.960178902359396, 4.645249648305398, 4.034567492711213, 3.165373102053421, 2.090807792711969, 0.8768161069848699, -0.4017158561985671, -1.6653736056888, -2.8349336112221195, -3.8361234794094634, -4.604151300149151, -5.087740652522079, -5.252430304606259, -5.082933851957793, -4.58440295558642, -3.7824963106204867, -2.722222222222212, -1.4655923810796117, -0.08819442665892802, 1.3251427403610656, 2.6853580987661396, 3.90456171015548, 4.901518517735394, 5.606883330400368, 5.967860536816721, 5.951984692957876, 5.549759982953205, 4.775956095988694, 3.6694325528337703, 2.2914491417768463, 0.7225121674804321, -0.9421007062553984, -2.5979058778497834, -4.137560479586299, -5.457619329063557, -6.465289857373624, -7.084755646425134, -7.2626486913160315, -6.972287223362113, -6.216358846218063, -5.027815056489002, -3.4688484774727764, -1.6279424013487154, 0.38489356886258963, 2.444465683589759, 4.417967598141306, 6.173338365434355, 7.5878942185005736, 8.556682321975485, 9 ], "z": [ -2, -1.9595959595959596, -1.9191919191919191, -1.878787878787879, -1.8383838383838385, -1.797979797979798, -1.7575757575757576, -1.7171717171717171, -1.6767676767676767, -1.6363636363636362, -1.595959595959596, -1.5555555555555556, -1.5151515151515151, -1.4747474747474747, -1.4343434343434343, -1.393939393939394, -1.3535353535353534, -1.3131313131313131, -1.2727272727272727, -1.2323232323232323, -1.1919191919191918, -1.1515151515151514, -1.1111111111111112, -1.0707070707070705, -1.0303030303030303, -0.9898989898989898, -0.9494949494949494, -0.909090909090909, -0.8686868686868685, -0.8282828282828283, -0.7878787878787878, -0.7474747474747474, -0.707070707070707, -0.6666666666666665, -0.6262626262626261, -0.5858585858585856, -0.5454545454545454, -0.505050505050505, -0.46464646464646453, -0.4242424242424241, -0.38383838383838365, -0.3434343434343432, -0.303030303030303, -0.26262626262626254, -0.2222222222222221, -0.18181818181818166, -0.14141414141414121, -0.10101010101010077, -0.06060606060606055, -0.02020202020202011, 0.020202020202020332, 0.060606060606060996, 0.10101010101010122, 0.14141414141414144, 0.1818181818181821, 0.22222222222222232, 0.262626262626263, 0.3030303030303032, 0.3434343434343434, 0.3838383838383841, 0.4242424242424243, 0.464646464646465, 0.5050505050505052, 0.5454545454545459, 0.5858585858585861, 0.6262626262626263, 0.666666666666667, 0.7070707070707072, 0.7474747474747478, 0.7878787878787881, 0.8282828282828287, 0.868686868686869, 0.9090909090909092, 0.9494949494949498, 0.9898989898989901, 1.0303030303030307, 1.070707070707071, 1.1111111111111112, 1.1515151515151518, 1.191919191919192, 1.2323232323232327, 1.272727272727273, 1.3131313131313136, 1.3535353535353538, 1.393939393939394, 1.4343434343434347, 1.474747474747475, 1.5151515151515156, 1.5555555555555558, 1.5959595959595965, 1.6363636363636367, 1.676767676767677, 1.7171717171717176, 1.7575757575757578, 1.7979797979797985, 1.8383838383838387, 1.878787878787879, 1.9191919191919196, 1.9595959595959598, 2 ] } ], "layout": { "template": { "data": { "bar": [ { "error_x": { "color": "#2a3f5f" }, "error_y": { "color": "#2a3f5f" }, "marker": { "line": { "color": "#E5ECF6", "width": 0.5 } }, "type": "bar" } ], "barpolar": [ { "marker": { "line": { "color": "#E5ECF6", "width": 0.5 } }, "type": "barpolar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "baxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "type": "carpet" } ], "choropleth": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "choropleth" } ], "contour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "contour" } ], "contourcarpet": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "contourcarpet" } ], "heatmap": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmap" } ], "heatmapgl": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmapgl" } ], "histogram": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "histogram" } ], "histogram2d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2d" } ], "histogram2dcontour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2dcontour" } ], "mesh3d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "mesh3d" } ], "parcoords": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "parcoords" } ], "pie": [ { "automargin": true, "type": "pie" } ], "scatter": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter" } ], "scatter3d": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter3d" } ], "scattercarpet": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattercarpet" } ], "scattergeo": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergeo" } ], "scattergl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergl" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#EBF0F8" }, "line": { "color": "white" } }, "header": { "fill": { "color": "#C8D4E3" }, "line": { "color": "white" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#2a3f5f", "arrowhead": 0, "arrowwidth": 1 }, "coloraxis": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "colorscale": { "diverging": [ [ 0, "#8e0152" ], [ 0.1, "#c51b7d" ], [ 0.2, "#de77ae" ], [ 0.3, "#f1b6da" ], [ 0.4, "#fde0ef" ], [ 0.5, "#f7f7f7" ], [ 0.6, "#e6f5d0" ], [ 0.7, "#b8e186" ], [ 0.8, "#7fbc41" ], [ 0.9, "#4d9221" ], [ 1, "#276419" ] ], "sequential": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "sequentialminus": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ] }, "colorway": [ "#636efa", "#EF553B", "#00cc96", "#ab63fa", "#FFA15A", "#19d3f3", "#FF6692", "#B6E880", "#FF97FF", "#FECB52" ], "font": { "color": "#2a3f5f" }, "geo": { "bgcolor": "white", "lakecolor": "white", "landcolor": "#E5ECF6", "showlakes": true, "showland": true, "subunitcolor": "white" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "light" }, "paper_bgcolor": "white", "plot_bgcolor": "#E5ECF6", "polar": { "angularaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "radialaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "yaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "zaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" } }, "shapedefaults": { "line": { "color": "#2a3f5f" } }, "ternary": { "aaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "baxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "caxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "title": { "x": 0.05 }, "xaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 } } } } }, "text/html": [ "
\n", " \n", " \n", "
\n", " \n", "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "line3d_z = np.linspace(-2, 2, 100)\n", "theta = np.linspace(-4 * np.pi, 4 * np.pi, 100)\n", "line3d_r = line3d_z ** 2 + 5\n", "line3d_x = line3d_r * np.sin(theta)\n", "line3d_y = line3d_r * np.cos(theta)\n", "go.Figure(\n", " go.Scatter3d(\n", " x=line3d_x,\n", " y=line3d_y,\n", " z=line3d_z,\n", " # ❶ 線で描画\n", " mode=\"lines\",\n", " )\n", ").show()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 3.3.3 サーフェスグラフ(Surface trace)" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "type": "surface", "x": [ [ -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10 ], [ -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9 ], [ -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8 ], [ -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7 ], [ -6, -6, -6, -6, -6, -6, -6, -6, -6, -6, -6, -6, -6, -6, -6, -6, -6, -6, -6, -6 ], [ -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5 ], [ -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4 ], [ -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3 ], [ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2 ], [ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ], [ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 ], [ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 ], [ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 ], [ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6 ], [ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7 ], [ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 ], [ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9 ] ], "y": [ [ -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ], [ -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ], [ -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ], [ -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ], [ -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ], [ -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ], [ -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ], [ -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ], [ -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ], [ -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ], [ -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ], [ -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ], [ -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ], [ -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ], [ -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ], [ -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ], [ -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ], [ -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ], [ -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ], [ -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ] ], "z": [ [ 300, 271, 244, 219, 196, 175, 156, 139, 124, 111, 100, 91, 84, 79, 76, 75, 76, 79, 84, 91 ], [ 271, 243, 217, 193, 171, 151, 133, 117, 103, 91, 81, 73, 67, 63, 61, 61, 63, 67, 73, 81 ], [ 244, 217, 192, 169, 148, 129, 112, 97, 84, 73, 64, 57, 52, 49, 48, 49, 52, 57, 64, 73 ], [ 219, 193, 169, 147, 127, 109, 93, 79, 67, 57, 49, 43, 39, 37, 37, 39, 43, 49, 57, 67 ], [ 196, 171, 148, 127, 108, 91, 76, 63, 52, 43, 36, 31, 28, 27, 28, 31, 36, 43, 52, 63 ], [ 175, 151, 129, 109, 91, 75, 61, 49, 39, 31, 25, 21, 19, 19, 21, 25, 31, 39, 49, 61 ], [ 156, 133, 112, 93, 76, 61, 48, 37, 28, 21, 16, 13, 12, 13, 16, 21, 28, 37, 48, 61 ], [ 139, 117, 97, 79, 63, 49, 37, 27, 19, 13, 9, 7, 7, 9, 13, 19, 27, 37, 49, 63 ], [ 124, 103, 84, 67, 52, 39, 28, 19, 12, 7, 4, 3, 4, 7, 12, 19, 28, 39, 52, 67 ], [ 111, 91, 73, 57, 43, 31, 21, 13, 7, 3, 1, 1, 3, 7, 13, 21, 31, 43, 57, 73 ], [ 100, 81, 64, 49, 36, 25, 16, 9, 4, 1, 0, 1, 4, 9, 16, 25, 36, 49, 64, 81 ], [ 91, 73, 57, 43, 31, 21, 13, 7, 3, 1, 1, 3, 7, 13, 21, 31, 43, 57, 73, 91 ], [ 84, 67, 52, 39, 28, 19, 12, 7, 4, 3, 4, 7, 12, 19, 28, 39, 52, 67, 84, 103 ], [ 79, 63, 49, 37, 27, 19, 13, 9, 7, 7, 9, 13, 19, 27, 37, 49, 63, 79, 97, 117 ], [ 76, 61, 48, 37, 28, 21, 16, 13, 12, 13, 16, 21, 28, 37, 48, 61, 76, 93, 112, 133 ], [ 75, 61, 49, 39, 31, 25, 21, 19, 19, 21, 25, 31, 39, 49, 61, 75, 91, 109, 129, 151 ], [ 76, 63, 52, 43, 36, 31, 28, 27, 28, 31, 36, 43, 52, 63, 76, 91, 108, 127, 148, 171 ], [ 79, 67, 57, 49, 43, 39, 37, 37, 39, 43, 49, 57, 67, 79, 93, 109, 127, 147, 169, 193 ], [ 84, 73, 64, 57, 52, 49, 48, 49, 52, 57, 64, 73, 84, 97, 112, 129, 148, 169, 192, 217 ], [ 91, 81, 73, 67, 63, 61, 61, 63, 67, 73, 81, 91, 103, 117, 133, 151, 171, 193, 217, 243 ] ] } ], "layout": { "template": { "data": { "bar": [ { "error_x": { "color": "#2a3f5f" }, "error_y": { "color": "#2a3f5f" }, "marker": { "line": { "color": "#E5ECF6", "width": 0.5 } }, "type": "bar" } ], "barpolar": [ { "marker": { "line": { "color": "#E5ECF6", "width": 0.5 } }, "type": "barpolar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "baxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "type": "carpet" } ], "choropleth": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "choropleth" } ], "contour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "contour" } ], "contourcarpet": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "contourcarpet" } ], "heatmap": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmap" } ], "heatmapgl": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmapgl" } ], "histogram": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "histogram" } ], "histogram2d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2d" } ], "histogram2dcontour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2dcontour" } ], "mesh3d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "mesh3d" } ], "parcoords": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "parcoords" } ], "pie": [ { "automargin": true, "type": "pie" } ], "scatter": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter" } ], "scatter3d": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter3d" } ], "scattercarpet": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattercarpet" } ], "scattergeo": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergeo" } ], "scattergl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergl" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#EBF0F8" }, "line": { "color": "white" } }, "header": { "fill": { "color": "#C8D4E3" }, "line": { "color": "white" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#2a3f5f", "arrowhead": 0, "arrowwidth": 1 }, "coloraxis": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "colorscale": { "diverging": [ [ 0, "#8e0152" ], [ 0.1, "#c51b7d" ], [ 0.2, "#de77ae" ], [ 0.3, "#f1b6da" ], [ 0.4, "#fde0ef" ], [ 0.5, "#f7f7f7" ], [ 0.6, "#e6f5d0" ], [ 0.7, "#b8e186" ], [ 0.8, "#7fbc41" ], [ 0.9, "#4d9221" ], [ 1, "#276419" ] ], "sequential": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "sequentialminus": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ] }, "colorway": [ "#636efa", "#EF553B", "#00cc96", "#ab63fa", "#FFA15A", "#19d3f3", "#FF6692", "#B6E880", "#FF97FF", "#FECB52" ], "font": { "color": "#2a3f5f" }, "geo": { "bgcolor": "white", "lakecolor": "white", "landcolor": "#E5ECF6", "showlakes": true, "showland": true, "subunitcolor": "white" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "light" }, "paper_bgcolor": "white", "plot_bgcolor": "#E5ECF6", "polar": { "angularaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "radialaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "yaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "zaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" } }, "shapedefaults": { "line": { "color": "#2a3f5f" } }, "ternary": { "aaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "baxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "caxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "title": { "x": 0.05 }, "xaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 } } } } }, "text/html": [ "
\n", " \n", " \n", "
\n", " \n", "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "surface_x, surface_y = np.mgrid[-10:10, -10:10]\n", "surface_z = surface_x ** 2 + surface_y ** 2 + surface_x * surface_y\n", "go.Figure(go.Surface(x=surface_x, y=surface_y, z=surface_z)).show()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 3.3.4 メッシュグラフ(Mesh3d trace)" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "type": "mesh3d", "x": [ 1.6243453636632417, -0.6117564136500754, -0.5281717522634557, -1.0729686221561705, 0.8654076293246785, -2.3015386968802827, 1.74481176421648, -0.7612069008951028, 0.31903909605709857, -0.2493703754774101, 1.462107937044974, -2.060140709497654, -0.3224172040135075, -0.38405435466841564, 1.1337694423354374, -1.0998912673140309, -0.17242820755043575, -0.8778584179213718, 0.04221374671559283, 0.5828152137158222, -1.1006191772129212, 1.1447237098396141, 0.9015907205927955, 0.5024943389018682, 0.9008559492644118, -0.6837278591743331, -0.12289022551864817, -0.9357694342590688, -0.2678880796260159, 0.530355466738186, -0.691660751725309, -0.39675352685597737, -0.6871727001195994, -0.8452056414987196, -0.671246130836819, -0.01266459891890136, -1.1173103486352778, 0.23441569781709215, 1.6598021771098705, 0.7420441605773356, -0.19183555236161492, -0.8876289640848363, -0.7471582937508376, 1.6924546010277466, 0.05080775477602897, -0.6369956465693534, 0.19091548466746602, 2.100255136478842, 0.12015895248162915, 0.6172031097074192, 0.3001703199558275, -0.35224984649351865, -1.1425181980221402, -0.3493427224128775, -0.2088942333747781, 0.5866231911821976, 0.8389834138745049, 0.9311020813035573, 0.2855873252542588, 0.8851411642707281, -0.7543979409966528, 1.2528681552332879, 0.5129298204180088, -0.29809283510271567, 0.48851814653749703, -0.07557171302105573, 1.131629387451427, 1.5198168164221988, 2.1855754065331614, -1.3964963354881377, -1.4441138054295894, -0.5044658629464512, 0.16003706944783047, 0.8761689211162249, 0.31563494724160523, -2.022201215824003, -0.3062040126283718, 0.8279746426072462, 0.2300947353643834, 0.7620111803120247, -0.22232814261035927, -0.20075806892999745, 0.1865613909882843, 0.4100516472082563, 0.19829972012676975, 0.11900864580745882, -0.6706622862890306, 0.3775637863209194, 0.12182127099143693, 1.1294839079119197, 1.198917879901507, 0.18515641748394385, -0.3752849500901142, -0.6387304074542224, 0.4234943540641129, 0.07734006834855942, -0.3438536755710756, 0.04359685683424694, -0.6200008439481293, 0.6980320340722189, -0.4471285647859982, 1.2245077048054989, 0.4034916417908, 0.593578523237067, -1.0949118457410418, 0.1693824330586681, 0.7405564510962748, -0.9537006018079346, -0.26621850600362207, 0.03261454669335856, -1.3731173202467557, 0.31515939204229176, 0.8461606475850334, -0.8595159408319863, 0.35054597866410736, -1.3122834112374318, -0.038695509266051115, -1.6157723547032947, 1.121417708235664, 0.4089005379368278, -0.024616955875778355, -0.7751616191691596, 1.2737559301587766, 1.9671017492547347, -1.857981864446752, 1.2361640304528203, 1.6276507531489064, 0.3380116965744758, -1.199268032335186, 0.8633453175440216, -0.18092030207815046, -0.6039206277932573, -1.2300581356669618, 0.5505374959762154, 0.7928068659193477, -0.6235307296797916, 0.5205763370733708, -1.1443413896231427, 0.8018610318713447, 0.04656729842414554, -0.18656977190734877, -0.10174587252914521, 0.8688861570058679, 0.7504116398650081, 0.5294653243527092, 0.13770120999738608, 0.07782112791270591, 0.6183802619985245, 0.23249455917873788, 0.6825514068644851, -0.31011677351806, -2.434837764107139, 1.038824601859414, 2.1869796469742577, 0.44136444356858207, -0.10015523328349978, -0.13644474389603303, -0.11905418777480989, 0.0174094083000046, -1.1220187287468883, -0.5170944579202279, -0.997026827650263, 0.2487991613877705, -0.29664115237086275, 0.4952113239779604, -0.17470315974250095, 0.9863351878212421, 0.2135339013354418, 2.1906997289697334, -1.8963609228910925, -0.646916688254908, 0.901486891648711, 2.528325706806398, -0.24863477771546005, 0.043668993178389105, -0.22631424251360518, 1.3314571125875918, -0.2873078634760189, 0.6800698398781045, -0.3198015988986712, -1.2725587552459943, 0.31354772046343216, 0.5031848134353261, 1.2932258825322618, -0.11044702641731631, -0.6173620637123609, 0.5627610966190263, 0.24073709223773224, 0.28066507712263905, -0.07311270374727777, 1.1603385699937696, 0.36949271637572373, 1.9046587083409812, 1.1110566985605046, 0.6590497961002102, -1.6274383406162574, 0.602319280295629, 0.42028220364705954, 0.8109516728035557, 1.0444420947072588 ], "y": [ -0.40087819178892664, 0.8240056184504077, -0.5623054310190898, 1.9548780750090344, -1.3319516665172482, -1.7606885603987834, -1.6507212658241002, -0.8905555841630485, -1.119115398559728, 1.956078903703642, -0.32649949807818424, -1.342675789377436, 1.114382976779792, -0.5865239388215925, -1.2368533765413974, 0.8758389276492995, 0.6233621765780327, -0.4349566829552277, 1.4075400002412286, 0.12910157971072544, 1.6169495988573002, 0.5027408819999043, 1.5588055406198593, 0.10940269642542817, -1.2197443969790327, 2.4493686490613973, -0.5457741679825677, -0.19883786288889674, -0.7003985049212547, -0.20339444896455844, 0.24266944108179458, 0.20183017887400403, 0.6610202875986929, 1.792158208975567, -0.12046457178850745, -1.2331207354464266, -1.1823181265096336, -0.6657545181991266, -1.674195807618932, 0.8250298244389859, -0.4982135636310781, -0.3109849783028509, -0.0018914828380037015, -1.396620424595432, -0.861316360776042, 0.6747115256879723, 0.6185391307862932, -0.44317193070063776, 1.8105349141254563, -1.3057269225577375, -0.34498721015497946, -0.23083974313546946, -2.79308500014654, 1.9375288136160798, 0.36633201454005826, -1.0445893819077916, 2.0511734428574444, 0.5856620001723825, 0.4295261400219645, -0.6069983982000461, 0.1062227240352178, -1.5256803162293577, 0.7950260944248447, -0.37443831884322065, 0.13404819655462313, 1.2020548621997058, 0.28474811084905793, 0.2624674454632686, 0.27649930482218366, -0.7332716038953129, 0.8360047194342688, 1.5433591108044837, 0.7588056600979309, 0.8849088144648833, -0.8772815189181883, -0.8677872228729256, -1.44087602429184, 1.232253070828436, -0.2541798676073683, 1.3998439424809859, -0.7819116826868007, -0.437508982828581, 0.0954250871912577, 0.9214500686595114, 0.060750195799506745, 0.21112475500771674, 0.01652756730561561, 0.17718772027596041, -1.1164700178847444, 0.0809271009732786, -0.18657899351146628, -0.0568244808858473, 0.4923365559366488, -0.6806781410088858, -0.0845080274046298, -0.2973618827735036, 0.41730200497486253, 0.7847706510155895, -0.9554252623736892, 0.5859104311026156, 2.0657833202188343, -1.471156925832625, -0.8301718953151139, -0.8805775998441709, -0.27909772154329027, 1.622849085954001, 0.013352676347176594, -0.6946935952872263, 0.6218035043055724, -0.5998045310708474, 1.1234121620219353, 0.30526704024401075, 1.3887793963702684, -0.6613442431530187, 3.0308571123720305, 0.8245846250334574, 0.6545801525867004, -0.05118844760766421, -0.7255971191344275, -0.8677686776235903, -0.13597732610058932, -0.7972697854931297, 0.28267571224842025, -0.8260974318473202, 0.6210827008390084, 0.9561217041246964, -0.7058405074022839, 1.1926860677546935, -0.23794193575218264, 1.1552878860882252, 0.4381663472912375, 1.1223283216570923, -0.9970197955296825, -0.10679398677922511, 1.4514292605909354, -0.6180368476815788, -2.037201225680795, -1.9425891814764555, -2.506440652676061, -2.114163921916826, -0.41163916318848254, 1.2785280828417218, -0.4422292795131728, 0.3235273536014321, -0.10999149016360682, 0.008548945436024693, -0.16819883974471597, -0.1741803443079907, 0.46116409997701746, -1.1759826714413153, 1.0101271773347245, 0.9200179332477632, -0.19505734087590118, 0.8053934242321815, -0.7013444262571769, -0.5372230238753384, 0.15626385027008327, -0.1902210250848615, -0.44873803267162277, -0.6724480387865963, -0.5574947217860433, 0.9391687441964878, -1.9433234056683528, 0.352494364369333, -0.2364369518129867, 0.7278134999996488, 0.5150736136393657, -2.7825344676529227, 0.5846466104774262, 0.32427424344842104, 0.02186283662655242, -0.46867381627789134, 0.8532812219556223, -0.4130293097110322, 1.8347176266496867, 0.5643828554943137, 2.1378280674394823, -0.7855339969202355, -1.7559256402328518, 0.7147895974858154, 0.8527040617252863, 0.03536009705475734, -1.5387932457446432, -0.4478951847161186, 0.6179855339203347, -0.18417632565374534, -0.11598518547239624, -0.1754589686617526, -0.9339146556265013, -0.5330203260835993, -1.426555420520532, 1.7679599483110264, -0.4753728751379821, 0.47761018181755727, -1.0218859446413093, 0.7945282396010823, -1.8731609776353015, 0.9206151180549562, -0.03536792487871091, 2.1106050536007097 ], "z": [ -1.3065340728440185, 0.076380480159592, 0.3672318138838647, 1.2328991923762371, -0.4228569613907754, 0.08646440652428741, -2.1424667290773685, -0.830168864022708, 0.45161595055524156, 1.1041743263032135, -0.28173626906561283, 2.0563555231982935, 1.7602492264490932, -0.06065249177480989, -2.4135030011737877, -1.7775663758059874, -0.7778588266274128, 1.1158411079241686, 0.3102722877837673, -2.094247816222812, -0.22876582887016242, 1.6133613745631155, -0.3748046873026527, -0.7499696172756662, 2.054624102518116, 0.05340953679834792, -0.4791570987860799, 0.3501671588282789, 0.017164726374088564, -0.42914227823509377, 1.208456328551963, 1.1157018027844863, 0.8408615581411037, -0.1028872175735376, 1.146900376399483, -0.04970257915867584, 0.46664326722884075, 1.033686867939501, 0.8088443602656821, 1.7897546832062712, 0.4512840160401709, -1.6840599858682372, -1.1601701049822761, 1.350106818681726, -0.3312831699326283, 0.3865391451330911, -0.8514556565308268, 1.000881423680301, -0.38483224883279044, 1.4581082386095199, -0.5322340208981775, 1.1181333967176956, 0.6743961048208689, -0.7223919054141509, 1.0989963327471792, -0.901634490475998, -0.8224671889042517, 0.7217112921126926, -0.625342001465988, -0.5938430672545096, -0.3439007092103924, -1.0001691898725158, 1.0449944096738975, 0.6085146984848496, -0.06932869669048287, -0.10839206717353982, 0.45015551276717897, 1.7653351005190716, 0.8709698025322423, -0.5084571342754007, 0.7774192052488628, -0.11877117210308928, -0.19899818380372442, 1.8664713751521251, -0.41893789767812306, -0.47918491512740585, -1.9521052872452325, -1.4023291454531368, 0.4511229387345986, -0.6949209011852391, 0.515413801783241, -1.1148710523659369, -0.7673098263317347, 0.6745707069560037, 1.460892380463078, 0.5924728014240198, 1.197830841721251, 1.7045941713724069, 1.0400891531540952, -0.918440038300026, -0.10534471250754213, 0.630195670684911, -0.4148469012882354, 0.45194603732122307, -1.5791562853944654, -0.8286279788564058, 0.528879745585174, -2.2370865111124707, -1.1077125022845524, -0.01771831791014226, -1.719394474619523, 0.057120996082092076, -0.7995474906917599, -0.2915945955008327, -0.25898285340053234, 0.1892931975586576, -0.5637887345823027, 0.08968640732259017, -0.6011568006493835, 0.5560735100773853, 1.693809113288081, 0.19686977925029145, 0.1698692553475717, -1.1640079711612021, 0.6933662256603845, -0.7580673285562323, -0.8088471964721285, 0.5574394528580334, 0.18103874435787085, 1.1071754509490623, 1.4428769284963092, -0.5396815622024924, 0.12837699015594436, 1.7604151835753223, 0.9665392502290573, 0.7130490503032691, 1.3062060651354486, -0.604602969164376, 0.6365834094146309, 1.4092533893640082, 1.6209122856217475, -0.8061848173822241, -0.2516742076314244, 0.3827151737243639, -0.2889973430098159, -0.3918162398080484, 0.684001328181953, -0.35340998286701436, -1.7879128911997157, 0.36184731583956825, -0.4244927905709274, -0.7315309817303334, -1.5657381506559054, 1.0138224669717055, -2.2271126318500145, -1.6993336047222958, -0.27584606256114336, 1.2289555856506973, 1.3097059056826534, -1.1549826349293644, -0.17763219598355098, -1.5104563750875688, 1.0112070637749084, -1.4765626605201803, -0.14319574500723764, 1.0329837789497511, -0.22241402852990858, 1.4701603438257402, -0.870008223190852, 0.36919046954687373, 0.8532821858237332, -0.13971173044107246, 1.3863142642463189, 0.5481295846881931, -1.6374495930083417, 3.9586027040379634, 0.6486436440906672, 0.10734329382358966, -1.3988128186664763, 0.08176781880561644, -0.45994283084068716, 0.6443536660303223, 0.37167029121186534, 1.853009485069379, 0.14225137252631778, 0.5135054799885475, 0.3724568515114425, -0.14848980305939366, -0.1834001973200239, 1.1010002026684818, 0.7800271353386294, -0.62944160405378, -1.1134361029729902, -0.06741002494685439, 1.1614399816743937, -0.027529386267978004, 1.7464350892279725, -0.7750702870734348, 0.14164053766580517, -2.516303860965749, -0.5956678809102903, -0.30912131864186215, 0.5109377744920892, 1.7106618386711354, 0.03494358936374005, 1.4539175816088175, 0.6616810764659825, 0.9863521802120643, -0.466154856825928, 1.3849913436486387 ] } ], "layout": { "template": { "data": { "bar": [ { "error_x": { "color": "#2a3f5f" }, "error_y": { "color": "#2a3f5f" }, "marker": { "line": { "color": "#E5ECF6", "width": 0.5 } }, "type": "bar" } ], "barpolar": [ { "marker": { "line": { "color": "#E5ECF6", "width": 0.5 } }, "type": "barpolar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "baxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "type": "carpet" } ], "choropleth": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "choropleth" } ], "contour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "contour" } ], "contourcarpet": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "contourcarpet" } ], "heatmap": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmap" } ], "heatmapgl": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmapgl" } ], "histogram": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "histogram" } ], "histogram2d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2d" } ], "histogram2dcontour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2dcontour" } ], "mesh3d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "mesh3d" } ], "parcoords": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "parcoords" } ], "pie": [ { "automargin": true, "type": "pie" } ], "scatter": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter" } ], "scatter3d": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter3d" } ], "scattercarpet": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattercarpet" } ], "scattergeo": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergeo" } ], "scattergl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergl" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#EBF0F8" }, "line": { "color": "white" } }, "header": { "fill": { "color": "#C8D4E3" }, "line": { "color": "white" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#2a3f5f", "arrowhead": 0, "arrowwidth": 1 }, "coloraxis": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "colorscale": { "diverging": [ [ 0, "#8e0152" ], [ 0.1, "#c51b7d" ], [ 0.2, "#de77ae" ], [ 0.3, "#f1b6da" ], [ 0.4, "#fde0ef" ], [ 0.5, "#f7f7f7" ], [ 0.6, "#e6f5d0" ], [ 0.7, "#b8e186" ], [ 0.8, "#7fbc41" ], [ 0.9, "#4d9221" ], [ 1, "#276419" ] ], "sequential": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "sequentialminus": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ] }, "colorway": [ "#636efa", "#EF553B", "#00cc96", "#ab63fa", "#FFA15A", "#19d3f3", "#FF6692", "#B6E880", "#FF97FF", "#FECB52" ], "font": { "color": "#2a3f5f" }, "geo": { "bgcolor": "white", "lakecolor": "white", "landcolor": "#E5ECF6", "showlakes": true, "showland": true, "subunitcolor": "white" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "light" }, "paper_bgcolor": "white", "plot_bgcolor": "#E5ECF6", "polar": { "angularaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "radialaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "yaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "zaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" } }, "shapedefaults": { "line": { "color": "#2a3f5f" } }, "ternary": { "aaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "baxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "caxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "title": { "x": 0.05 }, "xaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 } } } } }, "text/html": [ "
\n", " \n", " \n", "
\n", " \n", "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "np.random.seed(1)\n", "mesh3d_data = np.random.randn(3, 200)\n", "go.Figure(\n", " go.Mesh3d(x=mesh3d_data[0], y=mesh3d_data[1], z=mesh3d_data[2])\n", ").show()" ] } ], "metadata": { "celltoolbar": "Raw Cell Format", "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.2" } }, "nbformat": 4, "nbformat_minor": 2 }