{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "778f9586", "metadata": { "lines_to_next_cell": 0 }, "outputs": [], "source": [ "import os\n", "\n", "# Data Wrangling\n", "import numpy as np\n", "import pandas as pd\n", "\n", "# Data Modeling\n", "import statsmodels.api as sm \n", "import statsmodels.formula.api as smf # tilde formulas (y ~ x1 + x2)\n", "\n", "# Graphing\n", "import plotly.express as px # Main interface\n", "import plotly.figure_factory as ff # Specialized plots (dendrograms, density plots)\n", "import plotly.graph_objects as go # Lower level interface" ] }, { "cell_type": "code", "execution_count": 2, "id": "d4468565", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
Unnamed: 0speciesislandbill_length_mmbill_depth_mmflipper_length_mmbody_mass_gsexyear
01AdelieTorgersen39.118.7181.03750.0male2007
12AdelieTorgersen39.517.4186.03800.0female2007
23AdelieTorgersen40.318.0195.03250.0female2007
34AdelieTorgersenNaNNaNNaNNaNNaN2007
45AdelieTorgersen36.719.3193.03450.0female2007
..............................
339340ChinstrapDream55.819.8207.04000.0male2009
340341ChinstrapDream43.518.1202.03400.0female2009
341342ChinstrapDream49.618.2193.03775.0male2009
342343ChinstrapDream50.819.0210.04100.0male2009
343344ChinstrapDream50.218.7198.03775.0female2009
\n", "

344 rows × 9 columns

\n", "
" ], "text/plain": [ " Unnamed: 0 species island bill_length_mm bill_depth_mm \\\n", "0 1 Adelie Torgersen 39.1 18.7 \n", "1 2 Adelie Torgersen 39.5 17.4 \n", "2 3 Adelie Torgersen 40.3 18.0 \n", "3 4 Adelie Torgersen NaN NaN \n", "4 5 Adelie Torgersen 36.7 19.3 \n", ".. ... ... ... ... ... \n", "339 340 Chinstrap Dream 55.8 19.8 \n", "340 341 Chinstrap Dream 43.5 18.1 \n", "341 342 Chinstrap Dream 49.6 18.2 \n", "342 343 Chinstrap Dream 50.8 19.0 \n", "343 344 Chinstrap Dream 50.2 18.7 \n", "\n", " flipper_length_mm body_mass_g sex year \n", "0 181.0 3750.0 male 2007 \n", "1 186.0 3800.0 female 2007 \n", "2 195.0 3250.0 female 2007 \n", "3 NaN NaN NaN 2007 \n", "4 193.0 3450.0 female 2007 \n", ".. ... ... ... ... \n", "339 207.0 4000.0 male 2009 \n", "340 202.0 3400.0 female 2009 \n", "341 193.0 3775.0 male 2009 \n", "342 210.0 4100.0 male 2009 \n", "343 198.0 3775.0 female 2009 \n", "\n", "[344 rows x 9 columns]" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "penguins = pd.read_csv('./penguins.csv')\n", "penguins" ] }, { "cell_type": "markdown", "id": "e29f6a73", "metadata": {}, "source": [ "# Express & Figure Factory" ] }, { "cell_type": "code", "execution_count": 3, "id": "dbc8cdfe", "metadata": { "scrolled": false }, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "hovertemplate": "species=Adelie
bill_length_mm=%{x}
bill_depth_mm=%{y}", "legendgroup": "Adelie", "marker": { "color": "#636efa", "symbol": "circle" }, "mode": "markers", "name": "Adelie", "orientation": "v", "showlegend": true, "type": "scatter", "x": [ 39.1, 39.5, 40.3, null, 36.7, 39.3, 38.9, 39.2, 34.1, 42, 37.8, 37.8, 41.1, 38.6, 34.6, 36.6, 38.7, 42.5, 34.4, 46, 37.8, 37.7, 35.9, 38.2, 38.8, 35.3, 40.6, 40.5, 37.9, 40.5, 39.5, 37.2, 39.5, 40.9, 36.4, 39.2, 38.8, 42.2, 37.6, 39.8, 36.5, 40.8, 36, 44.1, 37, 39.6, 41.1, 37.5, 36, 42.3, 39.6, 40.1, 35, 42, 34.5, 41.4, 39, 40.6, 36.5, 37.6, 35.7, 41.3, 37.6, 41.1, 36.4, 41.6, 35.5, 41.1, 35.9, 41.8, 33.5, 39.7, 39.6, 45.8, 35.5, 42.8, 40.9, 37.2, 36.2, 42.1, 34.6, 42.9, 36.7, 35.1, 37.3, 41.3, 36.3, 36.9, 38.3, 38.9, 35.7, 41.1, 34, 39.6, 36.2, 40.8, 38.1, 40.3, 33.1, 43.2, 35, 41, 37.7, 37.8, 37.9, 39.7, 38.6, 38.2, 38.1, 43.2, 38.1, 45.6, 39.7, 42.2, 39.6, 42.7, 38.6, 37.3, 35.7, 41.1, 36.2, 37.7, 40.2, 41.4, 35.2, 40.6, 38.8, 41.5, 39, 44.1, 38.5, 43.1, 36.8, 37.5, 38.1, 41.1, 35.6, 40.2, 37, 39.7, 40.2, 40.6, 32.1, 40.7, 37.3, 39, 39.2, 36.6, 36, 37.8, 36, 41.5 ], "xaxis": "x", "y": [ 18.7, 17.4, 18, null, 19.3, 20.6, 17.8, 19.6, 18.1, 20.2, 17.1, 17.3, 17.6, 21.2, 21.1, 17.8, 19, 20.7, 18.4, 21.5, 18.3, 18.7, 19.2, 18.1, 17.2, 18.9, 18.6, 17.9, 18.6, 18.9, 16.7, 18.1, 17.8, 18.9, 17, 21.1, 20, 18.5, 19.3, 19.1, 18, 18.4, 18.5, 19.7, 16.9, 18.8, 19, 18.9, 17.9, 21.2, 17.7, 18.9, 17.9, 19.5, 18.1, 18.6, 17.5, 18.8, 16.6, 19.1, 16.9, 21.1, 17, 18.2, 17.1, 18, 16.2, 19.1, 16.6, 19.4, 19, 18.4, 17.2, 18.9, 17.5, 18.5, 16.8, 19.4, 16.1, 19.1, 17.2, 17.6, 18.8, 19.4, 17.8, 20.3, 19.5, 18.6, 19.2, 18.8, 18, 18.1, 17.1, 18.1, 17.3, 18.9, 18.6, 18.5, 16.1, 18.5, 17.9, 20, 16, 20, 18.6, 18.9, 17.2, 20, 17, 19, 16.5, 20.3, 17.7, 19.5, 20.7, 18.3, 17, 20.5, 17, 18.6, 17.2, 19.8, 17, 18.5, 15.9, 19, 17.6, 18.3, 17.1, 18, 17.9, 19.2, 18.5, 18.5, 17.6, 17.5, 17.5, 20.1, 16.5, 17.9, 17.1, 17.2, 15.5, 17, 16.8, 18.7, 18.6, 18.4, 17.8, 18.1, 17.1, 18.5 ], "yaxis": "y" }, { "hovertemplate": "OLS trendline
bill_depth_mm = 0.178834 * bill_length_mm + 11.4091
R2=0.153266

species=Adelie
bill_length_mm=%{x}
bill_depth_mm=%{y} (trend)", "legendgroup": "Adelie", "marker": { "color": "#636efa", "symbol": "circle" }, "mode": "lines", "name": "Adelie", "showlegend": false, "type": "scatter", "x": [ 32.1, 33.1, 33.5, 34, 34.1, 34.4, 34.5, 34.6, 34.6, 35, 35, 35.1, 35.2, 35.3, 35.5, 35.5, 35.6, 35.7, 35.7, 35.7, 35.9, 35.9, 36, 36, 36, 36, 36.2, 36.2, 36.2, 36.3, 36.4, 36.4, 36.5, 36.5, 36.6, 36.6, 36.7, 36.7, 36.8, 36.9, 37, 37, 37.2, 37.2, 37.3, 37.3, 37.3, 37.5, 37.5, 37.6, 37.6, 37.6, 37.7, 37.7, 37.7, 37.8, 37.8, 37.8, 37.8, 37.8, 37.9, 37.9, 38.1, 38.1, 38.1, 38.1, 38.2, 38.2, 38.3, 38.5, 38.6, 38.6, 38.6, 38.7, 38.8, 38.8, 38.8, 38.9, 38.9, 39, 39, 39, 39.1, 39.2, 39.2, 39.2, 39.3, 39.5, 39.5, 39.5, 39.6, 39.6, 39.6, 39.6, 39.6, 39.7, 39.7, 39.7, 39.7, 39.8, 40.1, 40.2, 40.2, 40.2, 40.3, 40.3, 40.5, 40.5, 40.6, 40.6, 40.6, 40.6, 40.7, 40.8, 40.8, 40.9, 40.9, 41, 41.1, 41.1, 41.1, 41.1, 41.1, 41.1, 41.1, 41.3, 41.3, 41.4, 41.4, 41.5, 41.5, 41.6, 41.8, 42, 42, 42.1, 42.2, 42.2, 42.3, 42.5, 42.7, 42.8, 42.9, 43.1, 43.2, 43.2, 44.1, 44.1, 45.6, 45.8, 46 ], "xaxis": "x", "y": [ 17.149707106762516, 17.328541456405095, 17.400075196262126, 17.489492371083415, 17.507375806047673, 17.561026110940446, 17.5789095459047, 17.596792980868962, 17.596792980868962, 17.668326720725993, 17.668326720725993, 17.68621015569025, 17.70409359065451, 17.721977025618763, 17.75774389554728, 17.75774389554728, 17.77562733051154, 17.793510765475798, 17.793510765475798, 17.793510765475798, 17.82927763540431, 17.82927763540431, 17.84716107036857, 17.84716107036857, 17.84716107036857, 17.84716107036857, 17.882927940297087, 17.882927940297087, 17.882927940297087, 17.90081137526134, 17.918694810225603, 17.918694810225603, 17.936578245189857, 17.936578245189857, 17.954461680154118, 17.954461680154118, 17.972345115118376, 17.972345115118376, 17.99022855008263, 18.008111985046888, 18.02599542001115, 18.02599542001115, 18.061762289939665, 18.061762289939665, 18.07964572490392, 18.07964572490392, 18.07964572490392, 18.115412594832435, 18.115412594832435, 18.133296029796696, 18.133296029796696, 18.133296029796696, 18.15117946476095, 18.15117946476095, 18.15117946476095, 18.16906289972521, 18.16906289972521, 18.16906289972521, 18.16906289972521, 18.16906289972521, 18.186946334689466, 18.186946334689466, 18.222713204617982, 18.222713204617982, 18.222713204617982, 18.222713204617982, 18.240596639582243, 18.240596639582243, 18.258480074546497, 18.294246944475013, 18.312130379439274, 18.312130379439274, 18.312130379439274, 18.33001381440353, 18.347897249367787, 18.347897249367787, 18.347897249367787, 18.365780684332044, 18.365780684332044, 18.383664119296302, 18.383664119296302, 18.383664119296302, 18.40154755426056, 18.41943098922482, 18.41943098922482, 18.41943098922482, 18.437314424189076, 18.47308129411759, 18.47308129411759, 18.47308129411759, 18.490964729081853, 18.490964729081853, 18.490964729081853, 18.490964729081853, 18.490964729081853, 18.508848164046107, 18.508848164046107, 18.508848164046107, 18.508848164046107, 18.526731599010365, 18.580381903903138, 18.5982653388674, 18.5982653388674, 18.5982653388674, 18.616148773831654, 18.616148773831654, 18.65191564376017, 18.65191564376017, 18.669799078724427, 18.669799078724427, 18.669799078724427, 18.669799078724427, 18.687682513688685, 18.705565948652943, 18.705565948652943, 18.7234493836172, 18.7234493836172, 18.74133281858146, 18.759216253545716, 18.759216253545716, 18.759216253545716, 18.759216253545716, 18.759216253545716, 18.759216253545716, 18.759216253545716, 18.794983123474232, 18.794983123474232, 18.81286655843849, 18.81286655843849, 18.830749993402748, 18.830749993402748, 18.848633428367005, 18.88440029829552, 18.920167168224037, 18.920167168224037, 18.938050603188294, 18.955934038152552, 18.955934038152552, 18.97381747311681, 19.009584343045326, 19.04535121297384, 19.0632346479381, 19.081118082902357, 19.116884952830873, 19.13476838779513, 19.13476838779513, 19.29571930247345, 19.29571930247345, 19.563970826937318, 19.599737696865834, 19.63550456679435 ], "yaxis": "y" }, { "hovertemplate": "species=Gentoo
bill_length_mm=%{x}
bill_depth_mm=%{y}", "legendgroup": "Gentoo", "marker": { "color": "#EF553B", "symbol": "circle" }, "mode": "markers", "name": "Gentoo", "orientation": "v", "showlegend": true, "type": "scatter", "x": [ 46.1, 50, 48.7, 50, 47.6, 46.5, 45.4, 46.7, 43.3, 46.8, 40.9, 49, 45.5, 48.4, 45.8, 49.3, 42, 49.2, 46.2, 48.7, 50.2, 45.1, 46.5, 46.3, 42.9, 46.1, 44.5, 47.8, 48.2, 50, 47.3, 42.8, 45.1, 59.6, 49.1, 48.4, 42.6, 44.4, 44, 48.7, 42.7, 49.6, 45.3, 49.6, 50.5, 43.6, 45.5, 50.5, 44.9, 45.2, 46.6, 48.5, 45.1, 50.1, 46.5, 45, 43.8, 45.5, 43.2, 50.4, 45.3, 46.2, 45.7, 54.3, 45.8, 49.8, 46.2, 49.5, 43.5, 50.7, 47.7, 46.4, 48.2, 46.5, 46.4, 48.6, 47.5, 51.1, 45.2, 45.2, 49.1, 52.5, 47.4, 50, 44.9, 50.8, 43.4, 51.3, 47.5, 52.1, 47.5, 52.2, 45.5, 49.5, 44.5, 50.8, 49.4, 46.9, 48.4, 51.1, 48.5, 55.9, 47.2, 49.1, 47.3, 46.8, 41.7, 53.4, 43.3, 48.1, 50.5, 49.8, 43.5, 51.5, 46.2, 55.1, 44.5, 48.8, 47.2, null, 46.8, 50.4, 45.2, 49.9 ], "xaxis": "x", "y": [ 13.2, 16.3, 14.1, 15.2, 14.5, 13.5, 14.6, 15.3, 13.4, 15.4, 13.7, 16.1, 13.7, 14.6, 14.6, 15.7, 13.5, 15.2, 14.5, 15.1, 14.3, 14.5, 14.5, 15.8, 13.1, 15.1, 14.3, 15, 14.3, 15.3, 15.3, 14.2, 14.5, 17, 14.8, 16.3, 13.7, 17.3, 13.6, 15.7, 13.7, 16, 13.7, 15, 15.9, 13.9, 13.9, 15.9, 13.3, 15.8, 14.2, 14.1, 14.4, 15, 14.4, 15.4, 13.9, 15, 14.5, 15.3, 13.8, 14.9, 13.9, 15.7, 14.2, 16.8, 14.4, 16.2, 14.2, 15, 15, 15.6, 15.6, 14.8, 15, 16, 14.2, 16.3, 13.8, 16.4, 14.5, 15.6, 14.6, 15.9, 13.8, 17.3, 14.4, 14.2, 14, 17, 15, 17.1, 14.5, 16.1, 14.7, 15.7, 15.8, 14.6, 14.4, 16.5, 15, 17, 15.5, 15, 13.8, 16.1, 14.7, 15.8, 14, 15.1, 15.2, 15.9, 15.2, 16.3, 14.1, 16, 15.7, 16.2, 13.7, null, 14.3, 15.7, 14.8, 16.1 ], "yaxis": "y" }, { "hovertemplate": "OLS trendline
bill_depth_mm = 0.204844 * bill_length_mm + 5.25101
R2=0.413943

species=Gentoo
bill_length_mm=%{x}
bill_depth_mm=%{y} (trend)", "legendgroup": "Gentoo", "marker": { "color": "#EF553B", "symbol": "circle" }, "mode": "lines", "name": "Gentoo", "showlegend": false, "type": "scatter", "x": [ 40.9, 41.7, 42, 42.6, 42.7, 42.8, 42.9, 43.2, 43.3, 43.3, 43.4, 43.5, 43.5, 43.6, 43.8, 44, 44.4, 44.5, 44.5, 44.5, 44.9, 44.9, 45, 45.1, 45.1, 45.1, 45.2, 45.2, 45.2, 45.2, 45.3, 45.3, 45.4, 45.5, 45.5, 45.5, 45.5, 45.7, 45.8, 45.8, 46.1, 46.1, 46.2, 46.2, 46.2, 46.2, 46.3, 46.4, 46.4, 46.5, 46.5, 46.5, 46.5, 46.6, 46.7, 46.8, 46.8, 46.8, 46.9, 47.2, 47.2, 47.3, 47.3, 47.4, 47.5, 47.5, 47.5, 47.6, 47.7, 47.8, 48.1, 48.2, 48.2, 48.4, 48.4, 48.4, 48.5, 48.5, 48.6, 48.7, 48.7, 48.7, 48.8, 49, 49.1, 49.1, 49.1, 49.2, 49.3, 49.4, 49.5, 49.5, 49.6, 49.6, 49.8, 49.8, 49.9, 50, 50, 50, 50, 50.1, 50.2, 50.4, 50.4, 50.5, 50.5, 50.5, 50.7, 50.8, 50.8, 51.1, 51.1, 51.3, 51.5, 52.1, 52.2, 52.5, 53.4, 54.3, 55.1, 55.9, 59.6 ], "xaxis": "x", "y": [ 13.629141932350505, 13.793017404847687, 13.85447070703413, 13.977377311407015, 13.997861745469162, 14.01834617953131, 14.038830613593458, 14.100283915779901, 14.120768349842047, 14.120768349842047, 14.141252783904195, 14.161737217966342, 14.161737217966342, 14.18222165202849, 14.223190520152786, 14.264159388277081, 14.34609712452567, 14.36658155858782, 14.36658155858782, 14.36658155858782, 14.448519294836409, 14.448519294836409, 14.469003728898556, 14.489488162960704, 14.489488162960704, 14.489488162960704, 14.509972597022852, 14.509972597022852, 14.509972597022852, 14.509972597022852, 14.530457031085, 14.530457031085, 14.550941465147147, 14.571425899209295, 14.571425899209295, 14.571425899209295, 14.571425899209295, 14.61239476733359, 14.632879201395737, 14.632879201395737, 14.69433250358218, 14.69433250358218, 14.71481693764433, 14.71481693764433, 14.71481693764433, 14.71481693764433, 14.735301371706475, 14.755785805768623, 14.755785805768623, 14.77627023983077, 14.77627023983077, 14.77627023983077, 14.77627023983077, 14.796754673892918, 14.817239107955066, 14.837723542017212, 14.837723542017212, 14.837723542017212, 14.85820797607936, 14.919661278265805, 14.919661278265805, 14.94014571232795, 14.94014571232795, 14.960630146390098, 14.981114580452246, 14.981114580452246, 14.981114580452246, 15.001599014514394, 15.022083448576542, 15.04256788263869, 15.104021184825132, 15.12450561888728, 15.12450561888728, 15.165474487011574, 15.165474487011574, 15.165474487011574, 15.185958921073722, 15.185958921073722, 15.20644335513587, 15.226927789198019, 15.226927789198019, 15.226927789198019, 15.247412223260165, 15.28838109138446, 15.308865525446608, 15.308865525446608, 15.308865525446608, 15.329349959508756, 15.349834393570902, 15.37031882763305, 15.390803261695199, 15.390803261695199, 15.411287695757347, 15.411287695757347, 15.45225656388164, 15.45225656388164, 15.472740997943788, 15.493225432005936, 15.493225432005936, 15.493225432005936, 15.493225432005936, 15.513709866068083, 15.534194300130231, 15.575163168254527, 15.575163168254527, 15.595647602316674, 15.595647602316674, 15.595647602316674, 15.63661647044097, 15.657100904503116, 15.657100904503116, 15.718554206689559, 15.718554206689559, 15.759523074813854, 15.80049194293815, 15.923398547311036, 15.943882981373184, 16.005336283559625, 16.18969619011895, 16.37405609667828, 16.537931569175463, 16.701807041672645, 17.459731101972103 ], "yaxis": "y" }, { "hovertemplate": "species=Chinstrap
bill_length_mm=%{x}
bill_depth_mm=%{y}", "legendgroup": "Chinstrap", "marker": { "color": "#00cc96", "symbol": "circle" }, "mode": "markers", "name": "Chinstrap", "orientation": "v", "showlegend": true, "type": "scatter", "x": [ 46.5, 50, 51.3, 45.4, 52.7, 45.2, 46.1, 51.3, 46, 51.3, 46.6, 51.7, 47, 52, 45.9, 50.5, 50.3, 58, 46.4, 49.2, 42.4, 48.5, 43.2, 50.6, 46.7, 52, 50.5, 49.5, 46.4, 52.8, 40.9, 54.2, 42.5, 51, 49.7, 47.5, 47.6, 52, 46.9, 53.5, 49, 46.2, 50.9, 45.5, 50.9, 50.8, 50.1, 49, 51.5, 49.8, 48.1, 51.4, 45.7, 50.7, 42.5, 52.2, 45.2, 49.3, 50.2, 45.6, 51.9, 46.8, 45.7, 55.8, 43.5, 49.6, 50.8, 50.2 ], "xaxis": "x", "y": [ 17.9, 19.5, 19.2, 18.7, 19.8, 17.8, 18.2, 18.2, 18.9, 19.9, 17.8, 20.3, 17.3, 18.1, 17.1, 19.6, 20, 17.8, 18.6, 18.2, 17.3, 17.5, 16.6, 19.4, 17.9, 19, 18.4, 19, 17.8, 20, 16.6, 20.8, 16.7, 18.8, 18.6, 16.8, 18.3, 20.7, 16.6, 19.9, 19.5, 17.5, 19.1, 17, 17.9, 18.5, 17.9, 19.6, 18.7, 17.3, 16.4, 19, 17.3, 19.7, 17.3, 18.8, 16.6, 19.9, 18.8, 19.4, 19.5, 16.5, 17, 19.8, 18.1, 18.2, 19, 18.7 ], "yaxis": "y" }, { "hovertemplate": "OLS trendline
bill_depth_mm = 0.222212 * bill_length_mm + 7.56914
R2=0.427110

species=Chinstrap
bill_length_mm=%{x}
bill_depth_mm=%{y} (trend)", "legendgroup": "Chinstrap", "marker": { "color": "#00cc96", "symbol": "circle" }, "mode": "lines", "name": "Chinstrap", "showlegend": false, "type": "scatter", "x": [ 40.9, 42.4, 42.5, 42.5, 43.2, 43.5, 45.2, 45.2, 45.4, 45.5, 45.6, 45.7, 45.7, 45.9, 46, 46.1, 46.2, 46.4, 46.4, 46.5, 46.6, 46.7, 46.8, 46.9, 47, 47.5, 47.6, 48.1, 48.5, 49, 49, 49.2, 49.3, 49.5, 49.6, 49.7, 49.8, 50, 50.1, 50.2, 50.2, 50.3, 50.5, 50.5, 50.6, 50.7, 50.8, 50.8, 50.9, 50.9, 51, 51.3, 51.3, 51.3, 51.4, 51.5, 51.7, 51.9, 52, 52, 52, 52.2, 52.7, 52.8, 53.5, 54.2, 55.8, 58 ], "xaxis": "x", "y": [ 16.65759963088265, 16.990917216888157, 17.01313838928852, 17.01313838928852, 17.168686596091092, 17.235350113292192, 17.613110044098434, 17.613110044098434, 17.65755238889917, 17.679773561299537, 17.701994733699905, 17.72421590610027, 17.72421590610027, 17.768658250901005, 17.790879423301373, 17.81310059570174, 17.835321768102105, 17.87976411290284, 17.87976411290284, 17.90198528530321, 17.924206457703576, 17.94642763010394, 17.96864880250431, 17.990869974904676, 18.013091147305044, 18.12419700930688, 18.146418181707247, 18.257524043709083, 18.34640873331055, 18.457514595312386, 18.457514595312386, 18.50195694011312, 18.52417811251349, 18.56862045731422, 18.59084162971459, 18.613062802114957, 18.635283974515325, 18.679726319316057, 18.701947491716425, 18.724168664116792, 18.724168664116792, 18.74638983651716, 18.790832181317892, 18.790832181317892, 18.81305335371826, 18.835274526118628, 18.857495698518996, 18.857495698518996, 18.87971687091936, 18.87971687091936, 18.90193804331973, 18.96860156052083, 18.96860156052083, 18.96860156052083, 18.990822732921195, 19.013043905321567, 19.0574862501223, 19.10192859492303, 19.124149767323402, 19.124149767323402, 19.124149767323402, 19.168592112124134, 19.27969797412597, 19.301919146526338, 19.45746735332891, 19.61301556013148, 19.96855431853735, 20.457420111345428 ], "yaxis": "y" } ], "layout": { "legend": { "title": { "text": "species" }, "tracegroupgap": 0 }, "margin": { "t": 60 }, "template": { "data": { "bar": [ { "error_x": { "color": "#2a3f5f" }, "error_y": { "color": "#2a3f5f" }, "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "bar" } ], "barpolar": [ { "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "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": { "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "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": [ { "fillpattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 }, "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 }, "autotypenumbers": "strict", "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 } } }, "xaxis": { "anchor": "y", "domain": [ 0, 1 ], "title": { "text": "bill_length_mm" } }, "yaxis": { "anchor": "x", "domain": [ 0, 1 ], "title": { "text": "bill_depth_mm" } } } } }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# Scatterplot\n", "px.scatter(penguins, x = 'bill_length_mm', y = 'bill_depth_mm', color = 'species', trendline=\"ols\")\n", "# px._____(penguins, _____, _____, _____, trendline=\"ols\")" ] }, { "cell_type": "code", "execution_count": 4, "id": "c498b61a", "metadata": { "lines_to_next_cell": 0 }, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "autobinx": false, "histnorm": "probability density", "legendgroup": "Adelie", "marker": { "color": "rgb(31, 119, 180)" }, "name": "Adelie", "opacity": 0.7, "type": "histogram", "x": [ 181, 186, 195, 193, 190, 181, 195, 193, 190, 186, 180, 182, 191, 198, 185, 195, 197, 184, 194, 174, 180, 189, 185, 180, 187, 183, 187, 172, 180, 178, 178, 188, 184, 195, 196, 190, 180, 181, 184, 182, 195, 186, 196, 185, 190, 182, 179, 190, 191, 186, 188, 190, 200, 187, 191, 186, 193, 181, 194, 185, 195, 185, 192, 184, 192, 195, 188, 190, 198, 190, 190, 196, 197, 190, 195, 191, 184, 187, 195, 189, 196, 187, 193, 191, 194, 190, 189, 189, 190, 202, 205, 185, 186, 187, 208, 190, 196, 178, 192, 192, 203, 183, 190, 193, 184, 199, 190, 181, 197, 198, 191, 193, 197, 191, 196, 188, 199, 189, 189, 187, 198, 176, 202, 186, 199, 191, 195, 191, 210, 190, 197, 193, 199, 187, 190, 191, 200, 185, 193, 193, 187, 188, 190, 192, 185, 190, 184, 195, 193, 187, 201 ], "xaxis": "x", "xbins": { "end": 210, "size": 0.2, "start": 172 }, "yaxis": "y" }, { "autobinx": false, "histnorm": "probability density", "legendgroup": "Gentoo", "marker": { "color": "rgb(255, 127, 14)" }, "name": "Gentoo", "opacity": 0.7, "type": "histogram", "x": [ 211, 230, 210, 218, 215, 210, 211, 219, 209, 215, 214, 216, 214, 213, 210, 217, 210, 221, 209, 222, 218, 215, 213, 215, 215, 215, 216, 215, 210, 220, 222, 209, 207, 230, 220, 220, 213, 219, 208, 208, 208, 225, 210, 216, 222, 217, 210, 225, 213, 215, 210, 220, 210, 225, 217, 220, 208, 220, 208, 224, 208, 221, 214, 231, 219, 230, 214, 229, 220, 223, 216, 221, 221, 217, 216, 230, 209, 220, 215, 223, 212, 221, 212, 224, 212, 228, 218, 218, 212, 230, 218, 228, 212, 224, 214, 226, 216, 222, 203, 225, 219, 228, 215, 228, 216, 215, 210, 219, 208, 209, 216, 229, 213, 230, 217, 230, 217, 222, 214, 215, 222, 212, 213 ], "xaxis": "x", "xbins": { "end": 231, "size": 0.2, "start": 203 }, "yaxis": "y" }, { "autobinx": false, "histnorm": "probability density", "legendgroup": "Chinstrap", "marker": { "color": "rgb(44, 160, 44)" }, "name": "Chinstrap", "opacity": 0.7, "type": "histogram", "x": [ 192, 196, 193, 188, 197, 198, 178, 197, 195, 198, 193, 194, 185, 201, 190, 201, 197, 181, 190, 195, 181, 191, 187, 193, 195, 197, 200, 200, 191, 205, 187, 201, 187, 203, 195, 199, 195, 210, 192, 205, 210, 187, 196, 196, 196, 201, 190, 212, 187, 198, 199, 201, 193, 203, 187, 197, 191, 203, 202, 194, 206, 189, 195, 207, 202, 193, 210, 198 ], "xaxis": "x", "xbins": { "end": 212, "size": 0.2, "start": 178 }, "yaxis": "y" }, { "legendgroup": "Adelie", "marker": { "color": "rgb(31, 119, 180)" }, "mode": "lines", "name": "Adelie", "showlegend": false, "type": "scatter", "x": [ 172, 172.076, 172.152, 172.228, 172.304, 172.38, 172.456, 172.532, 172.608, 172.684, 172.76, 172.836, 172.912, 172.988, 173.064, 173.14, 173.216, 173.292, 173.368, 173.444, 173.52, 173.596, 173.672, 173.748, 173.824, 173.9, 173.976, 174.052, 174.128, 174.204, 174.28, 174.356, 174.432, 174.508, 174.584, 174.66, 174.736, 174.812, 174.888, 174.964, 175.04, 175.116, 175.192, 175.268, 175.344, 175.42, 175.496, 175.572, 175.648, 175.724, 175.8, 175.876, 175.952, 176.028, 176.104, 176.18, 176.256, 176.332, 176.408, 176.484, 176.56, 176.636, 176.712, 176.788, 176.864, 176.94, 177.016, 177.092, 177.168, 177.244, 177.32, 177.396, 177.472, 177.548, 177.624, 177.7, 177.776, 177.852, 177.928, 178.004, 178.08, 178.156, 178.232, 178.308, 178.38400000000001, 178.46, 178.536, 178.612, 178.688, 178.764, 178.84, 178.916, 178.992, 179.068, 179.144, 179.22, 179.296, 179.372, 179.448, 179.524, 179.6, 179.676, 179.752, 179.828, 179.904, 179.98, 180.056, 180.132, 180.208, 180.284, 180.36, 180.436, 180.512, 180.588, 180.664, 180.74, 180.816, 180.892, 180.968, 181.044, 181.12, 181.196, 181.272, 181.348, 181.424, 181.5, 181.576, 181.652, 181.728, 181.804, 181.88, 181.956, 182.032, 182.108, 182.184, 182.26, 182.336, 182.412, 182.488, 182.564, 182.64, 182.716, 182.792, 182.868, 182.944, 183.02, 183.096, 183.172, 183.248, 183.324, 183.4, 183.476, 183.552, 183.628, 183.704, 183.78, 183.856, 183.932, 184.008, 184.084, 184.16, 184.236, 184.312, 184.388, 184.464, 184.54, 184.61599999999999, 184.692, 184.768, 184.844, 184.92, 184.996, 185.072, 185.148, 185.224, 185.3, 185.376, 185.452, 185.528, 185.60399999999998, 185.68, 185.756, 185.832, 185.908, 185.984, 186.06, 186.136, 186.212, 186.288, 186.364, 186.44, 186.516, 186.592, 186.668, 186.744, 186.82, 186.89600000000002, 186.972, 187.048, 187.124, 187.2, 187.276, 187.352, 187.428, 187.504, 187.58, 187.656, 187.732, 187.808, 187.88400000000001, 187.96, 188.036, 188.112, 188.188, 188.264, 188.34, 188.416, 188.492, 188.568, 188.644, 188.72, 188.796, 188.872, 188.948, 189.024, 189.1, 189.176, 189.252, 189.328, 189.404, 189.48, 189.556, 189.632, 189.708, 189.784, 189.86, 189.936, 190.012, 190.088, 190.164, 190.24, 190.316, 190.392, 190.468, 190.544, 190.62, 190.696, 190.772, 190.848, 190.924, 191, 191.076, 191.152, 191.228, 191.304, 191.38, 191.456, 191.532, 191.608, 191.684, 191.76, 191.836, 191.912, 191.988, 192.064, 192.14, 192.216, 192.292, 192.368, 192.444, 192.52, 192.596, 192.672, 192.748, 192.824, 192.9, 192.976, 193.052, 193.128, 193.204, 193.28, 193.356, 193.432, 193.508, 193.584, 193.66, 193.736, 193.812, 193.888, 193.964, 194.04, 194.11599999999999, 194.192, 194.268, 194.344, 194.42000000000002, 194.496, 194.572, 194.648, 194.724, 194.8, 194.876, 194.952, 195.028, 195.10399999999998, 195.18, 195.256, 195.332, 195.40800000000002, 195.484, 195.56, 195.636, 195.712, 195.788, 195.864, 195.94, 196.016, 196.09199999999998, 196.168, 196.244, 196.32, 196.39600000000002, 196.472, 196.548, 196.624, 196.7, 196.776, 196.852, 196.928, 197.004, 197.07999999999998, 197.156, 197.232, 197.308, 197.38400000000001, 197.46, 197.536, 197.612, 197.688, 197.764, 197.84, 197.916, 197.992, 198.068, 198.144, 198.22, 198.296, 198.372, 198.448, 198.524, 198.6, 198.676, 198.752, 198.828, 198.904, 198.98, 199.056, 199.132, 199.208, 199.284, 199.36, 199.436, 199.512, 199.588, 199.664, 199.74, 199.816, 199.892, 199.968, 200.044, 200.12, 200.196, 200.272, 200.348, 200.424, 200.5, 200.576, 200.652, 200.728, 200.804, 200.88, 200.956, 201.032, 201.108, 201.184, 201.26, 201.336, 201.412, 201.488, 201.564, 201.64, 201.716, 201.792, 201.868, 201.944, 202.02, 202.096, 202.172, 202.248, 202.324, 202.4, 202.476, 202.552, 202.628, 202.704, 202.78, 202.856, 202.932, 203.008, 203.084, 203.16, 203.236, 203.312, 203.388, 203.464, 203.54, 203.61599999999999, 203.692, 203.768, 203.844, 203.92000000000002, 203.996, 204.072, 204.148, 204.224, 204.3, 204.376, 204.452, 204.528, 204.60399999999998, 204.68, 204.756, 204.832, 204.90800000000002, 204.984, 205.06, 205.136, 205.212, 205.288, 205.364, 205.44, 205.516, 205.59199999999998, 205.668, 205.744, 205.82, 205.89600000000002, 205.972, 206.048, 206.124, 206.2, 206.276, 206.352, 206.428, 206.504, 206.57999999999998, 206.656, 206.732, 206.808, 206.88400000000001, 206.96, 207.036, 207.112, 207.188, 207.264, 207.34, 207.416, 207.492, 207.56799999999998, 207.644, 207.72, 207.796, 207.872, 207.948, 208.024, 208.1, 208.176, 208.252, 208.328, 208.404, 208.48, 208.55599999999998, 208.632, 208.708, 208.784, 208.86, 208.936, 209.012, 209.088, 209.164, 209.24, 209.316, 209.392, 209.46800000000002, 209.54399999999998, 209.62, 209.696, 209.772, 209.848, 209.924 ], "xaxis": "x", "y": [ 0.0023404412754835335, 0.0023914398969411164, 0.0024427766362432406, 0.0024944785637988813, 0.0025465771781858055, 0.002599108495943847, 0.0026521131247257148, 0.0027056363190824584, 0.0027597280182244106, 0.0028144428651664215, 0.002869840206735159, 0.0029259840739888974, 0.002982943142674362, 0.0030407906734209672, 0.0030996044314499536, 0.0031594665856540024, 0.0032204635869821025, 0.003282686026144303, 0.0033462284707303216, 0.0034111892819162397, 0.0034776704110132356, 0.0035457771761922222, 0.003615618019796888, 0.0036873042467359613, 0.00376094974452396, 0.003836670685615959, 0.003914585212758101, 0.003994813108150132, 0.004077475447290344, 0.004162694238446117, 0.004250592048763573, 0.004341291618100916, 0.004434915461738199, 0.004531585463182851, 0.004631422458356532, 0.004734545812512532, 0.0048410729912948735, 0.004951119127410156, 0.005064796584441597, 0.005182214519390942, 0.0053034784455861335, 0.005428689797644051, 0.005557945500224798, 0.0056913375423589836, 0.005828952559169185, 0.005970871422843596, 0.006117168844752124, 0.006267912990622499, 0.006423165110714991, 0.006582979186950191, 0.006747401598953172, 0.006916470810980054, 0.007090217081685812, 0.007268662198677767, 0.007451819239775984, 0.007639692362868668, 0.007832276626205238, 0.008029557840914614, 0.008231512457471061, 0.008438107487746975, 0.008649300464201719, 0.00886503943764851, 0.009085263014920637, 0.009309900437622972, 0.00953887170300582, 0.009772087727833749, 0.010009450555941664, 0.010250853609975746, 0.01049618198760848, 0.01074531280229394, 0.01099811556839104, 0.011254452630232782, 0.011514179634457545, 0.01177714604464617, 0.012043195697024311, 0.012312167395698943, 0.012583895545601978, 0.012858210821011977, 0.013134940867220182, 0.013413911032603325, 0.013694945128067177, 0.013977866210522556, 0.014262497386775716, 0.014548662633926788, 0.014836187632117737, 0.015124900605213142, 0.015414633164778565, 0.015705221152510287, 0.01599650547609706, 0.0162883329333399, 0.016580557019241413, 0.016873038710691967, 0.01716564722333173, 0.017458260735162143, 0.017750767071512238, 0.01804306434604482, 0.01833506155260582, 0.018626679102887064, 0.01891784930508622, 0.01920851677900707, 0.01949863880334353, 0.019788185591245348, 0.020077140490653567, 0.020365500106332313, 0.020653274340997098, 0.020940486353452217, 0.021227172432203168, 0.021513381783578464, 0.0217991762340103, 0.022084629846739378, 0.02236982845386435, 0.02265486910529984, 0.022939859436880504, 0.02322491696050148, 0.023510168279851765, 0.023795748235934926, 0.02408179898720635, 0.024368469029757905, 0.024655912163556025, 0.024944286411278105, 0.02523375289678975, 0.025524474690754535, 0.025816615631265936, 0.026110339127729084, 0.02640580695649733, 0.026703178056985983, 0.027002607337117058, 0.027304244497029548, 0.027608232879978444, 0.027914708359269007, 0.028223798269914818, 0.028535620393470823, 0.028850282004189955, 0.029167878984256636, 0.029488495015402252, 0.029812200853670322, 0.030139053693512604, 0.03046909662673116, 0.030802358201076758, 0.031138852082534963, 0.031478576824530556, 0.03182151574641602, 0.032167636922733965, 0.03251689328382546, 0.03286922282743214, 0.03322454893999861, 0.03358278082544229, 0.03394381403822939, 0.034307531116668545, 0.03467380231144815, 0.03504248640357348, 0.035413431605043545, 0.03578647653482075, 0.03616145126193409, 0.03653817840689473, 0.03691647429200434, 0.03729615013063065, 0.03767701324507572, 0.03805886830231896, 0.038441518556645723, 0.038824767088006876, 0.039208418024872606, 0.039592277740370836, 0.03997615601061136, 0.040359867124325, 0.0407432309332497, 0.04112607383312155, 0.04150822966562447, 0.04188954053225621, 0.042269857511755056, 0.04264904127349944, 0.043026962580138654, 0.04340350267363391, 0.043778553539875656, 0.0441520180480741, 0.04452380996222238, 0.044893853823052256, 0.04526208470007453, 0.04562844781446863, 0.04599289803479029, 0.046355399248664705, 0.04671592361481011, 0.04707445070092232, 0.047430966514073816, 0.047785462431393026, 0.048137934039827864, 0.04848837989479034, 0.0488368002083915, 0.04918319547881457, 0.04952756507311454, 0.04986990577639163, 0.05021021032081621, 0.05054846590842828, 0.05088465274193718, 0.05121874257794695, 0.05155069731709013, 0.05188046764549546, 0.052207991741809325, 0.05253319406367035, 0.05285598422707229, 0.05317625599146124, 0.05349388636270007, 0.053808734825190684, 0.05412064271349996, 0.054429432732758506, 0.0547349086359488, 0.055036855064936316, 0.0553350375607582, 0.05562920274727486, 0.05591907869081912, 0.05620437543696408, 0.05648478572398287, 0.05675998587100126, 0.057029636837282, 0.0572933854475132, 0.057550865776437934, 0.05780170068467149, 0.058045503496107334, 0.058281879805946964, 0.058510429407093355, 0.05873074832146322, 0.05894243092168117, 0.059145072127658314, 0.059338269661721246, 0.0595216263452602, 0.059694752419317446, 0.059857267871136835, 0.06000880474846069, 0.060149009443280506, 0.060277544926834056, 0.06039409291789194, 0.0604983559667852, 0.060590059438197126, 0.06066895337646657, 0.06073481423801791, 0.06078744647654678, 0.06082668396773219, 0.06085239126150565, 0.060864464651278816, 0.060862833050998086, 0.06084745867243833, 0.060818337496767585, 0.06077549953607445, 0.060719008882258264, 0.060648963542400666, 0.060565495061465545, 0.06046876793488823, 0.06035897881530159, 0.06023635551928888, 0.06010115584163954, 0.059953666186090396, 0.059794200022967314, 0.05962309618546251, 0.05944071701750083, 0.05924744638724365, 0.05904368758124717, 0.05882986109511708, 0.05860640233719182, 0.058373759262322675, 0.058132389953208546, 0.05788276016697705, 0.05762534086478855, 0.057360605742167635, 0.05708902877755549, 0.056811081816208905, 0.056527232206079595, 0.056237940501666486, 0.05594365825108732, 0.05564482588073787, 0.05534187069093237, 0.055035204974849705, 0.05472522427195179, 0.05441230576581481, 0.054096806835029376, 0.05377906376449364, 0.053459390623053285, 0.053138078312058586, 0.052815393788010354, 0.052491579461075064, 0.0521668527698731, 0.05184140593159392, 0.051515405865184605, 0.05118899428409664, 0.0508622879538748, 0.05053537910873719, 0.050208336020240406, 0.04988120371014961, 0.04955400479874848, 0.04922674047903345, 0.048899391606548485, 0.04857191989402787, 0.0482442691995288, 0.047916366896357754, 0.04758812531282572, 0.04725944322969203, 0.04693020742309889, 0.04660029424083225, 0.04626957119987354, 0.04593789859344069, 0.04560513109602038, 0.04527111935529901, 0.044935711560364584, 0.044598754976095216, 0.044260097434254915, 0.0439195887724753, 0.04357708221300573, 0.04323243567386196, 0.042885513005779086, 0.042536185149175294, 0.042184331206149096, 0.04182983942335437, 0.04147260808242484, 0.04111254629543596, 0.04074957470369394, 0.04038362607892728, 0.040014645826709584, 0.03964259239267273, 0.039267437572751036, 0.03888916672934427, 0.03850777891589311, 0.03812328691290442, 0.03773571717896803, 0.037345109720755935, 0.036951517886377086, 0.036555008086809115, 0.03615565945039434, 0.03575356341562279, 0.03534882326758613, 0.034941553623602975, 0.034531879873581944, 0.03411993758070062, 0.03370587184794798, 0.03328983665599786, 0.032871994177770064, 0.032452514074879216, 0.03203157278098844, 0.0316093527768631, 0.031186041861693273, 0.030761832424979603, 0.03033692072300886, 0.02991150616365106, 0.029485790602911056, 0.02905997765636783, 0.02863427202831846, 0.028208878861151244, 0.027784003107159345, 0.027359848924725223, 0.026936619100511393, 0.026514514499032228, 0.02609373354071251, 0.025674471709307405, 0.025256921089319623, 0.02484126993385189, 0.024427702263133337, 0.024016397493786576, 0.023607530098748105, 0.023201269297615814, 0.022797778777074687, 0.022397216440947155, 0.021999734189325913, 0.02160547772617127, 0.021214586394692904, 0.020827193039779653, 0.02044342389671202, 0.020063398505347968, 0.01968722964895685, 0.01931502331685315, 0.0189468786899717, 0.01858288814851644, 0.01822313730080218, 0.017867705032411547, 0.017516663574773352, 0.017170078592272663, 0.016828009286985447, 0.01649050852013193, 0.01615762294932173, 0.015829393180661226, 0.015505853934768455, 0.015187034225732447, 0.014872957552028882, 0.014563642098385319, 0.014259100947567622, 0.01395934230103729, 0.01366436970740606, 0.013374182297591948, 0.01308877502556207, 0.01280813891352912, 0.012532261300452558, 0.012261126092680255, 0.011994714015566576, 0.011733002864890832, 0.011475967756908192, 0.01122358137587023, 0.010975814217867958, 0.01073263482987199, 0.0104940100428686, 0.010259905198030704, 0.01003028436489809, 0.009805110550596425, 0.009584345899173261, 0.009367951880197591, 0.00915588946583078, 0.008948119295656892, 0.008744601828632603, 0.008545297481605508, 0.008350166753933456, 0.008159170337828175, 0.007972269214140078, 0.007789424733395019, 0.00761059868198913, 0.007435753333540758, 0.007264851485498548, 0.007097856481191935, 0.00693473221760605, 0.006775443139246794, 0.006619954218552175, 0.0064682309233816794, 0.006320239172193338, 0.006175945277590939, 0.006035315878985584, 0.005898317865179556, 0.005764918287730577, 0.005635084266003653, 0.005508782884858219, 0.0053859810859518565, 0.005266645553669002, 0.00515074259670587, 0.005038238026354255, 0.004929097032538009, 0.004823284058654541, 0.004720762676272101, 0.004621495460721598, 0.004525443868606228, 0.004432568118231393, 0.004342827073931324, 0.004256178135236649, 0.004172577131792748, 0.004091978224898864, 0.00401433381649351, 0.00393959446636566, 0.003867708818318721, 0.0037986235359632626, 0.0037322832487554827, 0.003668630508840419, 0.003607605759198212, 0.003549147313526856, 0.0034931913482315435, 0.00343967190682238, 0.0033885209169554585, 0.0033396682202828424, 0.003293041615207132, 0.0032485669125657, 0.0032061680041997435, 0.0031657669442913057, 0.0031272840432821896, 0.0030906379741173244, 0.003055745890486996, 0.0030225235566731967, 0.0029908854885389823, 0.0029607451051344292, 0.002932014890329661, 0.0029046065638243944, 0.002878431260825493, 0.0028533997196289423, 0.002829422476290527, 0.002806410065521916, 0.002784273226903953, 0.002762923115470345, 0.00274227151567868, 0.002722231057756144, 0.002702715435382403, 0.0026836396236520933, 0.002664920096246142, 0.0026464750407326366, 0.002628224570916422, 0.0026100909351606276, 0.0025919987196139083, 0.002573875045293788, 0.0025556497579998618, 0.0025372556100594673, 0.0025186284329444908, 0.0024997072998387926, 0.0024804346772837435, 0.0024607565650819705, 0.0024406226236976347, 0.002419986288455435, 0.002398804869908115, 0.0023770396398147676, 0.0023546559022484667, 0.002331623049431402, 0.002307914601978015, 0.00228350823331156, 0.0022583857781061306, 0.002232533224694199, 0.0022059406914680876, 0.002178602387392324, 0.0021505165568322716, 0.0021216854089907253, 0.00209211503232997, 0.002061815294439022 ], "yaxis": "y" }, { "legendgroup": "Gentoo", "marker": { "color": "rgb(255, 127, 14)" }, "mode": "lines", "name": "Gentoo", "showlegend": false, "type": "scatter", "x": [ 203, 203.056, 203.112, 203.168, 203.224, 203.28, 203.336, 203.392, 203.448, 203.504, 203.56, 203.616, 203.672, 203.728, 203.784, 203.84, 203.896, 203.952, 204.008, 204.064, 204.12, 204.176, 204.232, 204.288, 204.344, 204.4, 204.456, 204.512, 204.568, 204.624, 204.68, 204.736, 204.792, 204.848, 204.904, 204.96, 205.016, 205.072, 205.128, 205.184, 205.24, 205.296, 205.352, 205.408, 205.464, 205.52, 205.576, 205.632, 205.688, 205.744, 205.8, 205.856, 205.912, 205.968, 206.024, 206.08, 206.136, 206.192, 206.248, 206.304, 206.36, 206.416, 206.472, 206.528, 206.584, 206.64, 206.696, 206.752, 206.808, 206.864, 206.92, 206.976, 207.032, 207.088, 207.144, 207.2, 207.256, 207.312, 207.368, 207.424, 207.48, 207.536, 207.592, 207.648, 207.704, 207.76, 207.816, 207.872, 207.928, 207.984, 208.04, 208.096, 208.152, 208.208, 208.264, 208.32, 208.376, 208.432, 208.488, 208.544, 208.6, 208.656, 208.712, 208.768, 208.824, 208.88, 208.936, 208.992, 209.048, 209.104, 209.16, 209.216, 209.272, 209.328, 209.38400000000001, 209.44, 209.496, 209.552, 209.608, 209.664, 209.72, 209.776, 209.832, 209.888, 209.944, 210, 210.056, 210.112, 210.168, 210.224, 210.28, 210.336, 210.392, 210.448, 210.504, 210.56, 210.61599999999999, 210.672, 210.728, 210.784, 210.84, 210.896, 210.952, 211.008, 211.064, 211.12, 211.176, 211.232, 211.288, 211.344, 211.4, 211.456, 211.512, 211.568, 211.624, 211.68, 211.736, 211.792, 211.848, 211.904, 211.96, 212.016, 212.072, 212.128, 212.184, 212.24, 212.296, 212.352, 212.408, 212.464, 212.52, 212.576, 212.632, 212.688, 212.744, 212.8, 212.856, 212.912, 212.968, 213.024, 213.08, 213.136, 213.192, 213.248, 213.304, 213.36, 213.416, 213.472, 213.528, 213.584, 213.64, 213.696, 213.752, 213.808, 213.864, 213.92, 213.976, 214.032, 214.088, 214.144, 214.2, 214.256, 214.312, 214.368, 214.424, 214.48, 214.536, 214.592, 214.648, 214.704, 214.76, 214.816, 214.872, 214.928, 214.984, 215.04, 215.096, 215.152, 215.208, 215.264, 215.32, 215.376, 215.432, 215.488, 215.544, 215.6, 215.656, 215.712, 215.768, 215.824, 215.88, 215.936, 215.992, 216.048, 216.10399999999998, 216.16, 216.216, 216.272, 216.328, 216.38400000000001, 216.44, 216.496, 216.552, 216.608, 216.664, 216.72, 216.776, 216.832, 216.888, 216.944, 217, 217.056, 217.112, 217.168, 217.224, 217.28, 217.336, 217.392, 217.448, 217.504, 217.56, 217.61599999999999, 217.672, 217.728, 217.784, 217.84, 217.89600000000002, 217.952, 218.008, 218.064, 218.12, 218.176, 218.232, 218.288, 218.344, 218.4, 218.456, 218.512, 218.568, 218.624, 218.68, 218.736, 218.792, 218.848, 218.904, 218.96, 219.016, 219.072, 219.128, 219.184, 219.24, 219.296, 219.352, 219.40800000000002, 219.464, 219.52, 219.576, 219.632, 219.688, 219.744, 219.8, 219.856, 219.912, 219.968, 220.024, 220.07999999999998, 220.136, 220.192, 220.248, 220.304, 220.36, 220.416, 220.472, 220.528, 220.584, 220.64, 220.696, 220.752, 220.808, 220.864, 220.92000000000002, 220.976, 221.032, 221.088, 221.144, 221.2, 221.256, 221.312, 221.368, 221.424, 221.48, 221.536, 221.59199999999998, 221.648, 221.704, 221.76, 221.816, 221.872, 221.928, 221.984, 222.04, 222.096, 222.152, 222.208, 222.264, 222.32, 222.376, 222.432, 222.488, 222.544, 222.6, 222.656, 222.712, 222.768, 222.824, 222.88, 222.936, 222.992, 223.048, 223.10399999999998, 223.16, 223.216, 223.272, 223.328, 223.38400000000001, 223.44, 223.496, 223.552, 223.608, 223.664, 223.72, 223.776, 223.832, 223.888, 223.944, 224, 224.056, 224.112, 224.168, 224.224, 224.28, 224.336, 224.392, 224.448, 224.504, 224.56, 224.61599999999999, 224.672, 224.728, 224.784, 224.84, 224.89600000000002, 224.952, 225.008, 225.064, 225.12, 225.176, 225.232, 225.288, 225.344, 225.4, 225.456, 225.512, 225.568, 225.624, 225.68, 225.736, 225.792, 225.848, 225.904, 225.96, 226.016, 226.072, 226.128, 226.184, 226.24, 226.296, 226.352, 226.40800000000002, 226.464, 226.52, 226.576, 226.632, 226.688, 226.744, 226.8, 226.856, 226.912, 226.968, 227.024, 227.07999999999998, 227.136, 227.192, 227.248, 227.304, 227.36, 227.416, 227.472, 227.528, 227.584, 227.64, 227.696, 227.752, 227.808, 227.864, 227.92000000000002, 227.976, 228.032, 228.088, 228.144, 228.2, 228.256, 228.312, 228.368, 228.424, 228.48, 228.536, 228.59199999999998, 228.648, 228.704, 228.76, 228.816, 228.872, 228.928, 228.984, 229.04, 229.096, 229.152, 229.208, 229.264, 229.32, 229.376, 229.432, 229.488, 229.544, 229.6, 229.656, 229.712, 229.768, 229.824, 229.88, 229.936, 229.992, 230.048, 230.10399999999998, 230.16, 230.216, 230.272, 230.328, 230.38400000000001, 230.44, 230.496, 230.552, 230.608, 230.664, 230.72, 230.776, 230.832, 230.888, 230.944 ], "xaxis": "x", "y": [ 0.003477451688691431, 0.0035833597537643543, 0.003692761515237666, 0.003805763274308774, 0.003922471944064914, 0.0040429948599752285, 0.004167439581691264, 0.004295913686436548, 0.00442852455430598, 0.004565379145827969, 0.004706583772187931, 0.004852243858538822, 0.0050024637008712226, 0.005157346216943032, 0.005316992691809475, 0.005481502518526343, 0.005650972934632863, 0.005825498755052979, 0.0060051721020841844, 0.006190082133172293, 0.0063803147671977435, 0.006575952410024849, 0.006777073680088551, 0.006983753134815166, 0.007196060998691323, 0.007414062893816159, 0.007637819573777462, 0.007867386661716129, 0.008102814393440285, 0.008344147366464275, 0.008591424295847418, 0.008844677777708213, 0.009103934061286699, 0.009369212830421388, 0.00964052699529683, 0.009917882495310016, 0.010201278113876985, 0.010490705305999316, 0.010786148039366627, 0.011087582649768349, 0.011394977711536284, 0.01170829392372992, 0.012027484012722342, 0.012352492651819542, 0.012683256398498535, 0.013019703649808388, 0.013361754616429022, 0.013709321315840371, 0.01406230758498859, 0.014420609112803481, 0.014784113492839025, 0.01515270029627709, 0.01552624116545214, 0.015904599928007256, 0.016287632731722405, 0.016675188199992808, 0.017067107607868646, 0.01746322507850726, 0.017863367799806625, 0.018267356260946655, 0.01867500450846752, 0.01908612042147676, 0.019500506005485786, 0.01991795770432613, 0.020338266729523234, 0.020761219406443494, 0.021186597536468236, 0.021614178774385536, 0.022043737020132348, 0.02247504282396753, 0.022907863804086055, 0.02334196507565948, 0.02377710969020506, 0.024213059084173125, 0.02464957353557233, 0.025086412627429767, 0.02552333571683958, 0.025960102408323308, 0.02639647303019772, 0.02683220911261989, 0.027267073865962138, 0.02770083265815112, 0.028133253489594476, 0.028564107464317246, 0.02899316925591773, 0.029420217566965747, 0.029845035580467173, 0.030267411402032828, 0.030687138491406495, 0.03110401608202745, 0.0315178495873299, 0.03192845099251145, 0.03233563923053881, 0.0327392405411977, 0.033139088812038024, 0.03353502590011333, 0.033926901933469554, 0.034314575591381895, 0.03469791436242049, 0.03507679477946082, 0.035451102630849905, 0.03582073314698613, 0.036185591161657905, 0.0365455912475549, 0.03690065782544651, 0.03725072524659906, 0.03759573784809217, 0.037935649980764825, 0.038270426009626574, 0.038600040286631124, 0.0389244770958206, 0.03924373057091613, 0.039557804585528725, 0.03986671261624903, 0.040170477578959696, 0.040469131638799706, 0.04076271599430133, 0.04105128063628864, 0.04133488408223162, 0.04161359308680155, 0.04188748232947989, 0.042156634080121415, 0.0424211378434672, 0.04268108998365526, 0.04293659332985347, 0.04318775676419688, 0.043434694793271826, 0.04367752710444344, 0.04391637810837688, 0.04415137646914152, 0.04438265462334117, 0.04461034828973651, 0.04483459597087304, 0.04505553844824248, 0.045273318272537826, 0.04548807925057475, 0.0456999659304661, 0.04590912308664428, 0.04611569520632645, 0.046319825979015954, 0.04652165779062697, 0.046721331223797666, 0.046918984565952594, 0.04711475332663457, 0.04730876976561355, 0.04750116243323236, 0.0476920557244218, 0.04788156944776653, 0.04806981841095968, 0.048256912023930294, 0.04844295392087173, 0.04862804160233803, 0.04881226609851266, 0.04899571165468294, 0.04917845543988521, 0.04936056727961088, 0.04954210941338176, 0.04972313627793021, 0.04990369431662951, 0.05008382181574045, 0.05026354876795045, 0.05044289676359461, 0.05062187890985776, 0.05080049977816612, 0.05097875537988658, 0.05115663317035862, 0.051334112081191256, 0.05151116258067121, 0.051687746762026435, 0.05186381845921257, 0.052039323389785896, 0.05221419932435223, 0.05238837628198384, 0.05256177675091808, 0.052734315933768275, 0.05290590201639646, 0.05307643645952136, 0.05324581431206386, 0.05341392454515411, 0.05358065040567007, 0.05374586978809827, 0.05390945562346518, 0.0540712762840171, 0.054231196002287374, 0.05438907530313812, 0.05454477144732249, 0.05469813888507916, 0.054849029718238754, 0.054997294169292193, 0.05514278105585777, 0.055285338268956485, 0.05542481325350889, 0.0555610534894465, 0.05569390697184596, 0.05582322268848858, 0.055948851093266284, 0.0560706445738696, 0.056188457912215016, 0.056302148736097665, 0.056411577960588884, 0.05651661021773358, 0.05661711427314899, 0.05671296342816956, 0.05680403590624231, 0.056890215222325166, 0.056971390534110856, 0.05704745697395923, 0.05711831596049118, 0.05718387548887263, 0.057244050398892334, 0.05729876262001467, 0.05734794139267603, 0.057391523465173955, 0.057429453265587516, 0.057461683048256974, 0.057488173014440154, 0.05750889140685602, 0.05752381457791843, 0.05753292703155757, 0.057536221438617675, 0.05753369862591734, 0.05752536753914672, 0.057511245179873625, 0.057491356517016735, 0.057465734373236654, 0.05743441928678237, 0.057397459349415446, 0.0573549100211185, 0.0573068339223726, 0.0572533006048676, 0.05719438630158039, 0.05713017365722732, 0.057060751440162316, 0.05698621423685318, 0.05690666213012602, 0.05682220036242046, 0.05673293898534379, 0.05663899249685789, 0.05654047946746459, 0.056437522156794054, 0.05633024612201933, 0.05621877981954649, 0.056103254201443686, 0.0559838023080788, 0.055860558858444175, 0.055733659839640855, 0.05560324209698881, 0.055469442926218186, 0.055332399669172916, 0.055192249314442214, 0.05504912810429577, 0.05490317114927528, 0.05475451205174474, 0.05460328253966662, 0.054449612111816155, 0.05429362769559679, 0.05413545331855927, 0.05397520979466925, 0.05381301442629961, 0.0536489807228608, 0.053483218136904764, 0.05331583181847316, 0.05314692238837393, 0.05297658573100393, 0.05280491280724447, 0.05263198948788474, 0.05245789640793947, 0.05228270884214921, 0.052106496601864664, 0.0519293239534374, 0.051751249558151996, 0.05157232643366001, 0.051392601936785486, 0.051212117767503784, 0.0510309099938068, 0.0508490090971009, 0.05066644003770522, 0.05048322233994948, 0.05029937019630219, 0.050114892589895224, 0.04992979343474997, 0.04974407173295212, 0.04955772174796774, 0.049370733193244386, 0.04918309143519552, 0.048994777709620595, 0.04880576935058588, 0.04861604003074419, 0.048425560012059304, 0.04823429640586379, 0.048042213441170135, 0.04784927274013536, 0.04765543359957254, 0.04746065327739761, 0.04726488728289977, 0.047068089669726726, 0.04687021333049091, 0.04667121029190575, 0.04647103200939241, 0.046269629660104325, 0.046066954433357094, 0.045862957817467596, 0.04565759188205024, 0.04545080955484578, 0.04524256489220463, 0.04503281334238372, 0.04482151200086427, 0.04460861985694344, 0.04439409803090468, 0.044177910001117905, 0.04396002182048285, 0.04374040232167239, 0.04351902331069615, 0.043295859748358395, 0.04307088991923913, 0.04284409558788749, 0.042615462141969776, 0.042384978722174844, 0.042152638338731986, 0.04191843797445181, 0.04168237867426063, 0.04144446562123883, 0.04120470819923896, 0.04096312004219811, 0.04071971907031125, 0.04047452751327567, 0.04022757192085921, 0.03997888316108607, 0.03972849640637094, 0.039476451107962975, 0.03922279095910422, 0.03896756384731688, 0.03871082179628205, 0.03845262089777207, 0.03819302123413917, 0.037932086791859734, 0.03766988536666271, 0.03740648846076803, 0.03714197117277473, 0.036876412080737865, 0.036609893118975695, 0.03634249944914378, 0.03607431932610913, 0.03580544395914769, 0.035535967368978, 0.03526598624112894, 0.034995599776127415, 0.03472490953696876, 0.03445401929431665, 0.034183034869855584, 0.03391206397819629, 0.03364121606770968, 0.0333706021606389, 0.03310033469281208, 0.03283052735325139, 0.03256129492394622, 0.032292753120025545, 0.03202501843054727, 0.03175820796007665, 0.03149243927121853, 0.031227830228219417, 0.030964498841750353, 0.030702563114935345, 0.03044214089068305, 0.03018334970034426, 0.029926306613704337, 0.029671128090291758, 0.029417929831977396, 0.02916682663680802, 0.028917932254020527, 0.02867135924015398, 0.028427218816184995, 0.02818562072558687, 0.027946673093223726, 0.02771048228497796, 0.027477152768013578, 0.027246786971580717, 0.027019485148270184, 0.026795345235632484, 0.026574462718092873, 0.02635693048909237, 0.026142838713415186, 0.02593227468966329, 0.025725322712868717, 0.025522063937247583, 0.025322576239123474, 0.025126934080070443, 0.024935208370350626, 0.024747466332746295, 0.024563771366913897, 0.0243841829144116, 0.02420875632458681, 0.024037542721527305, 0.02387058887231966, 0.023707937056877546, 0.023549624939635683, 0.023395685443430094, 0.02324614662591232, 0.023101031558871162, 0.022960358210858924, 0.022824139333542385, 0.02269238235222023, 0.02256508926096623, 0.022442256522878318, 0.022323874975923398, 0.022209929744885806, 0.022100400159933607, 0.02199525968232605, 0.021894475837789557, 0.021798010158091408, 0.021705818131338595, 0.021617849161525555, 0.021534046537845814, 0.021454347414272483, 0.02137868279989835, 0.02130697756050834, 0.021239150431837897, 0.02117511404494477, 0.021114774964098453, 0.021058033737556877, 0.021004784961571543, 0.020954917357923365, 0.020908313865254477, 0.02086485174441948, 0.02082440269803648, 0.02078683300437168, 0.020752003665644763, 0.020719770570790375, 0.020689984672662195, 0.020662492179610546, 0.020637134761313083, 0.020613749768680408, 0.020592170467605656, 0.02057222628626848, 0.020553743075649434, 0.020536543382853822, 0.020520446736788888, 0.020505269945682636, 0.02049082740587946, 0.020476931421293903, 0.02046339253285389, 0.020450019857213564, 0.02043662143397061, 0.020423004580575117, 0.02040897625407691, 0.020394343418816494, 0.020378913419128727, 0.020362494356094142, 0.02034489546734296, 0.020325927508889154, 0.020305403137949592, 0.020283137295683547, 0.020258947588772686, 0.02023265466875018, 0.020204082607981313, 0.020173059271193894, 0.020139416681459806, 0.020102991379533308, 0.020063624775463383, 0.020021163491410653, 0.019975459694619176, 0.019926371419515317, 0.01987376287793508, 0.019817504756509688, 0.019757474500277265, 0.019693556581625703, 0.019625642753715415, 0.019553632287576266, 0.019477432192123487, 0.01939695741638904, 0.019312131033321297, 0.019222884404563833, 0.019129157325685122, 0.01903089815139323, 0.018928063900335707, 0.01882062033915007, 0.018708542045498495, 0.01859181244989032, 0.018470423856164372, 0.018344377440573843, 0.018213683229487618, 0.018078360055791276, 0.01793843549414177, 0.017793945775298813, 0.01764493567982451, 0.017491458411509498, 0.017333575450950323, 0.017171356389766104, 0.017004878746002428, 0.016834227761335665, 0.01665949618073902, 0.016480784015334513, 0.016298198289200292, 0.01611185277095372, 0.015921867690973965, 0.01572836944516992, 0.01553149028623587, 0.015331368003372755, 0.01512814559147846, 0.014921970910845062 ], "yaxis": "y" }, { "legendgroup": "Chinstrap", "marker": { "color": "rgb(44, 160, 44)" }, "mode": "lines", "name": "Chinstrap", "showlegend": false, "type": "scatter", "x": [ 178, 178.068, 178.136, 178.204, 178.272, 178.34, 178.408, 178.476, 178.544, 178.612, 178.68, 178.748, 178.816, 178.884, 178.952, 179.02, 179.088, 179.156, 179.224, 179.292, 179.36, 179.428, 179.496, 179.564, 179.632, 179.7, 179.768, 179.836, 179.904, 179.972, 180.04, 180.108, 180.176, 180.244, 180.312, 180.38, 180.448, 180.516, 180.584, 180.652, 180.72, 180.788, 180.856, 180.924, 180.992, 181.06, 181.128, 181.196, 181.264, 181.332, 181.4, 181.468, 181.536, 181.604, 181.672, 181.74, 181.808, 181.876, 181.944, 182.012, 182.08, 182.148, 182.216, 182.284, 182.352, 182.42, 182.488, 182.556, 182.624, 182.692, 182.76, 182.828, 182.896, 182.964, 183.032, 183.1, 183.168, 183.236, 183.304, 183.372, 183.44, 183.508, 183.576, 183.644, 183.712, 183.78, 183.848, 183.916, 183.984, 184.052, 184.12, 184.188, 184.256, 184.324, 184.392, 184.46, 184.528, 184.596, 184.664, 184.732, 184.8, 184.868, 184.936, 185.004, 185.072, 185.14, 185.208, 185.276, 185.344, 185.412, 185.48, 185.548, 185.61599999999999, 185.684, 185.752, 185.82, 185.888, 185.956, 186.024, 186.092, 186.16, 186.228, 186.296, 186.364, 186.432, 186.5, 186.568, 186.636, 186.704, 186.772, 186.84, 186.908, 186.976, 187.044, 187.112, 187.18, 187.248, 187.316, 187.38400000000001, 187.452, 187.52, 187.588, 187.656, 187.724, 187.792, 187.86, 187.928, 187.996, 188.064, 188.132, 188.2, 188.268, 188.336, 188.404, 188.472, 188.54, 188.608, 188.676, 188.744, 188.812, 188.88, 188.948, 189.016, 189.084, 189.152, 189.22, 189.288, 189.356, 189.424, 189.492, 189.56, 189.628, 189.696, 189.764, 189.832, 189.9, 189.968, 190.036, 190.10399999999998, 190.172, 190.24, 190.308, 190.376, 190.444, 190.512, 190.58, 190.648, 190.716, 190.784, 190.852, 190.92, 190.988, 191.056, 191.124, 191.192, 191.26, 191.328, 191.39600000000002, 191.464, 191.532, 191.6, 191.668, 191.736, 191.804, 191.872, 191.94, 192.008, 192.076, 192.144, 192.212, 192.28, 192.348, 192.416, 192.484, 192.552, 192.62, 192.688, 192.756, 192.824, 192.892, 192.96, 193.028, 193.096, 193.164, 193.232, 193.3, 193.368, 193.436, 193.504, 193.572, 193.64, 193.708, 193.776, 193.844, 193.912, 193.98, 194.048, 194.11599999999999, 194.184, 194.252, 194.32, 194.388, 194.456, 194.524, 194.59199999999998, 194.66, 194.728, 194.796, 194.864, 194.932, 195, 195.068, 195.136, 195.204, 195.272, 195.34, 195.40800000000002, 195.476, 195.544, 195.612, 195.68, 195.748, 195.816, 195.88400000000001, 195.952, 196.02, 196.088, 196.156, 196.224, 196.292, 196.36, 196.428, 196.496, 196.564, 196.632, 196.7, 196.768, 196.836, 196.904, 196.972, 197.04, 197.108, 197.176, 197.244, 197.312, 197.38, 197.448, 197.516, 197.584, 197.652, 197.72, 197.788, 197.856, 197.924, 197.992, 198.06, 198.128, 198.196, 198.264, 198.332, 198.4, 198.468, 198.536, 198.60399999999998, 198.672, 198.74, 198.808, 198.876, 198.944, 199.012, 199.07999999999998, 199.148, 199.216, 199.284, 199.352, 199.42000000000002, 199.488, 199.556, 199.624, 199.692, 199.76, 199.828, 199.89600000000002, 199.964, 200.032, 200.1, 200.168, 200.236, 200.304, 200.372, 200.44, 200.508, 200.576, 200.644, 200.712, 200.78, 200.848, 200.916, 200.984, 201.052, 201.12, 201.188, 201.256, 201.324, 201.392, 201.46, 201.528, 201.596, 201.664, 201.732, 201.8, 201.868, 201.936, 202.004, 202.072, 202.14, 202.208, 202.276, 202.344, 202.412, 202.48, 202.548, 202.61599999999999, 202.684, 202.752, 202.82, 202.888, 202.956, 203.024, 203.09199999999998, 203.16, 203.228, 203.296, 203.364, 203.432, 203.5, 203.568, 203.636, 203.704, 203.772, 203.84, 203.90800000000002, 203.976, 204.044, 204.112, 204.18, 204.248, 204.316, 204.38400000000001, 204.452, 204.52, 204.588, 204.656, 204.724, 204.792, 204.86, 204.928, 204.996, 205.064, 205.132, 205.2, 205.268, 205.336, 205.404, 205.472, 205.54, 205.608, 205.676, 205.744, 205.812, 205.88, 205.948, 206.016, 206.084, 206.152, 206.22, 206.288, 206.356, 206.424, 206.492, 206.56, 206.628, 206.696, 206.764, 206.832, 206.9, 206.968, 207.036, 207.10399999999998, 207.172, 207.24, 207.308, 207.376, 207.444, 207.512, 207.57999999999998, 207.648, 207.716, 207.784, 207.852, 207.92000000000002, 207.988, 208.056, 208.124, 208.192, 208.26, 208.328, 208.39600000000002, 208.464, 208.532, 208.6, 208.668, 208.736, 208.804, 208.872, 208.94, 209.008, 209.076, 209.144, 209.212, 209.28, 209.348, 209.416, 209.484, 209.552, 209.62, 209.688, 209.756, 209.824, 209.892, 209.96, 210.028, 210.096, 210.164, 210.232, 210.3, 210.368, 210.436, 210.504, 210.572, 210.64, 210.708, 210.776, 210.844, 210.912, 210.98, 211.048, 211.11599999999999, 211.184, 211.252, 211.32, 211.388, 211.45600000000002, 211.524, 211.59199999999998, 211.66, 211.728, 211.796, 211.864, 211.93200000000002 ], "xaxis": "x", "y": [ 0.004596402084456683, 0.004666289201986388, 0.004736137825866945, 0.004805940205225216, 0.004875690349086059, 0.004945384107512327, 0.0050150192506775455, 0.0050845955455831844, 0.00515411483012606, 0.00522358108421996, 0.00529300049767143, 0.005362381534509383, 0.005431734993467063, 0.0055010740643150055, 0.005570414379746839, 0.0056397740625199035, 0.00570917376755922, 0.005778636718737054, 0.005848188740046336, 0.005917858280895866, 0.005987676435261665, 0.006057676954441315, 0.006127896253169153, 0.0061983734088625515, 0.006269150153785344, 0.006340270859929351, 0.006411782516432557, 0.006483734699370595, 0.00655617953377921, 0.006629171647784983, 0.006702768118744993, 0.006777028411320119, 0.006852014307429506, 0.00692778982806254, 0.007004421146948159, 0.0070819764961118645, 0.007160526063378155, 0.0072401418819048316, 0.0073208977118672846, 0.00740286891443974, 0.0074861323182525835, 0.007570766078534757, 0.0076568495291834855, 0.007744463028033041, 0.007833687795626322, 0.00792460574782526, 0.008017299322623735, 0.008111851301560653, 0.008208344626156322, 0.008306862209826838, 0.008407486745757427, 0.008510300511241428, 0.008615385169018407, 0.008722821566166987, 0.008832689531130528, 0.008945067669474775, 0.009060033158993175, 0.009177661544794364, 0.009298026535018017, 0.009421199797840183, 0.009547250760435052, 0.00967624641057163, 0.009808251101524763, 0.009943326360983324, 0.010081530704639068, 0.010222919455132432, 0.010367544567030094, 0.010515454458494956, 0.010666693850301105, 0.01082130361282973, 0.010979320621663211, 0.011140777622376405, 0.01130570310509857, 0.01147412118939456, 0.011646051519983382, 0.01182150917378371, 0.012000504578738436, 0.01218304344483566, 0.012369126707706684, 0.012558750485135554, 0.012751906046778541, 0.01294857979734167, 0.013148753273420305, 0.01335240315415893, 0.013559501285835397, 0.01377001472042886, 0.013983905768175839, 0.014201132064068681, 0.01442164664819944, 0.01464539805979643, 0.014872330444753317, 0.015102383676393136, 0.01533549348916394, 0.015571591624904752, 0.015810605991278686, 0.016052460831914545, 0.016297076907753786, 0.016544371689056755, 0.016794259557471866, 0.017046652017536593, 0.017301457916935496, 0.017558583674804517, 0.017817933517338787, 0.018079409719925044, 0.018342912854997624, 0.018608342044784853, 0.018875595218098343, 0.01914456937029005, 0.01941516082549637, 0.01968726550026899, 0.01996077916768786, 0.020235597721049194, 0.020511617436214727, 0.02078873523171834, 0.02106684892572822, 0.021345857488974135, 0.021625661292766198, 0.021906162351243045, 0.0221872645570161, 0.02246887390939306, 0.022750898734398957, 0.023033249895837424, 0.023315840996672752, 0.023598588570049202, 0.023881412259300322, 0.024164234986349467, 0.024446983107937817, 0.024729586559170277, 0.025011978983914183, 0.025294097851632922, 0.025575884560294436, 0.025857284525038673, 0.026138247252347882, 0.026418726399513787, 0.026698679819250296, 0.026978069589357938, 0.02725686202739494, 0.027535027690371246, 0.027812541359528143, 0.028089382010326513, 0.028365532767811796, 0.028640980847579777, 0.028915717482614872, 0.029189737836318702, 0.02946304090209826, 0.029735629389919808, 0.03000750960028333, 0.03027869128610979, 0.030549187503067905, 0.030819014448909842, 0.031088191292407828, 0.03135673999252313, 0.03162468510845725, 0.031892053601266616, 0.03215887462773763, 0.032425179327240164, 0.032691000602293456, 0.032956372893587035, 0.033221331950215906, 0.033485914595886616, 0.03375015849186316, 0.034014101897418554, 0.034277783428554344, 0.0345412418157529, 0.034804515661511166, 0.03506764319840404, 0.035330662048406715, 0.035593608984197375, 0.03585651969314026, 0.036119428544635, 0.03638236836149675, 0.036645370196008636, 0.03690846311126946, 0.037171673968428263, 0.037435027220377726, 0.037698544712449066, 0.03796224549061999, 0.03822614561772578, 0.038490257998125534, 0.03875459221125274, 0.03901915435444336, 0.039283946895408685, 0.03954896853468419, 0.03981421407835845, 0.040079674321354036, 0.040345335941498764, 0.0406111814046008, 0.04087718888070453, 0.041143332171676955, 0.041409580650247774, 0.04167589921058941, 0.041942248230506185, 0.0422085835452618, 0.04247485643305755, 0.04274101361214243, 0.043006997249509946, 0.043272744981115045, 0.04353818994351852, 0.043803260816841924, 0.04406788187889752, 0.04433197307033026, 0.044595450070593345, 0.044858224384555966, 0.04512020343952241, 0.04538129069242244, 0.04564138574691838, 0.04590038448015096, 0.04615817917883372, 0.04641465868438986, 0.04666970854680373, 0.04692321118685447, 0.04717504606637291, 0.047425089866158836, 0.047673216671176896, 0.04791929816263653, 0.04816320381655135, 0.048404801108359055, 0.048643955723172615, 0.04888053177121994, 0.04911439200802359, 0.04934539805885565, 0.049573410646996566, 0.049798289825319704, 0.05001989521070789, 0.0502380862208086, 0.050452722312618964, 0.05066366322239108, 0.050870769206339074, 0.051073901281623, 0.051272921467082934, 0.051467693023190285, 0.05165808069068227, 0.051843950927340676, 0.05202517214237998, 0.052201614927904295, 0.052373152286897616, 0.052539659857213976, 0.05270101613103524, 0.05285710266927312, 0.05300780431039377, 0.0531530093731555, 0.053292609852756245, 0.05342650160989857, 0.0535545845522942, 0.053676762808139884, 0.05379294489111689, 0.0539030438564773, 0.054006977447805055, 0.054104668234054326, 0.05419604373649283, 0.054281036545200556, 0.05435958442479747, 0.05443163040910245, 0.054497122884452215, 0.05455601566143752, 0.05460826803484792, 0.05465384483164295, 0.054692716446806205, 0.054724858866969206, 0.05475025368172859, 0.054768888082616776, 0.054780754849721905, 0.05478585232599148, 0.054784184379291424, 0.05477576035233169, 0.05476059500060674, 0.0547387084185395, 0.0547101259540545, 0.054674878111846174, 0.05463300044564355, 0.05458453343981296, 0.05452952238067405, 0.054468017217942456, 0.05440007241674528, 0.05432574680068938, 0.05424510338649486, 0.0541582092107351, 0.054065135149253936, 0.053965955729857025, 0.05386074893889869, 0.05374959602240792, 0.05363258128241652, 0.05350979186917125, 0.053381317569925237, 0.0532472505950164, 0.05310768536195197, 0.05296271827822124, 0.05281244752356731, 0.052656972832443916, 0.0524963952773876, 0.052330817054023725, 0.05216034126842375, 0.051985071727513626, 0.05180511273322488, 0.05162056888105985, 0.0514315448637226, 0.051238145280448455, 0.051040474452635064, 0.05083863624635431, 0.050632733902292025, 0.050422869873630344, 0.05020914567235487, 0.04999166172442948, 0.04977051723424533, 0.04954581005870789, 0.04931763659128889, 0.049086091656321294, 0.04885126841377494, 0.048613258274706736, 0.04837215082752775, 0.04812803377519124, 0.0478809928833538, 0.04763111193951486, 0.047378472723100556, 0.04712315498640127, 0.04686523644623843, 0.04660479278618215, 0.046341897669103634, 0.04607662275980293, 0.0458090377574116, 0.0455392104372286, 0.04526720670161581, 0.04499309063954004, 0.04471692459431483, 0.04443876923906776, 0.04415868365942986, 0.04387672544291289, 0.04359295077442593, 0.04330741453735147, 0.04302017041959397, 0.04273127102399098, 0.04244076798246684, 0.04214871207330468, 0.041855153340896685, 0.04156014121734068, 0.04126372464523918, 0.040965952201070535, 0.04066687221849657, 0.040366532910989995, 0.04006498249316429, 0.039762269300212476, 0.039458441904871064, 0.03915354923134248, 0.03884764066563733, 0.03854076616181105, 0.03823297634359984, 0.037924322600988325, 0.0376148571812618, 0.03730463327413557, 0.03699370509057676, 0.036682127934970374, 0.036369958270311704, 0.03605725377614255, 0.035744073398985304, 0.035430477395055865, 0.03511652736508337, 0.0348022862810873, 0.03448781850500836, 0.03417318979911814, 0.03385846732816667, 0.03354371965326792, 0.033229016717545384, 0.03291442982360535, 0.032600031602922984, 0.03228589597727089, 0.03197209811233564, 0.03165871436370801, 0.03134582221544752, 0.031033500211457878, 0.030721827879925966, 0.030410885651099995, 0.030100754768709218, 0.02979151719533642, 0.029483255512079268, 0.029176052812850982, 0.028869992593678565, 0.028565158637378123, 0.028261634893990382, 0.02795950535736846, 0.02765885393832407, 0.027359764334732573, 0.02706231989901408, 0.026766603503398694, 0.026472697403393124, 0.02618068309986359, 0.025890641200146104, 0.025602651278596733, 0.025316791736985145, 0.025033139665137698, 0.024751770702221655, 0.024472758899061482, 0.02419617658187021, 0.02392209421776509, 0.02365058028243558, 0.023381701130316266, 0.023115520867607302, 0.02285210122847971, 0.022591501454782684, 0.02233377817956891, 0.02207898531473126, 0.02182717394304271, 0.021578392214868757, 0.02133268524981885, 0.021090095043581104, 0.02085066038018025, 0.020614416749880283, 0.020381396272940493, 0.020151627629425673, 0.01992513599524932, 0.01970194298462548, 0.01948206659908223, 0.019265521183182678, 0.019052317387084305, 0.018842462136053107, 0.01863595860703476, 0.01843280621237509, 0.018233000590764492, 0.01803653360546834, 0.017843393349891976, 0.017653564160516094, 0.01746702663721916, 0.01728375767099646, 0.01710373047906314, 0.01692691464732053, 0.01675327618014587, 0.016582777557451096, 0.016415377798944305, 0.016251032535506412, 0.016089694087586693, 0.015931311550498317, 0.01577583088648584, 0.015623195023414407, 0.015473343959919872, 0.015326214876839614, 0.015181742254727966, 0.015039857997247186, 0.014900491560204001, 0.014763570085991787, 0.01462901854317721, 0.014496759870958907, 0.014366715128209194, 0.014238803646795127, 0.014112943188860031, 0.013989050107736148, 0.013867039512140893, 0.013746825433302256, 0.01362832099464142, 0.013511438583635101, 0.013396090025464697, 0.013282186758055096, 0.013169640008092818, 0.013058360967610153, 0.012948260970713396, 0.012839251670028112, 0.012731245212433157, 0.012624154413649523, 0.012517892931250968, 0.01241237543566407, 0.012307517778724249, 0.01220323715936094, 0.012099452285987185, 0.011996083535174869, 0.011893053106206702, 0.011790285171101122, 0.011687706019720997, 0.01158524419958438, 0.011482830650013315, 0.011380398830266748, 0.011277884841324172, 0.011175227540999514, 0.011072368652087052, 0.010969252863258718, 0.010865827922452774, 0.010762044722518304, 0.010657857378898968, 0.01055322329916739, 0.010448103244242552, 0.010342461381149866, 0.010236265327209445, 0.010129486185563072, 0.010022098571978891, 0.009914080632897703, 0.009805414054714913, 0.009696084064316064, 0.009586079420913359, 0.00947539239925765, 0.009364018764324569, 0.00925195773760336, 0.009139211955140246, 0.009025787417513299, 0.008911693431942954, 0.008796942546761657, 0.00868155047849358, 0.008565536031812808, 0.008448921012671706, 0.008331730134910023, 0.008213990920673032, 0.008095733594983237, 0.00797699097482788, 0.007857798353136266 ], "yaxis": "y" }, { "legendgroup": "Adelie", "marker": { "color": "rgb(31, 119, 180)", "symbol": "line-ns-open" }, "mode": "markers", "name": "Adelie", "showlegend": false, "type": "scatter", "x": [ 181, 186, 195, 193, 190, 181, 195, 193, 190, 186, 180, 182, 191, 198, 185, 195, 197, 184, 194, 174, 180, 189, 185, 180, 187, 183, 187, 172, 180, 178, 178, 188, 184, 195, 196, 190, 180, 181, 184, 182, 195, 186, 196, 185, 190, 182, 179, 190, 191, 186, 188, 190, 200, 187, 191, 186, 193, 181, 194, 185, 195, 185, 192, 184, 192, 195, 188, 190, 198, 190, 190, 196, 197, 190, 195, 191, 184, 187, 195, 189, 196, 187, 193, 191, 194, 190, 189, 189, 190, 202, 205, 185, 186, 187, 208, 190, 196, 178, 192, 192, 203, 183, 190, 193, 184, 199, 190, 181, 197, 198, 191, 193, 197, 191, 196, 188, 199, 189, 189, 187, 198, 176, 202, 186, 199, 191, 195, 191, 210, 190, 197, 193, 199, 187, 190, 191, 200, 185, 193, 193, 187, 188, 190, 192, 185, 190, 184, 195, 193, 187, 201 ], "xaxis": "x", "y": [ "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "Adelie" ], "yaxis": "y2" }, { "legendgroup": "Gentoo", "marker": { "color": "rgb(255, 127, 14)", "symbol": "line-ns-open" }, "mode": "markers", "name": "Gentoo", "showlegend": false, "type": "scatter", "x": [ 211, 230, 210, 218, 215, 210, 211, 219, 209, 215, 214, 216, 214, 213, 210, 217, 210, 221, 209, 222, 218, 215, 213, 215, 215, 215, 216, 215, 210, 220, 222, 209, 207, 230, 220, 220, 213, 219, 208, 208, 208, 225, 210, 216, 222, 217, 210, 225, 213, 215, 210, 220, 210, 225, 217, 220, 208, 220, 208, 224, 208, 221, 214, 231, 219, 230, 214, 229, 220, 223, 216, 221, 221, 217, 216, 230, 209, 220, 215, 223, 212, 221, 212, 224, 212, 228, 218, 218, 212, 230, 218, 228, 212, 224, 214, 226, 216, 222, 203, 225, 219, 228, 215, 228, 216, 215, 210, 219, 208, 209, 216, 229, 213, 230, 217, 230, 217, 222, 214, 215, 222, 212, 213 ], "xaxis": "x", "y": [ "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo", "Gentoo" ], "yaxis": "y2" }, { "legendgroup": "Chinstrap", "marker": { "color": "rgb(44, 160, 44)", "symbol": "line-ns-open" }, "mode": "markers", "name": "Chinstrap", "showlegend": false, "type": "scatter", "x": [ 192, 196, 193, 188, 197, 198, 178, 197, 195, 198, 193, 194, 185, 201, 190, 201, 197, 181, 190, 195, 181, 191, 187, 193, 195, 197, 200, 200, 191, 205, 187, 201, 187, 203, 195, 199, 195, 210, 192, 205, 210, 187, 196, 196, 196, 201, 190, 212, 187, 198, 199, 201, 193, 203, 187, 197, 191, 203, 202, 194, 206, 189, 195, 207, 202, 193, 210, 198 ], "xaxis": "x", "y": [ "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap", "Chinstrap" ], "yaxis": "y2" } ], "layout": { "barmode": "overlay", "hovermode": "closest", "legend": { "traceorder": "reversed" }, "template": { "data": { "bar": [ { "error_x": { "color": "#2a3f5f" }, "error_y": { "color": "#2a3f5f" }, "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "bar" } ], "barpolar": [ { "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "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": { "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "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": [ { "fillpattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 }, "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 }, "autotypenumbers": "strict", "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 } } }, "xaxis": { "anchor": "y2", "domain": [ 0, 1 ], "zeroline": false }, "yaxis": { "anchor": "free", "domain": [ 0.35, 1 ], "position": 0 }, "yaxis2": { "anchor": "x", "domain": [ 0, 0.25 ], "dtick": 1, "showticklabels": false } } } }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# Distribution Plot\n", "species = ['Adelie', 'Gentoo', 'Chinstrap']\n", "hist_data = penguins.loc[(penguins.flipper_length_mm.notna()), ['species', 'flipper_length_mm']].copy()\n", "hist_data = [hist_data.loc[(hist_data.species == sp), 'flipper_length_mm'] for sp in species]\n", "\n", "fig = ff.create_distplot(hist_data, group_labels = species, bin_size=.2)\n", "# fig = ff._____(hist_data, group_labels = _____, bin_size=.2)\n", "fig\n" ] }, { "cell_type": "code", "execution_count": 5, "id": "50bd5df9", "metadata": {}, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "hovertemplate": "species=Adelie
bill_length_mm=%{x}
bill_depth_mm=%{y}
flipper_length_mm=%{z}", "legendgroup": "Adelie", "marker": { "color": "#636efa", "symbol": "circle" }, "mode": "markers", "name": "Adelie", "scene": "scene", "showlegend": true, "type": "scatter3d", "x": [ 39.1, 39.5, 40.3, null, 36.7, 39.3, 38.9, 39.2, 34.1, 42, 37.8, 37.8, 41.1, 38.6, 34.6, 36.6, 38.7, 42.5, 34.4, 46, 37.8, 37.7, 35.9, 38.2, 38.8, 35.3, 40.6, 40.5, 37.9, 40.5, 39.5, 37.2, 39.5, 40.9, 36.4, 39.2, 38.8, 42.2, 37.6, 39.8, 36.5, 40.8, 36, 44.1, 37, 39.6, 41.1, 37.5, 36, 42.3, 39.6, 40.1, 35, 42, 34.5, 41.4, 39, 40.6, 36.5, 37.6, 35.7, 41.3, 37.6, 41.1, 36.4, 41.6, 35.5, 41.1, 35.9, 41.8, 33.5, 39.7, 39.6, 45.8, 35.5, 42.8, 40.9, 37.2, 36.2, 42.1, 34.6, 42.9, 36.7, 35.1, 37.3, 41.3, 36.3, 36.9, 38.3, 38.9, 35.7, 41.1, 34, 39.6, 36.2, 40.8, 38.1, 40.3, 33.1, 43.2, 35, 41, 37.7, 37.8, 37.9, 39.7, 38.6, 38.2, 38.1, 43.2, 38.1, 45.6, 39.7, 42.2, 39.6, 42.7, 38.6, 37.3, 35.7, 41.1, 36.2, 37.7, 40.2, 41.4, 35.2, 40.6, 38.8, 41.5, 39, 44.1, 38.5, 43.1, 36.8, 37.5, 38.1, 41.1, 35.6, 40.2, 37, 39.7, 40.2, 40.6, 32.1, 40.7, 37.3, 39, 39.2, 36.6, 36, 37.8, 36, 41.5 ], "y": [ 18.7, 17.4, 18, null, 19.3, 20.6, 17.8, 19.6, 18.1, 20.2, 17.1, 17.3, 17.6, 21.2, 21.1, 17.8, 19, 20.7, 18.4, 21.5, 18.3, 18.7, 19.2, 18.1, 17.2, 18.9, 18.6, 17.9, 18.6, 18.9, 16.7, 18.1, 17.8, 18.9, 17, 21.1, 20, 18.5, 19.3, 19.1, 18, 18.4, 18.5, 19.7, 16.9, 18.8, 19, 18.9, 17.9, 21.2, 17.7, 18.9, 17.9, 19.5, 18.1, 18.6, 17.5, 18.8, 16.6, 19.1, 16.9, 21.1, 17, 18.2, 17.1, 18, 16.2, 19.1, 16.6, 19.4, 19, 18.4, 17.2, 18.9, 17.5, 18.5, 16.8, 19.4, 16.1, 19.1, 17.2, 17.6, 18.8, 19.4, 17.8, 20.3, 19.5, 18.6, 19.2, 18.8, 18, 18.1, 17.1, 18.1, 17.3, 18.9, 18.6, 18.5, 16.1, 18.5, 17.9, 20, 16, 20, 18.6, 18.9, 17.2, 20, 17, 19, 16.5, 20.3, 17.7, 19.5, 20.7, 18.3, 17, 20.5, 17, 18.6, 17.2, 19.8, 17, 18.5, 15.9, 19, 17.6, 18.3, 17.1, 18, 17.9, 19.2, 18.5, 18.5, 17.6, 17.5, 17.5, 20.1, 16.5, 17.9, 17.1, 17.2, 15.5, 17, 16.8, 18.7, 18.6, 18.4, 17.8, 18.1, 17.1, 18.5 ], "z": [ 181, 186, 195, null, 193, 190, 181, 195, 193, 190, 186, 180, 182, 191, 198, 185, 195, 197, 184, 194, 174, 180, 189, 185, 180, 187, 183, 187, 172, 180, 178, 178, 188, 184, 195, 196, 190, 180, 181, 184, 182, 195, 186, 196, 185, 190, 182, 179, 190, 191, 186, 188, 190, 200, 187, 191, 186, 193, 181, 194, 185, 195, 185, 192, 184, 192, 195, 188, 190, 198, 190, 190, 196, 197, 190, 195, 191, 184, 187, 195, 189, 196, 187, 193, 191, 194, 190, 189, 189, 190, 202, 205, 185, 186, 187, 208, 190, 196, 178, 192, 192, 203, 183, 190, 193, 184, 199, 190, 181, 197, 198, 191, 193, 197, 191, 196, 188, 199, 189, 189, 187, 198, 176, 202, 186, 199, 191, 195, 191, 210, 190, 197, 193, 199, 187, 190, 191, 200, 185, 193, 193, 187, 188, 190, 192, 185, 190, 184, 195, 193, 187, 201 ] }, { "hovertemplate": "species=Gentoo
bill_length_mm=%{x}
bill_depth_mm=%{y}
flipper_length_mm=%{z}", "legendgroup": "Gentoo", "marker": { "color": "#EF553B", "symbol": "circle" }, "mode": "markers", "name": "Gentoo", "scene": "scene", "showlegend": true, "type": "scatter3d", "x": [ 46.1, 50, 48.7, 50, 47.6, 46.5, 45.4, 46.7, 43.3, 46.8, 40.9, 49, 45.5, 48.4, 45.8, 49.3, 42, 49.2, 46.2, 48.7, 50.2, 45.1, 46.5, 46.3, 42.9, 46.1, 44.5, 47.8, 48.2, 50, 47.3, 42.8, 45.1, 59.6, 49.1, 48.4, 42.6, 44.4, 44, 48.7, 42.7, 49.6, 45.3, 49.6, 50.5, 43.6, 45.5, 50.5, 44.9, 45.2, 46.6, 48.5, 45.1, 50.1, 46.5, 45, 43.8, 45.5, 43.2, 50.4, 45.3, 46.2, 45.7, 54.3, 45.8, 49.8, 46.2, 49.5, 43.5, 50.7, 47.7, 46.4, 48.2, 46.5, 46.4, 48.6, 47.5, 51.1, 45.2, 45.2, 49.1, 52.5, 47.4, 50, 44.9, 50.8, 43.4, 51.3, 47.5, 52.1, 47.5, 52.2, 45.5, 49.5, 44.5, 50.8, 49.4, 46.9, 48.4, 51.1, 48.5, 55.9, 47.2, 49.1, 47.3, 46.8, 41.7, 53.4, 43.3, 48.1, 50.5, 49.8, 43.5, 51.5, 46.2, 55.1, 44.5, 48.8, 47.2, null, 46.8, 50.4, 45.2, 49.9 ], "y": [ 13.2, 16.3, 14.1, 15.2, 14.5, 13.5, 14.6, 15.3, 13.4, 15.4, 13.7, 16.1, 13.7, 14.6, 14.6, 15.7, 13.5, 15.2, 14.5, 15.1, 14.3, 14.5, 14.5, 15.8, 13.1, 15.1, 14.3, 15, 14.3, 15.3, 15.3, 14.2, 14.5, 17, 14.8, 16.3, 13.7, 17.3, 13.6, 15.7, 13.7, 16, 13.7, 15, 15.9, 13.9, 13.9, 15.9, 13.3, 15.8, 14.2, 14.1, 14.4, 15, 14.4, 15.4, 13.9, 15, 14.5, 15.3, 13.8, 14.9, 13.9, 15.7, 14.2, 16.8, 14.4, 16.2, 14.2, 15, 15, 15.6, 15.6, 14.8, 15, 16, 14.2, 16.3, 13.8, 16.4, 14.5, 15.6, 14.6, 15.9, 13.8, 17.3, 14.4, 14.2, 14, 17, 15, 17.1, 14.5, 16.1, 14.7, 15.7, 15.8, 14.6, 14.4, 16.5, 15, 17, 15.5, 15, 13.8, 16.1, 14.7, 15.8, 14, 15.1, 15.2, 15.9, 15.2, 16.3, 14.1, 16, 15.7, 16.2, 13.7, null, 14.3, 15.7, 14.8, 16.1 ], "z": [ 211, 230, 210, 218, 215, 210, 211, 219, 209, 215, 214, 216, 214, 213, 210, 217, 210, 221, 209, 222, 218, 215, 213, 215, 215, 215, 216, 215, 210, 220, 222, 209, 207, 230, 220, 220, 213, 219, 208, 208, 208, 225, 210, 216, 222, 217, 210, 225, 213, 215, 210, 220, 210, 225, 217, 220, 208, 220, 208, 224, 208, 221, 214, 231, 219, 230, 214, 229, 220, 223, 216, 221, 221, 217, 216, 230, 209, 220, 215, 223, 212, 221, 212, 224, 212, 228, 218, 218, 212, 230, 218, 228, 212, 224, 214, 226, 216, 222, 203, 225, 219, 228, 215, 228, 216, 215, 210, 219, 208, 209, 216, 229, 213, 230, 217, 230, 217, 222, 214, null, 215, 222, 212, 213 ] }, { "hovertemplate": "species=Chinstrap
bill_length_mm=%{x}
bill_depth_mm=%{y}
flipper_length_mm=%{z}", "legendgroup": "Chinstrap", "marker": { "color": "#00cc96", "symbol": "circle" }, "mode": "markers", "name": "Chinstrap", "scene": "scene", "showlegend": true, "type": "scatter3d", "x": [ 46.5, 50, 51.3, 45.4, 52.7, 45.2, 46.1, 51.3, 46, 51.3, 46.6, 51.7, 47, 52, 45.9, 50.5, 50.3, 58, 46.4, 49.2, 42.4, 48.5, 43.2, 50.6, 46.7, 52, 50.5, 49.5, 46.4, 52.8, 40.9, 54.2, 42.5, 51, 49.7, 47.5, 47.6, 52, 46.9, 53.5, 49, 46.2, 50.9, 45.5, 50.9, 50.8, 50.1, 49, 51.5, 49.8, 48.1, 51.4, 45.7, 50.7, 42.5, 52.2, 45.2, 49.3, 50.2, 45.6, 51.9, 46.8, 45.7, 55.8, 43.5, 49.6, 50.8, 50.2 ], "y": [ 17.9, 19.5, 19.2, 18.7, 19.8, 17.8, 18.2, 18.2, 18.9, 19.9, 17.8, 20.3, 17.3, 18.1, 17.1, 19.6, 20, 17.8, 18.6, 18.2, 17.3, 17.5, 16.6, 19.4, 17.9, 19, 18.4, 19, 17.8, 20, 16.6, 20.8, 16.7, 18.8, 18.6, 16.8, 18.3, 20.7, 16.6, 19.9, 19.5, 17.5, 19.1, 17, 17.9, 18.5, 17.9, 19.6, 18.7, 17.3, 16.4, 19, 17.3, 19.7, 17.3, 18.8, 16.6, 19.9, 18.8, 19.4, 19.5, 16.5, 17, 19.8, 18.1, 18.2, 19, 18.7 ], "z": [ 192, 196, 193, 188, 197, 198, 178, 197, 195, 198, 193, 194, 185, 201, 190, 201, 197, 181, 190, 195, 181, 191, 187, 193, 195, 197, 200, 200, 191, 205, 187, 201, 187, 203, 195, 199, 195, 210, 192, 205, 210, 187, 196, 196, 196, 201, 190, 212, 187, 198, 199, 201, 193, 203, 187, 197, 191, 203, 202, 194, 206, 189, 195, 207, 202, 193, 210, 198 ] } ], "layout": { "legend": { "title": { "text": "species" }, "tracegroupgap": 0 }, "margin": { "t": 60 }, "scene": { "domain": { "x": [ 0, 1 ], "y": [ 0, 1 ] }, "xaxis": { "title": { "text": "bill_length_mm" } }, "yaxis": { "title": { "text": "bill_depth_mm" } }, "zaxis": { "title": { "text": "flipper_length_mm" } } }, "template": { "data": { "bar": [ { "error_x": { "color": "#2a3f5f" }, "error_y": { "color": "#2a3f5f" }, "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "bar" } ], "barpolar": [ { "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "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": { "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "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": [ { "fillpattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 }, "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 }, "autotypenumbers": "strict", "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 } } } } } }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# Scatterplot (3d)\n", "fig = px.scatter_3d(penguins, x = 'bill_length_mm', y = 'bill_depth_mm', z = 'flipper_length_mm', color = 'species')\n", "# px._____(penguins, _____, _____, _____, , color = 'species')\n", "fig " ] }, { "cell_type": "markdown", "id": "6e33fd26", "metadata": {}, "source": [ "# Customizing a Plot" ] }, { "cell_type": "code", "execution_count": 6, "id": "cc363941", "metadata": { "lines_to_next_cell": 2 }, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "marker": { "color": [ "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96" ], "opacity": 0.6 }, "mode": "markers", "type": "scatter3d", "x": [ 39.1, 39.5, 40.3, null, 36.7, 39.3, 38.9, 39.2, 34.1, 42, 37.8, 37.8, 41.1, 38.6, 34.6, 36.6, 38.7, 42.5, 34.4, 46, 37.8, 37.7, 35.9, 38.2, 38.8, 35.3, 40.6, 40.5, 37.9, 40.5, 39.5, 37.2, 39.5, 40.9, 36.4, 39.2, 38.8, 42.2, 37.6, 39.8, 36.5, 40.8, 36, 44.1, 37, 39.6, 41.1, 37.5, 36, 42.3, 39.6, 40.1, 35, 42, 34.5, 41.4, 39, 40.6, 36.5, 37.6, 35.7, 41.3, 37.6, 41.1, 36.4, 41.6, 35.5, 41.1, 35.9, 41.8, 33.5, 39.7, 39.6, 45.8, 35.5, 42.8, 40.9, 37.2, 36.2, 42.1, 34.6, 42.9, 36.7, 35.1, 37.3, 41.3, 36.3, 36.9, 38.3, 38.9, 35.7, 41.1, 34, 39.6, 36.2, 40.8, 38.1, 40.3, 33.1, 43.2, 35, 41, 37.7, 37.8, 37.9, 39.7, 38.6, 38.2, 38.1, 43.2, 38.1, 45.6, 39.7, 42.2, 39.6, 42.7, 38.6, 37.3, 35.7, 41.1, 36.2, 37.7, 40.2, 41.4, 35.2, 40.6, 38.8, 41.5, 39, 44.1, 38.5, 43.1, 36.8, 37.5, 38.1, 41.1, 35.6, 40.2, 37, 39.7, 40.2, 40.6, 32.1, 40.7, 37.3, 39, 39.2, 36.6, 36, 37.8, 36, 41.5, 46.1, 50, 48.7, 50, 47.6, 46.5, 45.4, 46.7, 43.3, 46.8, 40.9, 49, 45.5, 48.4, 45.8, 49.3, 42, 49.2, 46.2, 48.7, 50.2, 45.1, 46.5, 46.3, 42.9, 46.1, 44.5, 47.8, 48.2, 50, 47.3, 42.8, 45.1, 59.6, 49.1, 48.4, 42.6, 44.4, 44, 48.7, 42.7, 49.6, 45.3, 49.6, 50.5, 43.6, 45.5, 50.5, 44.9, 45.2, 46.6, 48.5, 45.1, 50.1, 46.5, 45, 43.8, 45.5, 43.2, 50.4, 45.3, 46.2, 45.7, 54.3, 45.8, 49.8, 46.2, 49.5, 43.5, 50.7, 47.7, 46.4, 48.2, 46.5, 46.4, 48.6, 47.5, 51.1, 45.2, 45.2, 49.1, 52.5, 47.4, 50, 44.9, 50.8, 43.4, 51.3, 47.5, 52.1, 47.5, 52.2, 45.5, 49.5, 44.5, 50.8, 49.4, 46.9, 48.4, 51.1, 48.5, 55.9, 47.2, 49.1, 47.3, 46.8, 41.7, 53.4, 43.3, 48.1, 50.5, 49.8, 43.5, 51.5, 46.2, 55.1, 44.5, 48.8, 47.2, null, 46.8, 50.4, 45.2, 49.9, 46.5, 50, 51.3, 45.4, 52.7, 45.2, 46.1, 51.3, 46, 51.3, 46.6, 51.7, 47, 52, 45.9, 50.5, 50.3, 58, 46.4, 49.2, 42.4, 48.5, 43.2, 50.6, 46.7, 52, 50.5, 49.5, 46.4, 52.8, 40.9, 54.2, 42.5, 51, 49.7, 47.5, 47.6, 52, 46.9, 53.5, 49, 46.2, 50.9, 45.5, 50.9, 50.8, 50.1, 49, 51.5, 49.8, 48.1, 51.4, 45.7, 50.7, 42.5, 52.2, 45.2, 49.3, 50.2, 45.6, 51.9, 46.8, 45.7, 55.8, 43.5, 49.6, 50.8, 50.2 ], "y": [ 18.7, 17.4, 18, null, 19.3, 20.6, 17.8, 19.6, 18.1, 20.2, 17.1, 17.3, 17.6, 21.2, 21.1, 17.8, 19, 20.7, 18.4, 21.5, 18.3, 18.7, 19.2, 18.1, 17.2, 18.9, 18.6, 17.9, 18.6, 18.9, 16.7, 18.1, 17.8, 18.9, 17, 21.1, 20, 18.5, 19.3, 19.1, 18, 18.4, 18.5, 19.7, 16.9, 18.8, 19, 18.9, 17.9, 21.2, 17.7, 18.9, 17.9, 19.5, 18.1, 18.6, 17.5, 18.8, 16.6, 19.1, 16.9, 21.1, 17, 18.2, 17.1, 18, 16.2, 19.1, 16.6, 19.4, 19, 18.4, 17.2, 18.9, 17.5, 18.5, 16.8, 19.4, 16.1, 19.1, 17.2, 17.6, 18.8, 19.4, 17.8, 20.3, 19.5, 18.6, 19.2, 18.8, 18, 18.1, 17.1, 18.1, 17.3, 18.9, 18.6, 18.5, 16.1, 18.5, 17.9, 20, 16, 20, 18.6, 18.9, 17.2, 20, 17, 19, 16.5, 20.3, 17.7, 19.5, 20.7, 18.3, 17, 20.5, 17, 18.6, 17.2, 19.8, 17, 18.5, 15.9, 19, 17.6, 18.3, 17.1, 18, 17.9, 19.2, 18.5, 18.5, 17.6, 17.5, 17.5, 20.1, 16.5, 17.9, 17.1, 17.2, 15.5, 17, 16.8, 18.7, 18.6, 18.4, 17.8, 18.1, 17.1, 18.5, 13.2, 16.3, 14.1, 15.2, 14.5, 13.5, 14.6, 15.3, 13.4, 15.4, 13.7, 16.1, 13.7, 14.6, 14.6, 15.7, 13.5, 15.2, 14.5, 15.1, 14.3, 14.5, 14.5, 15.8, 13.1, 15.1, 14.3, 15, 14.3, 15.3, 15.3, 14.2, 14.5, 17, 14.8, 16.3, 13.7, 17.3, 13.6, 15.7, 13.7, 16, 13.7, 15, 15.9, 13.9, 13.9, 15.9, 13.3, 15.8, 14.2, 14.1, 14.4, 15, 14.4, 15.4, 13.9, 15, 14.5, 15.3, 13.8, 14.9, 13.9, 15.7, 14.2, 16.8, 14.4, 16.2, 14.2, 15, 15, 15.6, 15.6, 14.8, 15, 16, 14.2, 16.3, 13.8, 16.4, 14.5, 15.6, 14.6, 15.9, 13.8, 17.3, 14.4, 14.2, 14, 17, 15, 17.1, 14.5, 16.1, 14.7, 15.7, 15.8, 14.6, 14.4, 16.5, 15, 17, 15.5, 15, 13.8, 16.1, 14.7, 15.8, 14, 15.1, 15.2, 15.9, 15.2, 16.3, 14.1, 16, 15.7, 16.2, 13.7, null, 14.3, 15.7, 14.8, 16.1, 17.9, 19.5, 19.2, 18.7, 19.8, 17.8, 18.2, 18.2, 18.9, 19.9, 17.8, 20.3, 17.3, 18.1, 17.1, 19.6, 20, 17.8, 18.6, 18.2, 17.3, 17.5, 16.6, 19.4, 17.9, 19, 18.4, 19, 17.8, 20, 16.6, 20.8, 16.7, 18.8, 18.6, 16.8, 18.3, 20.7, 16.6, 19.9, 19.5, 17.5, 19.1, 17, 17.9, 18.5, 17.9, 19.6, 18.7, 17.3, 16.4, 19, 17.3, 19.7, 17.3, 18.8, 16.6, 19.9, 18.8, 19.4, 19.5, 16.5, 17, 19.8, 18.1, 18.2, 19, 18.7 ], "z": [ 181, 186, 195, null, 193, 190, 181, 195, 193, 190, 186, 180, 182, 191, 198, 185, 195, 197, 184, 194, 174, 180, 189, 185, 180, 187, 183, 187, 172, 180, 178, 178, 188, 184, 195, 196, 190, 180, 181, 184, 182, 195, 186, 196, 185, 190, 182, 179, 190, 191, 186, 188, 190, 200, 187, 191, 186, 193, 181, 194, 185, 195, 185, 192, 184, 192, 195, 188, 190, 198, 190, 190, 196, 197, 190, 195, 191, 184, 187, 195, 189, 196, 187, 193, 191, 194, 190, 189, 189, 190, 202, 205, 185, 186, 187, 208, 190, 196, 178, 192, 192, 203, 183, 190, 193, 184, 199, 190, 181, 197, 198, 191, 193, 197, 191, 196, 188, 199, 189, 189, 187, 198, 176, 202, 186, 199, 191, 195, 191, 210, 190, 197, 193, 199, 187, 190, 191, 200, 185, 193, 193, 187, 188, 190, 192, 185, 190, 184, 195, 193, 187, 201, 211, 230, 210, 218, 215, 210, 211, 219, 209, 215, 214, 216, 214, 213, 210, 217, 210, 221, 209, 222, 218, 215, 213, 215, 215, 215, 216, 215, 210, 220, 222, 209, 207, 230, 220, 220, 213, 219, 208, 208, 208, 225, 210, 216, 222, 217, 210, 225, 213, 215, 210, 220, 210, 225, 217, 220, 208, 220, 208, 224, 208, 221, 214, 231, 219, 230, 214, 229, 220, 223, 216, 221, 221, 217, 216, 230, 209, 220, 215, 223, 212, 221, 212, 224, 212, 228, 218, 218, 212, 230, 218, 228, 212, 224, 214, 226, 216, 222, 203, 225, 219, 228, 215, 228, 216, 215, 210, 219, 208, 209, 216, 229, 213, 230, 217, 230, 217, 222, 214, null, 215, 222, 212, 213, 192, 196, 193, 188, 197, 198, 178, 197, 195, 198, 193, 194, 185, 201, 190, 201, 197, 181, 190, 195, 181, 191, 187, 193, 195, 197, 200, 200, 191, 205, 187, 201, 187, 203, 195, 199, 195, 210, 192, 205, 210, 187, 196, 196, 196, 201, 190, 212, 187, 198, 199, 201, 193, 203, 187, 197, 191, 203, 202, 194, 206, 189, 195, 207, 202, 193, 210, 198 ] } ], "layout": { "scene": { "xaxis": { "title": { "text": "bill_length_mm" } }, "yaxis": { "title": { "text": "bill_depth_mm" } }, "zaxis": { "title": { "text": "flipper_length_mm" } } }, "template": { "data": { "bar": [ { "error_x": { "color": "#2a3f5f" }, "error_y": { "color": "#2a3f5f" }, "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "bar" } ], "barpolar": [ { "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "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": { "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "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": [ { "fillpattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 }, "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 }, "autotypenumbers": "strict", "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 } } } } } }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# Recreate Scatterplot (3d) with transparancy and control over point color\n", "\n", "color_mapping = {'Adelie':'#636EFA', 'Gentoo':'#EF553B', 'Chinstrap':'#00CC96'}\n", "color_list = [color_mapping[i] for i in penguins['species']]\n", "\n", "\n", "fig = go.Figure(data=[go.Scatter3d(\n", " x = penguins['bill_length_mm'], \n", " y = penguins['bill_depth_mm'], \n", " z = penguins['flipper_length_mm'],\n", " \n", " mode='markers',\n", " marker=dict(\n", " color= color_list, \n", " opacity=0.6 \n", " )\n", ")])\n", "\n", "# fig = go.Figure(data=[go.Scatter3d(\n", "# x = penguins['bill_length_mm'], \n", "# y = penguins['bill_depth_mm'], \n", "# z = penguins['flipper_length_mm'],\n", " \n", "# mode='markers',\n", "# marker=dict(\n", "# color= _____, \n", "# opacity= _____ \n", "# )\n", "# )])\n", "\n", "\n", "# fig.update_layout(margin=dict(l=0, r=0, b=0, t=0)) # zoom camera\n", "fig.update_layout(scene = dict(\n", " xaxis_title='bill_length_mm',\n", " yaxis_title='bill_depth_mm',\n", " zaxis_title='flipper_length_mm'))\n", "fig.show()\n", "\n" ] }, { "cell_type": "markdown", "id": "d240b8fc", "metadata": {}, "source": [ "# Adding a Fitted Plane (Demo)" ] }, { "cell_type": "code", "execution_count": 7, "id": "a98945a1", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " OLS Regression Results \n", "==============================================================================\n", "Dep. Variable: flipper_length_mm R-squared: 0.847\n", "Model: OLS Adj. R-squared: 0.845\n", "Method: Least Squares F-statistic: 464.7\n", "Date: Mon, 23 Sep 2024 Prob (F-statistic): 9.97e-136\n", "Time: 17:50:37 Log-Likelihood: -1068.3\n", "No. Observations: 342 AIC: 2147.\n", "Df Residuals: 337 BIC: 2166.\n", "Df Model: 4 \n", "Covariance Type: nonrobust \n", "========================================================================================\n", " coef std err t P>|t| [0.025 0.975]\n", "----------------------------------------------------------------------------------------\n", "Intercept 127.6915 5.194 24.586 0.000 117.475 137.908\n", "species[T.Chinstrap] -1.3062 1.439 -0.908 0.365 -4.137 1.525\n", "species[T.Gentoo] 27.5648 1.961 14.060 0.000 23.708 31.421\n", "bill_length_mm 0.7004 0.120 5.851 0.000 0.465 0.936\n", "bill_depth_mm 1.9127 0.316 6.050 0.000 1.291 2.535\n", "==============================================================================\n", "Omnibus: 7.801 Durbin-Watson: 1.831\n", "Prob(Omnibus): 0.020 Jarque-Bera (JB): 11.197\n", "Skew: -0.147 Prob(JB): 0.00370\n", "Kurtosis: 3.836 Cond. No. 827.\n", "==============================================================================\n", "\n", "Notes:\n", "[1] Standard Errors assume that the covariance matrix of the errors is correctly specified.\n" ] } ], "source": [ "# Model fitting:\n", "penguins_nona = penguins[['species', 'bill_length_mm', 'bill_depth_mm', 'flipper_length_mm']].dropna()\n", "fm = smf.ols(formula='flipper_length_mm ~ species + bill_length_mm + bill_depth_mm', data=penguins_nona)\n", "\n", "res = fm.fit()\n", "\n", "print(res.summary())" ] }, { "cell_type": "code", "execution_count": 8, "id": "1307cb0e", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "Intercept 127.691468\n", "species[T.Chinstrap] -1.306232\n", "species[T.Gentoo] 27.564848\n", "bill_length_mm 0.700442\n", "bill_depth_mm 1.912699\n", "dtype: float64" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Model parameter\n", "res.params" ] }, { "cell_type": "code", "execution_count": 9, "id": "31158f5e", "metadata": {}, "outputs": [], "source": [ "# Transparant predictions \n", "# Note: relying on a global variable like this is bad practice.\n", "def predict_flipper_len(species, bill_length_mm, bill_depth_mm):\n", " yHat = res.params['Intercept']\n", "\n", " if species == 'Chinstrap':\n", " yHat += res.params['species[T.Chinstrap]']\n", " elif species == 'Gentoo':\n", " yHat += res.params['species[T.Gentoo]']\n", "\n", " yHat += res.params['bill_length_mm'] * bill_length_mm\n", " yHat += res.params['bill_depth_mm'] * bill_depth_mm\n", "\n", " return(yHat)\n", "\n", "\n", "def mk_plane(species = 'Adelie'):\n", "\n", " # get corners of the plane to define\n", " min_length = penguins_nona.loc[penguins_nona['species'] == species, 'bill_length_mm'].min()\n", " max_length = penguins_nona.loc[penguins_nona['species'] == species, 'bill_length_mm'].max()\n", "\n", " min_depth = penguins_nona.loc[penguins_nona['species'] == species, 'bill_depth_mm'].min()\n", " max_depth = penguins_nona.loc[penguins_nona['species'] == species, 'bill_depth_mm'].max()\n", "\n", " temp = pd.DataFrame({'bill_length_mm' : [min_length, min_length, max_length, max_length],\n", " 'bill_depth_mm' : [min_depth, max_depth, min_depth, max_depth]})\n", "\n", " temp['species'] = species\n", " temp['flipper_length_mm'] = np.nan\n", "\n", " # calculate the z for each\n", " for i in temp.index:\n", " temp.loc[i, 'flipper_length_mm'] = predict_flipper_len(species = temp.loc[i, 'species'], \n", " bill_length_mm = temp.loc[i, 'bill_length_mm'], \n", " bill_depth_mm = temp.loc[i, 'bill_depth_mm'])\n", " return(temp)" ] }, { "cell_type": "code", "execution_count": 10, "id": "c0ca09c4", "metadata": {}, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "marker": { "color": [ "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96" ], "opacity": 0.6 }, "mode": "markers", "type": "scatter3d", "x": [ 39.1, 39.5, 40.3, null, 36.7, 39.3, 38.9, 39.2, 34.1, 42, 37.8, 37.8, 41.1, 38.6, 34.6, 36.6, 38.7, 42.5, 34.4, 46, 37.8, 37.7, 35.9, 38.2, 38.8, 35.3, 40.6, 40.5, 37.9, 40.5, 39.5, 37.2, 39.5, 40.9, 36.4, 39.2, 38.8, 42.2, 37.6, 39.8, 36.5, 40.8, 36, 44.1, 37, 39.6, 41.1, 37.5, 36, 42.3, 39.6, 40.1, 35, 42, 34.5, 41.4, 39, 40.6, 36.5, 37.6, 35.7, 41.3, 37.6, 41.1, 36.4, 41.6, 35.5, 41.1, 35.9, 41.8, 33.5, 39.7, 39.6, 45.8, 35.5, 42.8, 40.9, 37.2, 36.2, 42.1, 34.6, 42.9, 36.7, 35.1, 37.3, 41.3, 36.3, 36.9, 38.3, 38.9, 35.7, 41.1, 34, 39.6, 36.2, 40.8, 38.1, 40.3, 33.1, 43.2, 35, 41, 37.7, 37.8, 37.9, 39.7, 38.6, 38.2, 38.1, 43.2, 38.1, 45.6, 39.7, 42.2, 39.6, 42.7, 38.6, 37.3, 35.7, 41.1, 36.2, 37.7, 40.2, 41.4, 35.2, 40.6, 38.8, 41.5, 39, 44.1, 38.5, 43.1, 36.8, 37.5, 38.1, 41.1, 35.6, 40.2, 37, 39.7, 40.2, 40.6, 32.1, 40.7, 37.3, 39, 39.2, 36.6, 36, 37.8, 36, 41.5, 46.1, 50, 48.7, 50, 47.6, 46.5, 45.4, 46.7, 43.3, 46.8, 40.9, 49, 45.5, 48.4, 45.8, 49.3, 42, 49.2, 46.2, 48.7, 50.2, 45.1, 46.5, 46.3, 42.9, 46.1, 44.5, 47.8, 48.2, 50, 47.3, 42.8, 45.1, 59.6, 49.1, 48.4, 42.6, 44.4, 44, 48.7, 42.7, 49.6, 45.3, 49.6, 50.5, 43.6, 45.5, 50.5, 44.9, 45.2, 46.6, 48.5, 45.1, 50.1, 46.5, 45, 43.8, 45.5, 43.2, 50.4, 45.3, 46.2, 45.7, 54.3, 45.8, 49.8, 46.2, 49.5, 43.5, 50.7, 47.7, 46.4, 48.2, 46.5, 46.4, 48.6, 47.5, 51.1, 45.2, 45.2, 49.1, 52.5, 47.4, 50, 44.9, 50.8, 43.4, 51.3, 47.5, 52.1, 47.5, 52.2, 45.5, 49.5, 44.5, 50.8, 49.4, 46.9, 48.4, 51.1, 48.5, 55.9, 47.2, 49.1, 47.3, 46.8, 41.7, 53.4, 43.3, 48.1, 50.5, 49.8, 43.5, 51.5, 46.2, 55.1, 44.5, 48.8, 47.2, null, 46.8, 50.4, 45.2, 49.9, 46.5, 50, 51.3, 45.4, 52.7, 45.2, 46.1, 51.3, 46, 51.3, 46.6, 51.7, 47, 52, 45.9, 50.5, 50.3, 58, 46.4, 49.2, 42.4, 48.5, 43.2, 50.6, 46.7, 52, 50.5, 49.5, 46.4, 52.8, 40.9, 54.2, 42.5, 51, 49.7, 47.5, 47.6, 52, 46.9, 53.5, 49, 46.2, 50.9, 45.5, 50.9, 50.8, 50.1, 49, 51.5, 49.8, 48.1, 51.4, 45.7, 50.7, 42.5, 52.2, 45.2, 49.3, 50.2, 45.6, 51.9, 46.8, 45.7, 55.8, 43.5, 49.6, 50.8, 50.2 ], "y": [ 18.7, 17.4, 18, null, 19.3, 20.6, 17.8, 19.6, 18.1, 20.2, 17.1, 17.3, 17.6, 21.2, 21.1, 17.8, 19, 20.7, 18.4, 21.5, 18.3, 18.7, 19.2, 18.1, 17.2, 18.9, 18.6, 17.9, 18.6, 18.9, 16.7, 18.1, 17.8, 18.9, 17, 21.1, 20, 18.5, 19.3, 19.1, 18, 18.4, 18.5, 19.7, 16.9, 18.8, 19, 18.9, 17.9, 21.2, 17.7, 18.9, 17.9, 19.5, 18.1, 18.6, 17.5, 18.8, 16.6, 19.1, 16.9, 21.1, 17, 18.2, 17.1, 18, 16.2, 19.1, 16.6, 19.4, 19, 18.4, 17.2, 18.9, 17.5, 18.5, 16.8, 19.4, 16.1, 19.1, 17.2, 17.6, 18.8, 19.4, 17.8, 20.3, 19.5, 18.6, 19.2, 18.8, 18, 18.1, 17.1, 18.1, 17.3, 18.9, 18.6, 18.5, 16.1, 18.5, 17.9, 20, 16, 20, 18.6, 18.9, 17.2, 20, 17, 19, 16.5, 20.3, 17.7, 19.5, 20.7, 18.3, 17, 20.5, 17, 18.6, 17.2, 19.8, 17, 18.5, 15.9, 19, 17.6, 18.3, 17.1, 18, 17.9, 19.2, 18.5, 18.5, 17.6, 17.5, 17.5, 20.1, 16.5, 17.9, 17.1, 17.2, 15.5, 17, 16.8, 18.7, 18.6, 18.4, 17.8, 18.1, 17.1, 18.5, 13.2, 16.3, 14.1, 15.2, 14.5, 13.5, 14.6, 15.3, 13.4, 15.4, 13.7, 16.1, 13.7, 14.6, 14.6, 15.7, 13.5, 15.2, 14.5, 15.1, 14.3, 14.5, 14.5, 15.8, 13.1, 15.1, 14.3, 15, 14.3, 15.3, 15.3, 14.2, 14.5, 17, 14.8, 16.3, 13.7, 17.3, 13.6, 15.7, 13.7, 16, 13.7, 15, 15.9, 13.9, 13.9, 15.9, 13.3, 15.8, 14.2, 14.1, 14.4, 15, 14.4, 15.4, 13.9, 15, 14.5, 15.3, 13.8, 14.9, 13.9, 15.7, 14.2, 16.8, 14.4, 16.2, 14.2, 15, 15, 15.6, 15.6, 14.8, 15, 16, 14.2, 16.3, 13.8, 16.4, 14.5, 15.6, 14.6, 15.9, 13.8, 17.3, 14.4, 14.2, 14, 17, 15, 17.1, 14.5, 16.1, 14.7, 15.7, 15.8, 14.6, 14.4, 16.5, 15, 17, 15.5, 15, 13.8, 16.1, 14.7, 15.8, 14, 15.1, 15.2, 15.9, 15.2, 16.3, 14.1, 16, 15.7, 16.2, 13.7, null, 14.3, 15.7, 14.8, 16.1, 17.9, 19.5, 19.2, 18.7, 19.8, 17.8, 18.2, 18.2, 18.9, 19.9, 17.8, 20.3, 17.3, 18.1, 17.1, 19.6, 20, 17.8, 18.6, 18.2, 17.3, 17.5, 16.6, 19.4, 17.9, 19, 18.4, 19, 17.8, 20, 16.6, 20.8, 16.7, 18.8, 18.6, 16.8, 18.3, 20.7, 16.6, 19.9, 19.5, 17.5, 19.1, 17, 17.9, 18.5, 17.9, 19.6, 18.7, 17.3, 16.4, 19, 17.3, 19.7, 17.3, 18.8, 16.6, 19.9, 18.8, 19.4, 19.5, 16.5, 17, 19.8, 18.1, 18.2, 19, 18.7 ], "z": [ 181, 186, 195, null, 193, 190, 181, 195, 193, 190, 186, 180, 182, 191, 198, 185, 195, 197, 184, 194, 174, 180, 189, 185, 180, 187, 183, 187, 172, 180, 178, 178, 188, 184, 195, 196, 190, 180, 181, 184, 182, 195, 186, 196, 185, 190, 182, 179, 190, 191, 186, 188, 190, 200, 187, 191, 186, 193, 181, 194, 185, 195, 185, 192, 184, 192, 195, 188, 190, 198, 190, 190, 196, 197, 190, 195, 191, 184, 187, 195, 189, 196, 187, 193, 191, 194, 190, 189, 189, 190, 202, 205, 185, 186, 187, 208, 190, 196, 178, 192, 192, 203, 183, 190, 193, 184, 199, 190, 181, 197, 198, 191, 193, 197, 191, 196, 188, 199, 189, 189, 187, 198, 176, 202, 186, 199, 191, 195, 191, 210, 190, 197, 193, 199, 187, 190, 191, 200, 185, 193, 193, 187, 188, 190, 192, 185, 190, 184, 195, 193, 187, 201, 211, 230, 210, 218, 215, 210, 211, 219, 209, 215, 214, 216, 214, 213, 210, 217, 210, 221, 209, 222, 218, 215, 213, 215, 215, 215, 216, 215, 210, 220, 222, 209, 207, 230, 220, 220, 213, 219, 208, 208, 208, 225, 210, 216, 222, 217, 210, 225, 213, 215, 210, 220, 210, 225, 217, 220, 208, 220, 208, 224, 208, 221, 214, 231, 219, 230, 214, 229, 220, 223, 216, 221, 221, 217, 216, 230, 209, 220, 215, 223, 212, 221, 212, 224, 212, 228, 218, 218, 212, 230, 218, 228, 212, 224, 214, 226, 216, 222, 203, 225, 219, 228, 215, 228, 216, 215, 210, 219, 208, 209, 216, 229, 213, 230, 217, 230, 217, 222, 214, null, 215, 222, 212, 213, 192, 196, 193, 188, 197, 198, 178, 197, 195, 198, 193, 194, 185, 201, 190, 201, 197, 181, 190, 195, 181, 191, 187, 193, 195, 197, 200, 200, 191, 205, 187, 201, 187, 203, 195, 199, 195, 210, 192, 205, 210, 187, 196, 196, 196, 201, 190, 212, 187, 198, 199, 201, 193, 203, 187, 197, 191, 203, 202, 194, 206, 189, 195, 207, 202, 193, 210, 198 ] } ], "layout": { "scene": { "xaxis": { "title": { "text": "bill_length_mm" } }, "yaxis": { "title": { "text": "bill_depth_mm" } }, "zaxis": { "title": { "text": "flipper_length_mm" } } }, "template": { "data": { "bar": [ { "error_x": { "color": "#2a3f5f" }, "error_y": { "color": "#2a3f5f" }, "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "bar" } ], "barpolar": [ { "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "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": { "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "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": [ { "fillpattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 }, "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 }, "autotypenumbers": "strict", "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 } } } } } }, "metadata": {}, "output_type": "display_data" } ], "source": [ "fig" ] }, { "cell_type": "code", "execution_count": 11, "id": "33341859", "metadata": { "lines_to_next_cell": 0 }, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "marker": { "color": [ "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#636EFA", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#EF553B", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96", "#00CC96" ], "opacity": 0.6 }, "mode": "markers", "type": "scatter3d", "x": [ 39.1, 39.5, 40.3, null, 36.7, 39.3, 38.9, 39.2, 34.1, 42, 37.8, 37.8, 41.1, 38.6, 34.6, 36.6, 38.7, 42.5, 34.4, 46, 37.8, 37.7, 35.9, 38.2, 38.8, 35.3, 40.6, 40.5, 37.9, 40.5, 39.5, 37.2, 39.5, 40.9, 36.4, 39.2, 38.8, 42.2, 37.6, 39.8, 36.5, 40.8, 36, 44.1, 37, 39.6, 41.1, 37.5, 36, 42.3, 39.6, 40.1, 35, 42, 34.5, 41.4, 39, 40.6, 36.5, 37.6, 35.7, 41.3, 37.6, 41.1, 36.4, 41.6, 35.5, 41.1, 35.9, 41.8, 33.5, 39.7, 39.6, 45.8, 35.5, 42.8, 40.9, 37.2, 36.2, 42.1, 34.6, 42.9, 36.7, 35.1, 37.3, 41.3, 36.3, 36.9, 38.3, 38.9, 35.7, 41.1, 34, 39.6, 36.2, 40.8, 38.1, 40.3, 33.1, 43.2, 35, 41, 37.7, 37.8, 37.9, 39.7, 38.6, 38.2, 38.1, 43.2, 38.1, 45.6, 39.7, 42.2, 39.6, 42.7, 38.6, 37.3, 35.7, 41.1, 36.2, 37.7, 40.2, 41.4, 35.2, 40.6, 38.8, 41.5, 39, 44.1, 38.5, 43.1, 36.8, 37.5, 38.1, 41.1, 35.6, 40.2, 37, 39.7, 40.2, 40.6, 32.1, 40.7, 37.3, 39, 39.2, 36.6, 36, 37.8, 36, 41.5, 46.1, 50, 48.7, 50, 47.6, 46.5, 45.4, 46.7, 43.3, 46.8, 40.9, 49, 45.5, 48.4, 45.8, 49.3, 42, 49.2, 46.2, 48.7, 50.2, 45.1, 46.5, 46.3, 42.9, 46.1, 44.5, 47.8, 48.2, 50, 47.3, 42.8, 45.1, 59.6, 49.1, 48.4, 42.6, 44.4, 44, 48.7, 42.7, 49.6, 45.3, 49.6, 50.5, 43.6, 45.5, 50.5, 44.9, 45.2, 46.6, 48.5, 45.1, 50.1, 46.5, 45, 43.8, 45.5, 43.2, 50.4, 45.3, 46.2, 45.7, 54.3, 45.8, 49.8, 46.2, 49.5, 43.5, 50.7, 47.7, 46.4, 48.2, 46.5, 46.4, 48.6, 47.5, 51.1, 45.2, 45.2, 49.1, 52.5, 47.4, 50, 44.9, 50.8, 43.4, 51.3, 47.5, 52.1, 47.5, 52.2, 45.5, 49.5, 44.5, 50.8, 49.4, 46.9, 48.4, 51.1, 48.5, 55.9, 47.2, 49.1, 47.3, 46.8, 41.7, 53.4, 43.3, 48.1, 50.5, 49.8, 43.5, 51.5, 46.2, 55.1, 44.5, 48.8, 47.2, null, 46.8, 50.4, 45.2, 49.9, 46.5, 50, 51.3, 45.4, 52.7, 45.2, 46.1, 51.3, 46, 51.3, 46.6, 51.7, 47, 52, 45.9, 50.5, 50.3, 58, 46.4, 49.2, 42.4, 48.5, 43.2, 50.6, 46.7, 52, 50.5, 49.5, 46.4, 52.8, 40.9, 54.2, 42.5, 51, 49.7, 47.5, 47.6, 52, 46.9, 53.5, 49, 46.2, 50.9, 45.5, 50.9, 50.8, 50.1, 49, 51.5, 49.8, 48.1, 51.4, 45.7, 50.7, 42.5, 52.2, 45.2, 49.3, 50.2, 45.6, 51.9, 46.8, 45.7, 55.8, 43.5, 49.6, 50.8, 50.2 ], "y": [ 18.7, 17.4, 18, null, 19.3, 20.6, 17.8, 19.6, 18.1, 20.2, 17.1, 17.3, 17.6, 21.2, 21.1, 17.8, 19, 20.7, 18.4, 21.5, 18.3, 18.7, 19.2, 18.1, 17.2, 18.9, 18.6, 17.9, 18.6, 18.9, 16.7, 18.1, 17.8, 18.9, 17, 21.1, 20, 18.5, 19.3, 19.1, 18, 18.4, 18.5, 19.7, 16.9, 18.8, 19, 18.9, 17.9, 21.2, 17.7, 18.9, 17.9, 19.5, 18.1, 18.6, 17.5, 18.8, 16.6, 19.1, 16.9, 21.1, 17, 18.2, 17.1, 18, 16.2, 19.1, 16.6, 19.4, 19, 18.4, 17.2, 18.9, 17.5, 18.5, 16.8, 19.4, 16.1, 19.1, 17.2, 17.6, 18.8, 19.4, 17.8, 20.3, 19.5, 18.6, 19.2, 18.8, 18, 18.1, 17.1, 18.1, 17.3, 18.9, 18.6, 18.5, 16.1, 18.5, 17.9, 20, 16, 20, 18.6, 18.9, 17.2, 20, 17, 19, 16.5, 20.3, 17.7, 19.5, 20.7, 18.3, 17, 20.5, 17, 18.6, 17.2, 19.8, 17, 18.5, 15.9, 19, 17.6, 18.3, 17.1, 18, 17.9, 19.2, 18.5, 18.5, 17.6, 17.5, 17.5, 20.1, 16.5, 17.9, 17.1, 17.2, 15.5, 17, 16.8, 18.7, 18.6, 18.4, 17.8, 18.1, 17.1, 18.5, 13.2, 16.3, 14.1, 15.2, 14.5, 13.5, 14.6, 15.3, 13.4, 15.4, 13.7, 16.1, 13.7, 14.6, 14.6, 15.7, 13.5, 15.2, 14.5, 15.1, 14.3, 14.5, 14.5, 15.8, 13.1, 15.1, 14.3, 15, 14.3, 15.3, 15.3, 14.2, 14.5, 17, 14.8, 16.3, 13.7, 17.3, 13.6, 15.7, 13.7, 16, 13.7, 15, 15.9, 13.9, 13.9, 15.9, 13.3, 15.8, 14.2, 14.1, 14.4, 15, 14.4, 15.4, 13.9, 15, 14.5, 15.3, 13.8, 14.9, 13.9, 15.7, 14.2, 16.8, 14.4, 16.2, 14.2, 15, 15, 15.6, 15.6, 14.8, 15, 16, 14.2, 16.3, 13.8, 16.4, 14.5, 15.6, 14.6, 15.9, 13.8, 17.3, 14.4, 14.2, 14, 17, 15, 17.1, 14.5, 16.1, 14.7, 15.7, 15.8, 14.6, 14.4, 16.5, 15, 17, 15.5, 15, 13.8, 16.1, 14.7, 15.8, 14, 15.1, 15.2, 15.9, 15.2, 16.3, 14.1, 16, 15.7, 16.2, 13.7, null, 14.3, 15.7, 14.8, 16.1, 17.9, 19.5, 19.2, 18.7, 19.8, 17.8, 18.2, 18.2, 18.9, 19.9, 17.8, 20.3, 17.3, 18.1, 17.1, 19.6, 20, 17.8, 18.6, 18.2, 17.3, 17.5, 16.6, 19.4, 17.9, 19, 18.4, 19, 17.8, 20, 16.6, 20.8, 16.7, 18.8, 18.6, 16.8, 18.3, 20.7, 16.6, 19.9, 19.5, 17.5, 19.1, 17, 17.9, 18.5, 17.9, 19.6, 18.7, 17.3, 16.4, 19, 17.3, 19.7, 17.3, 18.8, 16.6, 19.9, 18.8, 19.4, 19.5, 16.5, 17, 19.8, 18.1, 18.2, 19, 18.7 ], "z": [ 181, 186, 195, null, 193, 190, 181, 195, 193, 190, 186, 180, 182, 191, 198, 185, 195, 197, 184, 194, 174, 180, 189, 185, 180, 187, 183, 187, 172, 180, 178, 178, 188, 184, 195, 196, 190, 180, 181, 184, 182, 195, 186, 196, 185, 190, 182, 179, 190, 191, 186, 188, 190, 200, 187, 191, 186, 193, 181, 194, 185, 195, 185, 192, 184, 192, 195, 188, 190, 198, 190, 190, 196, 197, 190, 195, 191, 184, 187, 195, 189, 196, 187, 193, 191, 194, 190, 189, 189, 190, 202, 205, 185, 186, 187, 208, 190, 196, 178, 192, 192, 203, 183, 190, 193, 184, 199, 190, 181, 197, 198, 191, 193, 197, 191, 196, 188, 199, 189, 189, 187, 198, 176, 202, 186, 199, 191, 195, 191, 210, 190, 197, 193, 199, 187, 190, 191, 200, 185, 193, 193, 187, 188, 190, 192, 185, 190, 184, 195, 193, 187, 201, 211, 230, 210, 218, 215, 210, 211, 219, 209, 215, 214, 216, 214, 213, 210, 217, 210, 221, 209, 222, 218, 215, 213, 215, 215, 215, 216, 215, 210, 220, 222, 209, 207, 230, 220, 220, 213, 219, 208, 208, 208, 225, 210, 216, 222, 217, 210, 225, 213, 215, 210, 220, 210, 225, 217, 220, 208, 220, 208, 224, 208, 221, 214, 231, 219, 230, 214, 229, 220, 223, 216, 221, 221, 217, 216, 230, 209, 220, 215, 223, 212, 221, 212, 224, 212, 228, 218, 218, 212, 230, 218, 228, 212, 224, 214, 226, 216, 222, 203, 225, 219, 228, 215, 228, 216, 215, 210, 219, 208, 209, 216, 229, 213, 230, 217, 230, 217, 222, 214, null, 215, 222, 212, 213, 192, 196, 193, 188, 197, 198, 178, 197, 195, 198, 193, 194, 185, 201, 190, 201, 197, 181, 190, 195, 181, 191, 187, 193, 195, 197, 200, 200, 191, 205, 187, 201, 187, 203, 195, 199, 195, 210, 192, 205, 210, 187, 196, 196, 196, 201, 190, 212, 187, 198, 199, 201, 193, 203, 187, 197, 191, 203, 202, 194, 206, 189, 195, 207, 202, 193, 210, 198 ] }, { "color": "#636EFA", "opacity": 0.28, "type": "mesh3d", "x": [ 32.1, 32.1, 46, 46 ], "y": [ 15.5, 21.5, 15.5, 21.5 ], "z": [ 179.82248696100257, 191.2986838455497, 189.55862574328546, 201.0348226278326 ] }, { "color": "#EF553B", "opacity": 0.28, "type": "mesh3d", "x": [ 40.9, 40.9, 59.6, 59.6 ], "y": [ 13.1, 17.3, 13.1, 17.3 ], "z": [ 208.96074213553072, 216.9940799547137, 222.0590007850768, 230.09233860425977 ] }, { "color": "#00CC96", "opacity": 0.28, "type": "mesh3d", "x": [ 40.9, 40.9, 58, 58 ], "y": [ 16.4, 20.8, 16.4, 20.8 ], "z": [ 186.40157098670994, 194.81744870204452, 198.37912301383494, 206.79500072916952 ] } ], "layout": { "scene": { "xaxis": { "title": { "text": "bill_length_mm" } }, "yaxis": { "title": { "text": "bill_depth_mm" } }, "zaxis": { "title": { "text": "flipper_length_mm" } } }, "template": { "data": { "bar": [ { "error_x": { "color": "#2a3f5f" }, "error_y": { "color": "#2a3f5f" }, "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "bar" } ], "barpolar": [ { "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "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": { "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "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": [ { "fillpattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 }, "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 }, "autotypenumbers": "strict", "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 } } } } } }, "metadata": {}, "output_type": "display_data" } ], "source": [ "for sp in ['Adelie', 'Gentoo', 'Chinstrap']:\n", "\n", " prediction_plane = mk_plane(species = sp)\n", "\n", " fig = fig.add_trace(go.Mesh3d(\n", " x = prediction_plane['bill_length_mm'], \n", " y = prediction_plane['bill_depth_mm'], \n", " z = prediction_plane['flipper_length_mm'],\n", " color = color_mapping[sp],\n", " opacity = 0.28))\n", "\n", " # fig = fig.add_trace(go._____(\n", " # x = prediction_plane['bill_length_mm'], \n", " # y = prediction_plane['bill_depth_mm'], \n", " # z = prediction_plane['flipper_length_mm'],\n", " # color = color_mapping[sp],\n", " # opacity = 0.28))\n", "\n", "fig" ] } ], "metadata": { "jupytext": { "formats": "ipynb,py:light" }, "kernelspec": { "display_name": "Python 3 (ipykernel)", "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.11.9" }, "toc": { "base_numbering": 1, "nav_menu": {}, "number_sections": true, "sideBar": true, "skip_h1_title": false, "title_cell": "Table of Contents", "title_sidebar": "Contents", "toc_cell": false, "toc_position": {}, "toc_section_display": true, "toc_window_display": false } }, "nbformat": 4, "nbformat_minor": 5 }