{ "cells": [ { "cell_type": "markdown", "id": "vocal-mileage", "metadata": {}, "source": [ "# Interactive Data Graphics with Plotly\n", "\n", "In this lecture, we'll use the Plotly library to construct engaging interactive graphics using a high-level interface. We already worked with Plotly when we created attractive geographic data visualizations. In this lecture, we'll use Plotly to build out the rest of our standard data visualization tools. \n", "\n", "There are a number of plot types not shown here: check the [Plotly Express overview](https://plotly.com/python/plotly-express/) for many other interesting and useful plot types. \n", "\n", "For this lecture, we're going to take a break from the NOAA climate data set. You'll use Plotly to construct visualizations using this data in HW1. For now, we're going to use the #BestDataSet: Palmer Penguins! \n", "\n", "
\n", " \"\"\n", "
Artwork by @allison_horst
\n", "
\n", "\n", "First, let's retrieve and clean up the data a little. These are all standard pandas operations, so we're not going to spend much time here. " ] }, { "cell_type": "code", "execution_count": 2, "id": "developing-active", "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "url = \"https://raw.githubusercontent.com/PhilChodrow/PIC16B/master/datasets/palmer_penguins.csv\"\n", "penguins = pd.read_csv(url)\n", "penguins = penguins.dropna(subset = [\"Body Mass (g)\", \"Sex\"])\n", "penguins[\"Species\"] = penguins[\"Species\"].str.split().str.get(0)\n", "penguins = penguins[penguins[\"Sex\"] != \".\"]\n", "\n", "cols = [\"Species\", \"Island\", \"Sex\", \"Culmen Length (mm)\", \"Culmen Depth (mm)\", \"Flipper Length (mm)\", \"Body Mass (g)\"]\n", "penguins = penguins[cols]" ] }, { "cell_type": "markdown", "id": "running-technique", "metadata": {}, "source": [ "Let's take a look at the simplified data set: " ] }, { "cell_type": "code", "execution_count": 3, "id": "verified-foundation", "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", "
SpeciesIslandSexCulmen Length (mm)Culmen Depth (mm)Flipper Length (mm)Body Mass (g)
0AdelieTorgersenMALE39.118.7181.03750.0
1AdelieTorgersenFEMALE39.517.4186.03800.0
2AdelieTorgersenFEMALE40.318.0195.03250.0
4AdelieTorgersenFEMALE36.719.3193.03450.0
5AdelieTorgersenMALE39.320.6190.03650.0
\n", "
" ], "text/plain": [ " Species Island Sex Culmen Length (mm) Culmen Depth (mm) \\\n", "0 Adelie Torgersen MALE 39.1 18.7 \n", "1 Adelie Torgersen FEMALE 39.5 17.4 \n", "2 Adelie Torgersen FEMALE 40.3 18.0 \n", "4 Adelie Torgersen FEMALE 36.7 19.3 \n", "5 Adelie Torgersen MALE 39.3 20.6 \n", "\n", " Flipper Length (mm) Body Mass (g) \n", "0 181.0 3750.0 \n", "1 186.0 3800.0 \n", "2 195.0 3250.0 \n", "4 193.0 3450.0 \n", "5 190.0 3650.0 " ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "penguins.head()" ] }, { "cell_type": "markdown", "id": "surprising-welding", "metadata": {}, "source": [ "As you know from HW0, each row corresponds to an individual penguin. The penguin's species, island of encounter, and sex are recorded as qualitative variables. There are also measurements of the penguin's culmen (bill), as well as its flipper length and body mass. There are some additional columns which we're ignoring for today. " ] }, { "cell_type": "markdown", "id": "skilled-power", "metadata": {}, "source": [ "## Getting Started with Plotly \n", "\n", "Plotly includes a very large catalog of interesting plotting capabilities. We are only going to scratch the surface, using the Plotly Express module, which allows us to create several of the most important kinds of plots using convenient, high-level functions. \n", "\n", "Let's run an example before breaking it down. " ] }, { "cell_type": "code", "execution_count": 5, "id": "gorgeous-hello", "metadata": {}, "outputs": [ { "data": { "text/html": [ " \n", " " ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "hovertemplate": "Species=Adelie
Culmen Length (mm)=%{x}
Culmen 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, 36.7, 39.3, 38.9, 39.2, 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, 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, 19.3, 20.6, 17.8, 19.6, 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, 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": "Species=Chinstrap
Culmen Length (mm)=%{x}
Culmen Depth (mm)=%{y}", "legendgroup": "Chinstrap", "marker": { "color": "#EF553B", "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": "Species=Gentoo
Culmen Length (mm)=%{x}
Culmen Depth (mm)=%{y}", "legendgroup": "Gentoo", "marker": { "color": "#00cc96", "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, 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, 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, 46.8, 41.7, 53.4, 43.3, 48.1, 50.5, 49.8, 43.5, 51.5, 46.2, 55.1, 48.8, 47.2, 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, 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, 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, 16.1, 14.7, 15.8, 14, 15.1, 15.2, 15.9, 15.2, 16.3, 14.1, 16, 16.2, 13.7, 14.3, 15.7, 14.8, 16.1 ], "yaxis": "y" } ], "layout": { "height": 300, "legend": { "title": { "text": "Species" }, "tracegroupgap": 0 }, "margin": { "b": 0, "l": 0, "r": 0, "t": 0 }, "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": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter" } ], "scatter3d": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter3d" } ], "scattercarpet": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattercarpet" } ], "scattergeo": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergeo" } ], "scattergl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergl" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#EBF0F8" }, "line": { "color": "white" } }, "header": { "fill": { "color": "#C8D4E3" }, "line": { "color": "white" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#2a3f5f", "arrowhead": 0, "arrowwidth": 1 }, "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 } } }, "width": 500, "xaxis": { "anchor": "y", "domain": [ 0, 1 ], "title": { "text": "Culmen Length (mm)" } }, "yaxis": { "anchor": "x", "domain": [ 0, 1 ], "title": { "text": "Culmen Depth (mm)" } } } }, "text/html": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "from plotly import express as px\n", "\n", "fig = px.scatter(data_frame = penguins, \n", " x = \"Culmen Length (mm)\", \n", " y = \"Culmen Depth (mm)\",\n", " color = \"Species\",\n", " width = 500,\n", " height = 300)\n", "\n", "# reduce whitespace\n", "fig.update_layout(margin={\"r\":0,\"t\":0,\"l\":0,\"b\":0})\n", "# show the plot\n", "fig.show()" ] }, { "cell_type": "markdown", "id": "artificial-steal", "metadata": {}, "source": [ "Let's break this down a bit. \n", "\n", "```python\n", "fig = px.scatter(data_frame = penguins, # data set\n", " x = \"Culmen Length (mm)\", # column for x axis\n", " y = \"Culmen Depth (mm)\", # column for y axis\n", " color = \"Species\", # column for dot color\n", " width = 500, # width of figure\n", " height = 300) # height of figure\n", "```\n", "\n", "Recall that our standard syntax from Matplotlib usually requires us to pass `x` and `y` as *arrays* or *lists*. Here, we do something different: we start by specifying a *data frame*. Then, `x`, `y`, and several other arguments that we'll see in a moment are interpreted as *columns* of the supplied data frame. So, a call like \n", "\n", "```python\n", "fig = px.scatter(data_frame = penguins, \n", " x = \"Culmen Length (mm)\", \n", " y = \"Culmen Depth (mm)\") \n", "```\n", "\n", "is somewhat similar to \n", "\n", "```python\n", "ax.scatter(penguins[\"Culmen Length (mm)\"], \n", " penguins[\"Culmen Depth (mm)\"])\n", "```\n", "\n", "using familiar Matplotlib tools. We'll see that the Plotly approach makes it much easier to construct complex data graphics in situations in which our data is in the form of a data frame. \n", "\n", "*Side note*: the syntax of Plotly Express is similar to that of the [Seaborn package](https://seaborn.pydata.org/), which is a non-interactive library for constructing complex graphics from data frames. \n", "\n", "Let's fancy up our plot a little: " ] }, { "cell_type": "code", "execution_count": 6, "id": "laden-prototype", "metadata": {}, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "customdata": [ [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ] ], "hovertemplate": "%{hovertext}

Species=Adelie
Culmen Length (mm)=%{x}
Culmen Depth (mm)=%{y}
Body Mass (g)=%{marker.size}
Island=%{customdata[0]}
Sex=%{customdata[1]}", "hovertext": [ "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" ], "legendgroup": "Adelie", "marker": { "color": "#636efa", "opacity": 0.5, "size": [ 3750, 3800, 3250, 3450, 3650, 3625, 4675, 3200, 3800, 4400, 3700, 3450, 4500, 3325, 4200, 3400, 3600, 3800, 3950, 3800, 3800, 3550, 3200, 3150, 3950, 3250, 3900, 3300, 3900, 3325, 4150, 3950, 3550, 3300, 4650, 3150, 3900, 3100, 4400, 3000, 4600, 3425, 3450, 4150, 3500, 4300, 3450, 4050, 2900, 3700, 3550, 3800, 2850, 3750, 3150, 4400, 3600, 4050, 2850, 3950, 3350, 4100, 3050, 4450, 3600, 3900, 3550, 4150, 3700, 4250, 3700, 3900, 3550, 4000, 3200, 4700, 3800, 4200, 3350, 3550, 3800, 3500, 3950, 3600, 3550, 4300, 3400, 4450, 3300, 4300, 3700, 4350, 2900, 4100, 3725, 4725, 3075, 4250, 2925, 3550, 3750, 3900, 3175, 4775, 3825, 4600, 3200, 4275, 3900, 4075, 2900, 3775, 3350, 3325, 3150, 3500, 3450, 3875, 3050, 4000, 3275, 4300, 3050, 4000, 3325, 3500, 3500, 4475, 3425, 3900, 3175, 3975, 3400, 4250, 3400, 3475, 3050, 3725, 3000, 3650, 4250, 3475, 3450, 3750, 3700, 4000 ], "sizemode": "area", "sizeref": 98.4375, "symbol": "circle" }, "mode": "markers", "name": "Adelie", "orientation": "v", "showlegend": true, "type": "scatter", "x": [ 39.1, 39.5, 40.3, 36.7, 39.3, 38.9, 39.2, 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, 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, 19.3, 20.6, 17.8, 19.6, 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, 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" }, { "customdata": [ [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ] ], "hovertemplate": "%{hovertext}

Species=Chinstrap
Culmen Length (mm)=%{x}
Culmen Depth (mm)=%{y}
Body Mass (g)=%{marker.size}
Island=%{customdata[0]}
Sex=%{customdata[1]}", "hovertext": [ "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" ], "legendgroup": "Chinstrap", "marker": { "color": "#EF553B", "opacity": 0.5, "size": [ 3500, 3900, 3650, 3525, 3725, 3950, 3250, 3750, 4150, 3700, 3800, 3775, 3700, 4050, 3575, 4050, 3300, 3700, 3450, 4400, 3600, 3400, 2900, 3800, 3300, 4150, 3400, 3800, 3700, 4550, 3200, 4300, 3350, 4100, 3600, 3900, 3850, 4800, 2700, 4500, 3950, 3650, 3550, 3500, 3675, 4450, 3400, 4300, 3250, 3675, 3325, 3950, 3600, 4050, 3350, 3450, 3250, 4050, 3800, 3525, 3950, 3650, 3650, 4000, 3400, 3775, 4100, 3775 ], "sizemode": "area", "sizeref": 98.4375, "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" }, { "customdata": [ [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ] ], "hovertemplate": "%{hovertext}

Species=Gentoo
Culmen Length (mm)=%{x}
Culmen Depth (mm)=%{y}
Body Mass (g)=%{marker.size}
Island=%{customdata[0]}
Sex=%{customdata[1]}", "hovertext": [ "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" ], "legendgroup": "Gentoo", "marker": { "color": "#00cc96", "opacity": 0.5, "size": [ 4500, 5700, 4450, 5700, 5400, 4550, 4800, 5200, 4400, 5150, 4650, 5550, 4650, 5850, 4200, 5850, 4150, 6300, 4800, 5350, 5700, 5000, 4400, 5050, 5000, 5100, 5650, 4600, 5550, 5250, 4700, 5050, 6050, 5150, 5400, 4950, 5250, 4350, 5350, 3950, 5700, 4300, 4750, 5550, 4900, 4200, 5400, 5100, 5300, 4850, 5300, 4400, 5000, 4900, 5050, 4300, 5000, 4450, 5550, 4200, 5300, 4400, 5650, 4700, 5700, 5800, 4700, 5550, 4750, 5000, 5100, 5200, 4700, 5800, 4600, 6000, 4750, 5950, 4625, 5450, 4725, 5350, 4750, 5600, 4600, 5300, 4875, 5550, 4950, 5400, 4750, 5650, 4850, 5200, 4925, 4875, 4625, 5250, 4850, 5600, 4975, 5500, 5500, 4700, 5500, 4575, 5500, 5000, 5950, 4650, 5500, 4375, 5850, 6000, 4925, 4850, 5750, 5200, 5400 ], "sizemode": "area", "sizeref": 98.4375, "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, 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, 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, 46.8, 41.7, 53.4, 43.3, 48.1, 50.5, 49.8, 43.5, 51.5, 46.2, 55.1, 48.8, 47.2, 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, 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, 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, 16.1, 14.7, 15.8, 14, 15.1, 15.2, 15.9, 15.2, 16.3, 14.1, 16, 16.2, 13.7, 14.3, 15.7, 14.8, 16.1 ], "yaxis": "y" } ], "layout": { "height": 300, "legend": { "itemsizing": "constant", "title": { "text": "Species" }, "tracegroupgap": 0 }, "margin": { "b": 0, "l": 0, "r": 0, "t": 0 }, "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": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter" } ], "scatter3d": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter3d" } ], "scattercarpet": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattercarpet" } ], "scattergeo": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergeo" } ], "scattergl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergl" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#EBF0F8" }, "line": { "color": "white" } }, "header": { "fill": { "color": "#C8D4E3" }, "line": { "color": "white" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#2a3f5f", "arrowhead": 0, "arrowwidth": 1 }, "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 } } }, "width": 500, "xaxis": { "anchor": "y", "domain": [ 0, 1 ], "title": { "text": "Culmen Length (mm)" } }, "yaxis": { "anchor": "x", "domain": [ 0, 1 ], "title": { "text": "Culmen Depth (mm)" } } } }, "text/html": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "fig = px.scatter(data_frame = penguins, \n", " x = \"Culmen Length (mm)\", \n", " y = \"Culmen Depth (mm)\",\n", " color = \"Species\",\n", " hover_name = \"Species\",\n", " hover_data = [\"Island\", \"Sex\"],\n", " size = \"Body Mass (g)\",\n", " size_max = 8,\n", " width = 500,\n", " height = 300,\n", " opacity = 0.5)\n", "\n", "# reduce whitespace\n", "fig.update_layout(margin={\"r\":0,\"t\":0,\"l\":0,\"b\":0})\n", "# show the plot\n", "fig.show()" ] }, { "cell_type": "markdown", "id": "assumed-pittsburgh", "metadata": {}, "source": [ "There are nice marginal plots for the statistically-inclined: " ] }, { "cell_type": "code", "execution_count": 7, "id": "miniature-africa", "metadata": {}, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "customdata": [ [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ] ], "hovertemplate": "%{hovertext}

Species=Adelie
Culmen Length (mm)=%{x}
Culmen Depth (mm)=%{y}
Body Mass (g)=%{marker.size}
Island=%{customdata[0]}
Sex=%{customdata[1]}", "hovertext": [ "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" ], "legendgroup": "Adelie", "marker": { "color": "#636efa", "opacity": 0.5, "size": [ 3750, 3800, 3250, 3450, 3650, 3625, 4675, 3200, 3800, 4400, 3700, 3450, 4500, 3325, 4200, 3400, 3600, 3800, 3950, 3800, 3800, 3550, 3200, 3150, 3950, 3250, 3900, 3300, 3900, 3325, 4150, 3950, 3550, 3300, 4650, 3150, 3900, 3100, 4400, 3000, 4600, 3425, 3450, 4150, 3500, 4300, 3450, 4050, 2900, 3700, 3550, 3800, 2850, 3750, 3150, 4400, 3600, 4050, 2850, 3950, 3350, 4100, 3050, 4450, 3600, 3900, 3550, 4150, 3700, 4250, 3700, 3900, 3550, 4000, 3200, 4700, 3800, 4200, 3350, 3550, 3800, 3500, 3950, 3600, 3550, 4300, 3400, 4450, 3300, 4300, 3700, 4350, 2900, 4100, 3725, 4725, 3075, 4250, 2925, 3550, 3750, 3900, 3175, 4775, 3825, 4600, 3200, 4275, 3900, 4075, 2900, 3775, 3350, 3325, 3150, 3500, 3450, 3875, 3050, 4000, 3275, 4300, 3050, 4000, 3325, 3500, 3500, 4475, 3425, 3900, 3175, 3975, 3400, 4250, 3400, 3475, 3050, 3725, 3000, 3650, 4250, 3475, 3450, 3750, 3700, 4000 ], "sizemode": "area", "sizeref": 98.4375, "symbol": "circle" }, "mode": "markers", "name": "Adelie", "orientation": "v", "showlegend": true, "type": "scatter", "x": [ 39.1, 39.5, 40.3, 36.7, 39.3, 38.9, 39.2, 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, 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, 19.3, 20.6, 17.8, 19.6, 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, 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" }, { "alignmentgroup": "True", "boxpoints": "all", "customdata": [ [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ] ], "fillcolor": "rgba(255,255,255,0)", "hoveron": "points", "hovertemplate": "%{hovertext}

Species=Adelie
Culmen Length (mm)=%{x}
Island=%{customdata[0]}
Sex=%{customdata[1]}", "hovertext": [ "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" ], "jitter": 0, "legendgroup": "Adelie", "line": { "color": "rgba(255,255,255,0)" }, "marker": { "color": "#636efa", "symbol": "line-ns-open" }, "name": "Adelie", "offsetgroup": "Adelie", "showlegend": false, "type": "box", "x": [ 39.1, 39.5, 40.3, 36.7, 39.3, 38.9, 39.2, 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, 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": "x3", "yaxis": "y3" }, { "alignmentgroup": "True", "customdata": [ [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ] ], "hovertemplate": "%{hovertext}

Species=Adelie
Culmen Depth (mm)=%{y}
Island=%{customdata[0]}
Sex=%{customdata[1]}", "hovertext": [ "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" ], "legendgroup": "Adelie", "marker": { "color": "#636efa", "symbol": "circle" }, "name": "Adelie", "notched": true, "offsetgroup": "Adelie", "showlegend": false, "type": "box", "xaxis": "x2", "y": [ 18.7, 17.4, 18, 19.3, 20.6, 17.8, 19.6, 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, 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": "y2" }, { "customdata": [ [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ] ], "hovertemplate": "%{hovertext}

Species=Chinstrap
Culmen Length (mm)=%{x}
Culmen Depth (mm)=%{y}
Body Mass (g)=%{marker.size}
Island=%{customdata[0]}
Sex=%{customdata[1]}", "hovertext": [ "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" ], "legendgroup": "Chinstrap", "marker": { "color": "#EF553B", "opacity": 0.5, "size": [ 3500, 3900, 3650, 3525, 3725, 3950, 3250, 3750, 4150, 3700, 3800, 3775, 3700, 4050, 3575, 4050, 3300, 3700, 3450, 4400, 3600, 3400, 2900, 3800, 3300, 4150, 3400, 3800, 3700, 4550, 3200, 4300, 3350, 4100, 3600, 3900, 3850, 4800, 2700, 4500, 3950, 3650, 3550, 3500, 3675, 4450, 3400, 4300, 3250, 3675, 3325, 3950, 3600, 4050, 3350, 3450, 3250, 4050, 3800, 3525, 3950, 3650, 3650, 4000, 3400, 3775, 4100, 3775 ], "sizemode": "area", "sizeref": 98.4375, "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" }, { "alignmentgroup": "True", "boxpoints": "all", "customdata": [ [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ] ], "fillcolor": "rgba(255,255,255,0)", "hoveron": "points", "hovertemplate": "%{hovertext}

Species=Chinstrap
Culmen Length (mm)=%{x}
Island=%{customdata[0]}
Sex=%{customdata[1]}", "hovertext": [ "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" ], "jitter": 0, "legendgroup": "Chinstrap", "line": { "color": "rgba(255,255,255,0)" }, "marker": { "color": "#EF553B", "symbol": "line-ns-open" }, "name": "Chinstrap", "offsetgroup": "Chinstrap", "showlegend": false, "type": "box", "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": "x3", "yaxis": "y3" }, { "alignmentgroup": "True", "customdata": [ [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ] ], "hovertemplate": "%{hovertext}

Species=Chinstrap
Culmen Depth (mm)=%{y}
Island=%{customdata[0]}
Sex=%{customdata[1]}", "hovertext": [ "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" ], "legendgroup": "Chinstrap", "marker": { "color": "#EF553B", "symbol": "circle" }, "name": "Chinstrap", "notched": true, "offsetgroup": "Chinstrap", "showlegend": false, "type": "box", "xaxis": "x2", "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": "y2" }, { "customdata": [ [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ] ], "hovertemplate": "%{hovertext}

Species=Gentoo
Culmen Length (mm)=%{x}
Culmen Depth (mm)=%{y}
Body Mass (g)=%{marker.size}
Island=%{customdata[0]}
Sex=%{customdata[1]}", "hovertext": [ "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" ], "legendgroup": "Gentoo", "marker": { "color": "#00cc96", "opacity": 0.5, "size": [ 4500, 5700, 4450, 5700, 5400, 4550, 4800, 5200, 4400, 5150, 4650, 5550, 4650, 5850, 4200, 5850, 4150, 6300, 4800, 5350, 5700, 5000, 4400, 5050, 5000, 5100, 5650, 4600, 5550, 5250, 4700, 5050, 6050, 5150, 5400, 4950, 5250, 4350, 5350, 3950, 5700, 4300, 4750, 5550, 4900, 4200, 5400, 5100, 5300, 4850, 5300, 4400, 5000, 4900, 5050, 4300, 5000, 4450, 5550, 4200, 5300, 4400, 5650, 4700, 5700, 5800, 4700, 5550, 4750, 5000, 5100, 5200, 4700, 5800, 4600, 6000, 4750, 5950, 4625, 5450, 4725, 5350, 4750, 5600, 4600, 5300, 4875, 5550, 4950, 5400, 4750, 5650, 4850, 5200, 4925, 4875, 4625, 5250, 4850, 5600, 4975, 5500, 5500, 4700, 5500, 4575, 5500, 5000, 5950, 4650, 5500, 4375, 5850, 6000, 4925, 4850, 5750, 5200, 5400 ], "sizemode": "area", "sizeref": 98.4375, "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, 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, 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, 46.8, 41.7, 53.4, 43.3, 48.1, 50.5, 49.8, 43.5, 51.5, 46.2, 55.1, 48.8, 47.2, 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, 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, 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, 16.1, 14.7, 15.8, 14, 15.1, 15.2, 15.9, 15.2, 16.3, 14.1, 16, 16.2, 13.7, 14.3, 15.7, 14.8, 16.1 ], "yaxis": "y" }, { "alignmentgroup": "True", "boxpoints": "all", "customdata": [ [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ] ], "fillcolor": "rgba(255,255,255,0)", "hoveron": "points", "hovertemplate": "%{hovertext}

Species=Gentoo
Culmen Length (mm)=%{x}
Island=%{customdata[0]}
Sex=%{customdata[1]}", "hovertext": [ "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" ], "jitter": 0, "legendgroup": "Gentoo", "line": { "color": "rgba(255,255,255,0)" }, "marker": { "color": "#00cc96", "symbol": "line-ns-open" }, "name": "Gentoo", "offsetgroup": "Gentoo", "showlegend": false, "type": "box", "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, 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, 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, 46.8, 41.7, 53.4, 43.3, 48.1, 50.5, 49.8, 43.5, 51.5, 46.2, 55.1, 48.8, 47.2, 46.8, 50.4, 45.2, 49.9 ], "xaxis": "x3", "yaxis": "y3" }, { "alignmentgroup": "True", "customdata": [ [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ] ], "hovertemplate": "%{hovertext}

Species=Gentoo
Culmen Depth (mm)=%{y}
Island=%{customdata[0]}
Sex=%{customdata[1]}", "hovertext": [ "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" ], "legendgroup": "Gentoo", "marker": { "color": "#00cc96", "symbol": "circle" }, "name": "Gentoo", "notched": true, "offsetgroup": "Gentoo", "showlegend": false, "type": "box", "xaxis": "x2", "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, 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, 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, 16.1, 14.7, 15.8, 14, 15.1, 15.2, 15.9, 15.2, 16.3, 14.1, 16, 16.2, 13.7, 14.3, 15.7, 14.8, 16.1 ], "yaxis": "y2" } ], "layout": { "height": 400, "legend": { "itemsizing": "constant", "title": { "text": "Species" }, "tracegroupgap": 0 }, "margin": { "b": 0, "l": 0, "r": 0, "t": 0 }, "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": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter" } ], "scatter3d": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter3d" } ], "scattercarpet": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattercarpet" } ], "scattergeo": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergeo" } ], "scattergl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergl" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#EBF0F8" }, "line": { "color": "white" } }, "header": { "fill": { "color": "#C8D4E3" }, "line": { "color": "white" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#2a3f5f", "arrowhead": 0, "arrowwidth": 1 }, "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 } } }, "width": 600, "xaxis": { "anchor": "y", "domain": [ 0, 0.7363 ], "title": { "text": "Culmen Length (mm)" } }, "xaxis2": { "anchor": "y2", "domain": [ 0.7413, 1 ], "matches": "x2", "showgrid": false, "showline": false, "showticklabels": false, "ticks": "" }, "xaxis3": { "anchor": "y3", "domain": [ 0, 0.7363 ], "matches": "x", "showgrid": true, "showticklabels": false }, "xaxis4": { "anchor": "y4", "domain": [ 0.7413, 1 ], "matches": "x2", "showgrid": false, "showline": false, "showticklabels": false, "ticks": "" }, "yaxis": { "anchor": "x", "domain": [ 0, 0.7326 ], "title": { "text": "Culmen Depth (mm)" } }, "yaxis2": { "anchor": "x2", "domain": [ 0, 0.7326 ], "matches": "y", "showgrid": true, "showticklabels": false }, "yaxis3": { "anchor": "x3", "domain": [ 0.7426, 1 ], "matches": "y3", "showgrid": false, "showline": false, "showticklabels": false, "ticks": "" }, "yaxis4": { "anchor": "x4", "domain": [ 0.7426, 1 ], "matches": "y3", "showgrid": true, "showline": false, "showticklabels": false, "ticks": "" } } }, "text/html": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "fig = px.scatter(data_frame = penguins, \n", " x = \"Culmen Length (mm)\", \n", " y = \"Culmen Depth (mm)\",\n", " color = \"Species\",\n", " hover_name = \"Species\",\n", " hover_data = [\"Island\", \"Sex\"],\n", " size = \"Body Mass (g)\",\n", " size_max = 8,\n", " width = 600,\n", " height = 400,\n", " opacity = 0.5,\n", " marginal_y = \"box\",\n", " marginal_x = \"rug\")\n", "\n", "# reduce whitespace\n", "fig.update_layout(margin={\"r\":0,\"t\":0,\"l\":0,\"b\":0})\n", "# show the plot\n", "fig.show()" ] }, { "cell_type": "markdown", "id": "solid-renewal", "metadata": {}, "source": [ "Personally I dislike the gray background. It's possible to exercise fine-grained control over the plot appearance, but an easier way is through themes: " ] }, { "cell_type": "code", "execution_count": 8, "id": "indie-immigration", "metadata": {}, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "customdata": [ [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ] ], "hovertemplate": "%{hovertext}

Species=Adelie
Culmen Length (mm)=%{x}
Culmen Depth (mm)=%{y}
Body Mass (g)=%{marker.size}
Island=%{customdata[0]}
Sex=%{customdata[1]}", "hovertext": [ "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" ], "legendgroup": "Adelie", "marker": { "color": "#636efa", "opacity": 0.5, "size": [ 3750, 3800, 3250, 3450, 3650, 3625, 4675, 3200, 3800, 4400, 3700, 3450, 4500, 3325, 4200, 3400, 3600, 3800, 3950, 3800, 3800, 3550, 3200, 3150, 3950, 3250, 3900, 3300, 3900, 3325, 4150, 3950, 3550, 3300, 4650, 3150, 3900, 3100, 4400, 3000, 4600, 3425, 3450, 4150, 3500, 4300, 3450, 4050, 2900, 3700, 3550, 3800, 2850, 3750, 3150, 4400, 3600, 4050, 2850, 3950, 3350, 4100, 3050, 4450, 3600, 3900, 3550, 4150, 3700, 4250, 3700, 3900, 3550, 4000, 3200, 4700, 3800, 4200, 3350, 3550, 3800, 3500, 3950, 3600, 3550, 4300, 3400, 4450, 3300, 4300, 3700, 4350, 2900, 4100, 3725, 4725, 3075, 4250, 2925, 3550, 3750, 3900, 3175, 4775, 3825, 4600, 3200, 4275, 3900, 4075, 2900, 3775, 3350, 3325, 3150, 3500, 3450, 3875, 3050, 4000, 3275, 4300, 3050, 4000, 3325, 3500, 3500, 4475, 3425, 3900, 3175, 3975, 3400, 4250, 3400, 3475, 3050, 3725, 3000, 3650, 4250, 3475, 3450, 3750, 3700, 4000 ], "sizemode": "area", "sizeref": 98.4375, "symbol": "circle" }, "mode": "markers", "name": "Adelie", "orientation": "v", "showlegend": true, "type": "scatter", "x": [ 39.1, 39.5, 40.3, 36.7, 39.3, 38.9, 39.2, 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, 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, 19.3, 20.6, 17.8, 19.6, 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, 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" }, { "alignmentgroup": "True", "boxpoints": "all", "customdata": [ [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ] ], "fillcolor": "rgba(255,255,255,0)", "hoveron": "points", "hovertemplate": "%{hovertext}

Species=Adelie
Culmen Length (mm)=%{x}
Island=%{customdata[0]}
Sex=%{customdata[1]}", "hovertext": [ "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" ], "jitter": 0, "legendgroup": "Adelie", "line": { "color": "rgba(255,255,255,0)" }, "marker": { "color": "#636efa", "symbol": "line-ns-open" }, "name": "Adelie", "offsetgroup": "Adelie", "showlegend": false, "type": "box", "x": [ 39.1, 39.5, 40.3, 36.7, 39.3, 38.9, 39.2, 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, 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": "x3", "yaxis": "y3" }, { "alignmentgroup": "True", "customdata": [ [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Torgersen", "FEMALE" ], [ "Torgersen", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ] ], "hovertemplate": "%{hovertext}

Species=Adelie
Culmen Depth (mm)=%{y}
Island=%{customdata[0]}
Sex=%{customdata[1]}", "hovertext": [ "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" ], "legendgroup": "Adelie", "marker": { "color": "#636efa", "symbol": "circle" }, "name": "Adelie", "notched": true, "offsetgroup": "Adelie", "showlegend": false, "type": "box", "xaxis": "x2", "y": [ 18.7, 17.4, 18, 19.3, 20.6, 17.8, 19.6, 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, 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": "y2" }, { "customdata": [ [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ] ], "hovertemplate": "%{hovertext}

Species=Chinstrap
Culmen Length (mm)=%{x}
Culmen Depth (mm)=%{y}
Body Mass (g)=%{marker.size}
Island=%{customdata[0]}
Sex=%{customdata[1]}", "hovertext": [ "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" ], "legendgroup": "Chinstrap", "marker": { "color": "#EF553B", "opacity": 0.5, "size": [ 3500, 3900, 3650, 3525, 3725, 3950, 3250, 3750, 4150, 3700, 3800, 3775, 3700, 4050, 3575, 4050, 3300, 3700, 3450, 4400, 3600, 3400, 2900, 3800, 3300, 4150, 3400, 3800, 3700, 4550, 3200, 4300, 3350, 4100, 3600, 3900, 3850, 4800, 2700, 4500, 3950, 3650, 3550, 3500, 3675, 4450, 3400, 4300, 3250, 3675, 3325, 3950, 3600, 4050, 3350, 3450, 3250, 4050, 3800, 3525, 3950, 3650, 3650, 4000, 3400, 3775, 4100, 3775 ], "sizemode": "area", "sizeref": 98.4375, "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" }, { "alignmentgroup": "True", "boxpoints": "all", "customdata": [ [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ] ], "fillcolor": "rgba(255,255,255,0)", "hoveron": "points", "hovertemplate": "%{hovertext}

Species=Chinstrap
Culmen Length (mm)=%{x}
Island=%{customdata[0]}
Sex=%{customdata[1]}", "hovertext": [ "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" ], "jitter": 0, "legendgroup": "Chinstrap", "line": { "color": "rgba(255,255,255,0)" }, "marker": { "color": "#EF553B", "symbol": "line-ns-open" }, "name": "Chinstrap", "offsetgroup": "Chinstrap", "showlegend": false, "type": "box", "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": "x3", "yaxis": "y3" }, { "alignmentgroup": "True", "customdata": [ [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ], [ "Dream", "MALE" ], [ "Dream", "MALE" ], [ "Dream", "FEMALE" ] ], "hovertemplate": "%{hovertext}

Species=Chinstrap
Culmen Depth (mm)=%{y}
Island=%{customdata[0]}
Sex=%{customdata[1]}", "hovertext": [ "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" ], "legendgroup": "Chinstrap", "marker": { "color": "#EF553B", "symbol": "circle" }, "name": "Chinstrap", "notched": true, "offsetgroup": "Chinstrap", "showlegend": false, "type": "box", "xaxis": "x2", "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": "y2" }, { "customdata": [ [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ] ], "hovertemplate": "%{hovertext}

Species=Gentoo
Culmen Length (mm)=%{x}
Culmen Depth (mm)=%{y}
Body Mass (g)=%{marker.size}
Island=%{customdata[0]}
Sex=%{customdata[1]}", "hovertext": [ "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" ], "legendgroup": "Gentoo", "marker": { "color": "#00cc96", "opacity": 0.5, "size": [ 4500, 5700, 4450, 5700, 5400, 4550, 4800, 5200, 4400, 5150, 4650, 5550, 4650, 5850, 4200, 5850, 4150, 6300, 4800, 5350, 5700, 5000, 4400, 5050, 5000, 5100, 5650, 4600, 5550, 5250, 4700, 5050, 6050, 5150, 5400, 4950, 5250, 4350, 5350, 3950, 5700, 4300, 4750, 5550, 4900, 4200, 5400, 5100, 5300, 4850, 5300, 4400, 5000, 4900, 5050, 4300, 5000, 4450, 5550, 4200, 5300, 4400, 5650, 4700, 5700, 5800, 4700, 5550, 4750, 5000, 5100, 5200, 4700, 5800, 4600, 6000, 4750, 5950, 4625, 5450, 4725, 5350, 4750, 5600, 4600, 5300, 4875, 5550, 4950, 5400, 4750, 5650, 4850, 5200, 4925, 4875, 4625, 5250, 4850, 5600, 4975, 5500, 5500, 4700, 5500, 4575, 5500, 5000, 5950, 4650, 5500, 4375, 5850, 6000, 4925, 4850, 5750, 5200, 5400 ], "sizemode": "area", "sizeref": 98.4375, "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, 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, 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, 46.8, 41.7, 53.4, 43.3, 48.1, 50.5, 49.8, 43.5, 51.5, 46.2, 55.1, 48.8, 47.2, 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, 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, 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, 16.1, 14.7, 15.8, 14, 15.1, 15.2, 15.9, 15.2, 16.3, 14.1, 16, 16.2, 13.7, 14.3, 15.7, 14.8, 16.1 ], "yaxis": "y" }, { "alignmentgroup": "True", "boxpoints": "all", "customdata": [ [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ] ], "fillcolor": "rgba(255,255,255,0)", "hoveron": "points", "hovertemplate": "%{hovertext}

Species=Gentoo
Culmen Length (mm)=%{x}
Island=%{customdata[0]}
Sex=%{customdata[1]}", "hovertext": [ "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" ], "jitter": 0, "legendgroup": "Gentoo", "line": { "color": "rgba(255,255,255,0)" }, "marker": { "color": "#00cc96", "symbol": "line-ns-open" }, "name": "Gentoo", "offsetgroup": "Gentoo", "showlegend": false, "type": "box", "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, 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, 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, 46.8, 41.7, 53.4, 43.3, 48.1, 50.5, 49.8, 43.5, 51.5, 46.2, 55.1, 48.8, 47.2, 46.8, 50.4, 45.2, 49.9 ], "xaxis": "x3", "yaxis": "y3" }, { "alignmentgroup": "True", "customdata": [ [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ], [ "Biscoe", "FEMALE" ], [ "Biscoe", "MALE" ] ], "hovertemplate": "%{hovertext}

Species=Gentoo
Culmen Depth (mm)=%{y}
Island=%{customdata[0]}
Sex=%{customdata[1]}", "hovertext": [ "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" ], "legendgroup": "Gentoo", "marker": { "color": "#00cc96", "symbol": "circle" }, "name": "Gentoo", "notched": true, "offsetgroup": "Gentoo", "showlegend": false, "type": "box", "xaxis": "x2", "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, 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, 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, 16.1, 14.7, 15.8, 14, 15.1, 15.2, 15.9, 15.2, 16.3, 14.1, 16, 16.2, 13.7, 14.3, 15.7, 14.8, 16.1 ], "yaxis": "y2" } ], "layout": { "height": 400, "legend": { "itemsizing": "constant", "title": { "text": "Species" }, "tracegroupgap": 0 }, "margin": { "b": 0, "l": 0, "r": 0, "t": 0 }, "template": { "data": { "bar": [ { "error_x": { "color": "#2a3f5f" }, "error_y": { "color": "#2a3f5f" }, "marker": { "line": { "color": "white", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "bar" } ], "barpolar": [ { "marker": { "line": { "color": "white", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "barpolar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#2a3f5f", "gridcolor": "#C8D4E3", "linecolor": "#C8D4E3", "minorgridcolor": "#C8D4E3", "startlinecolor": "#2a3f5f" }, "baxis": { "endlinecolor": "#2a3f5f", "gridcolor": "#C8D4E3", "linecolor": "#C8D4E3", "minorgridcolor": "#C8D4E3", "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": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter" } ], "scatter3d": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter3d" } ], "scattercarpet": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattercarpet" } ], "scattergeo": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergeo" } ], "scattergl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergl" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#EBF0F8" }, "line": { "color": "white" } }, "header": { "fill": { "color": "#C8D4E3" }, "line": { "color": "white" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#2a3f5f", "arrowhead": 0, "arrowwidth": 1 }, "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": "white", "showlakes": true, "showland": true, "subunitcolor": "#C8D4E3" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "light" }, "paper_bgcolor": "white", "plot_bgcolor": "white", "polar": { "angularaxis": { "gridcolor": "#EBF0F8", "linecolor": "#EBF0F8", "ticks": "" }, "bgcolor": "white", "radialaxis": { "gridcolor": "#EBF0F8", "linecolor": "#EBF0F8", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "white", "gridcolor": "#DFE8F3", "gridwidth": 2, "linecolor": "#EBF0F8", "showbackground": true, "ticks": "", "zerolinecolor": "#EBF0F8" }, "yaxis": { "backgroundcolor": "white", "gridcolor": "#DFE8F3", "gridwidth": 2, "linecolor": "#EBF0F8", "showbackground": true, "ticks": "", "zerolinecolor": "#EBF0F8" }, "zaxis": { "backgroundcolor": "white", "gridcolor": "#DFE8F3", "gridwidth": 2, "linecolor": "#EBF0F8", "showbackground": true, "ticks": "", "zerolinecolor": "#EBF0F8" } }, "shapedefaults": { "line": { "color": "#2a3f5f" } }, "ternary": { "aaxis": { "gridcolor": "#DFE8F3", "linecolor": "#A2B1C6", "ticks": "" }, "baxis": { "gridcolor": "#DFE8F3", "linecolor": "#A2B1C6", "ticks": "" }, "bgcolor": "white", "caxis": { "gridcolor": "#DFE8F3", "linecolor": "#A2B1C6", "ticks": "" } }, "title": { "x": 0.05 }, "xaxis": { "automargin": true, "gridcolor": "#EBF0F8", "linecolor": "#EBF0F8", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "#EBF0F8", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "#EBF0F8", "linecolor": "#EBF0F8", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "#EBF0F8", "zerolinewidth": 2 } } }, "width": 600, "xaxis": { "anchor": "y", "domain": [ 0, 0.7363 ], "title": { "text": "Culmen Length (mm)" } }, "xaxis2": { "anchor": "y2", "domain": [ 0.7413, 1 ], "matches": "x2", "showgrid": false, "showline": false, "showticklabels": false, "ticks": "" }, "xaxis3": { "anchor": "y3", "domain": [ 0, 0.7363 ], "matches": "x", "showgrid": true, "showticklabels": false }, "xaxis4": { "anchor": "y4", "domain": [ 0.7413, 1 ], "matches": "x2", "showgrid": false, "showline": false, "showticklabels": false, "ticks": "" }, "yaxis": { "anchor": "x", "domain": [ 0, 0.7326 ], "title": { "text": "Culmen Depth (mm)" } }, "yaxis2": { "anchor": "x2", "domain": [ 0, 0.7326 ], "matches": "y", "showgrid": true, "showticklabels": false }, "yaxis3": { "anchor": "x3", "domain": [ 0.7426, 1 ], "matches": "y3", "showgrid": false, "showline": false, "showticklabels": false, "ticks": "" }, "yaxis4": { "anchor": "x4", "domain": [ 0.7426, 1 ], "matches": "y3", "showgrid": true, "showline": false, "showticklabels": false, "ticks": "" } } }, "text/html": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "import plotly.io as pio\n", "\n", "# for people who wish they were actually using R\n", "# pio.templates.default = \"ggplot2\"\n", "\n", "# my fave\n", "pio.templates.default = \"plotly_white\"\n", "\n", "# same plot as before\n", "fig = px.scatter(data_frame = penguins, \n", " x = \"Culmen Length (mm)\", \n", " y = \"Culmen Depth (mm)\",\n", " color = \"Species\",\n", " hover_name = \"Species\",\n", " hover_data = [\"Island\", \"Sex\"],\n", " size = \"Body Mass (g)\",\n", " size_max = 8,\n", " width = 600,\n", " height = 400,\n", " opacity = 0.5,\n", " marginal_y = \"box\",\n", " marginal_x = \"rug\")\n", "\n", "# reduce whitespace\n", "fig.update_layout(margin={\"r\":0,\"t\":0,\"l\":0,\"b\":0})\n", "# show the plot\n", "fig.show()" ] }, { "cell_type": "markdown", "id": "banner-underground", "metadata": {}, "source": [ "Modifying the theme this way will change the appearance of all future plots. " ] }, { "cell_type": "markdown", "id": "complex-honolulu", "metadata": {}, "source": [ "## Facets\n", "\n", "*Facetting* refers to creating multiple, small plots, each of which display a subset of the data. Plotly supports the easy creation of facets using the `facet_col` and `facet_row` arguments." ] }, { "cell_type": "code", "execution_count": 9, "id": "honest-works", "metadata": {}, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "hovertemplate": "Species=Adelie
Sex=MALE
Culmen Length (mm)=%{x}
Culmen Depth (mm)=%{y}", "legendgroup": "Adelie", "marker": { "color": "#636efa", "opacity": 0.5, "symbol": "circle" }, "mode": "markers", "name": "Adelie", "orientation": "v", "showlegend": true, "type": "scatter", "x": [ 39.1, 39.3, 39.2, 38.6, 34.6, 42.5, 46, 37.7, 38.2, 38.8, 40.6, 40.5, 37.2, 40.9, 39.2, 38.8, 39.8, 40.8, 44.1, 39.6, 41.1, 42.3, 40.1, 42, 41.4, 40.6, 37.6, 41.3, 41.1, 41.6, 41.1, 41.8, 39.7, 45.8, 42.8, 37.2, 42.1, 42.9, 35.1, 41.3, 36.3, 38.3, 41.1, 39.6, 40.8, 40.3, 43.2, 41, 37.8, 39.7, 38.2, 43.2, 45.6, 42.2, 42.7, 37.3, 41.1, 37.7, 41.4, 40.6, 41.5, 44.1, 43.1, 37.5, 41.1, 40.2, 39.7, 40.6, 40.7, 39, 39.2, 37.8, 41.5 ], "xaxis": "x", "y": [ 18.7, 20.6, 19.6, 21.2, 21.1, 20.7, 21.5, 18.7, 18.1, 17.2, 18.6, 18.9, 18.1, 18.9, 21.1, 20, 19.1, 18.4, 19.7, 18.8, 19, 21.2, 18.9, 19.5, 18.6, 18.8, 19.1, 21.1, 18.2, 18, 19.1, 19.4, 18.4, 18.9, 18.5, 19.4, 19.1, 17.6, 19.4, 20.3, 19.5, 19.2, 18.1, 18.1, 18.9, 18.5, 18.5, 20, 20, 18.9, 20, 19, 20.3, 19.5, 18.3, 20.5, 18.6, 19.8, 18.5, 19, 18.3, 18, 19.2, 18.5, 17.5, 20.1, 17.9, 17.2, 17, 18.7, 18.6, 18.1, 18.5 ], "yaxis": "y" }, { "hovertemplate": "Species=Adelie
Sex=FEMALE
Culmen Length (mm)=%{x}
Culmen Depth (mm)=%{y}", "legendgroup": "Adelie", "marker": { "color": "#636efa", "opacity": 0.5, "symbol": "circle" }, "mode": "markers", "name": "Adelie", "orientation": "v", "showlegend": false, "type": "scatter", "x": [ 39.5, 40.3, 36.7, 38.9, 41.1, 36.6, 38.7, 34.4, 37.8, 35.9, 35.3, 40.5, 37.9, 39.5, 39.5, 36.4, 42.2, 37.6, 36.5, 36, 37, 36, 39.6, 35, 34.5, 39, 36.5, 35.7, 37.6, 36.4, 35.5, 35.9, 33.5, 39.6, 35.5, 40.9, 36.2, 34.6, 36.7, 37.3, 36.9, 38.9, 35.7, 34, 36.2, 38.1, 33.1, 35, 37.7, 37.9, 38.6, 38.1, 38.1, 39.7, 39.6, 38.6, 35.7, 36.2, 40.2, 35.2, 38.8, 39, 38.5, 36.8, 38.1, 35.6, 37, 40.2, 32.1, 37.3, 36.6, 36, 36 ], "xaxis": "x2", "y": [ 17.4, 18, 19.3, 17.8, 17.6, 17.8, 19, 18.4, 18.3, 19.2, 18.9, 17.9, 18.6, 16.7, 17.8, 17, 18.5, 19.3, 18, 18.5, 16.9, 17.9, 17.7, 17.9, 18.1, 17.5, 16.6, 16.9, 17, 17.1, 16.2, 16.6, 19, 17.2, 17.5, 16.8, 16.1, 17.2, 18.8, 17.8, 18.6, 18.8, 18, 17.1, 17.3, 18.6, 16.1, 17.9, 16, 18.6, 17.2, 17, 16.5, 17.7, 20.7, 17, 17, 17.2, 17, 15.9, 17.6, 17.1, 17.9, 18.5, 17.6, 17.5, 16.5, 17.1, 15.5, 16.8, 18.4, 17.8, 17.1 ], "yaxis": "y2" }, { "hovertemplate": "Species=Chinstrap
Sex=MALE
Culmen Length (mm)=%{x}
Culmen Depth (mm)=%{y}", "legendgroup": "Chinstrap", "marker": { "color": "#EF553B", "opacity": 0.5, "symbol": "circle" }, "mode": "markers", "name": "Chinstrap", "orientation": "v", "showlegend": true, "type": "scatter", "x": [ 50, 51.3, 52.7, 51.3, 51.3, 51.7, 52, 50.5, 50.3, 49.2, 48.5, 50.6, 52, 49.5, 52.8, 54.2, 51, 49.7, 52, 53.5, 49, 50.9, 50.8, 49, 51.5, 51.4, 50.7, 52.2, 49.3, 50.2, 51.9, 55.8, 49.6, 50.8 ], "xaxis": "x", "y": [ 19.5, 19.2, 19.8, 18.2, 19.9, 20.3, 18.1, 19.6, 20, 18.2, 17.5, 19.4, 19, 19, 20, 20.8, 18.8, 18.6, 20.7, 19.9, 19.5, 19.1, 18.5, 19.6, 18.7, 19, 19.7, 18.8, 19.9, 18.8, 19.5, 19.8, 18.2, 19 ], "yaxis": "y" }, { "hovertemplate": "Species=Chinstrap
Sex=FEMALE
Culmen Length (mm)=%{x}
Culmen Depth (mm)=%{y}", "legendgroup": "Chinstrap", "marker": { "color": "#EF553B", "opacity": 0.5, "symbol": "circle" }, "mode": "markers", "name": "Chinstrap", "orientation": "v", "showlegend": false, "type": "scatter", "x": [ 46.5, 45.4, 45.2, 46.1, 46, 46.6, 47, 45.9, 58, 46.4, 42.4, 43.2, 46.7, 50.5, 46.4, 40.9, 42.5, 47.5, 47.6, 46.9, 46.2, 45.5, 50.9, 50.1, 49.8, 48.1, 45.7, 42.5, 45.2, 45.6, 46.8, 45.7, 43.5, 50.2 ], "xaxis": "x2", "y": [ 17.9, 18.7, 17.8, 18.2, 18.9, 17.8, 17.3, 17.1, 17.8, 18.6, 17.3, 16.6, 17.9, 18.4, 17.8, 16.6, 16.7, 16.8, 18.3, 16.6, 17.5, 17, 17.9, 17.9, 17.3, 16.4, 17.3, 17.3, 16.6, 19.4, 16.5, 17, 18.1, 18.7 ], "yaxis": "y2" }, { "hovertemplate": "Species=Gentoo
Sex=MALE
Culmen Length (mm)=%{x}
Culmen Depth (mm)=%{y}", "legendgroup": "Gentoo", "marker": { "color": "#00cc96", "opacity": 0.5, "symbol": "circle" }, "mode": "markers", "name": "Gentoo", "orientation": "v", "showlegend": true, "type": "scatter", "x": [ 50, 50, 47.6, 46.7, 46.8, 49, 48.4, 49.3, 49.2, 48.7, 50.2, 46.3, 46.1, 47.8, 50, 47.3, 59.6, 48.4, 44.4, 48.7, 49.6, 49.6, 50.5, 50.5, 45.2, 48.5, 50.1, 45, 45.5, 50.4, 46.2, 54.3, 49.8, 49.5, 50.7, 46.4, 48.2, 48.6, 51.1, 45.2, 52.5, 50, 50.8, 51.3, 52.1, 52.2, 49.5, 50.8, 49.4, 51.1, 55.9, 49.1, 46.8, 53.4, 48.1, 49.8, 51.5, 55.1, 48.8, 50.4, 49.9 ], "xaxis": "x", "y": [ 16.3, 15.2, 14.5, 15.3, 15.4, 16.1, 14.6, 15.7, 15.2, 15.1, 14.3, 15.8, 15.1, 15, 15.3, 15.3, 17, 16.3, 17.3, 15.7, 16, 15, 15.9, 15.9, 15.8, 14.1, 15, 15.4, 15, 15.3, 14.9, 15.7, 16.8, 16.2, 15, 15.6, 15.6, 16, 16.3, 16.4, 15.6, 15.9, 17.3, 14.2, 17, 17.1, 16.1, 15.7, 15.8, 16.5, 17, 15, 16.1, 15.8, 15.1, 15.9, 16.3, 16, 16.2, 15.7, 16.1 ], "yaxis": "y" }, { "hovertemplate": "Species=Gentoo
Sex=FEMALE
Culmen Length (mm)=%{x}
Culmen Depth (mm)=%{y}", "legendgroup": "Gentoo", "marker": { "color": "#00cc96", "opacity": 0.5, "symbol": "circle" }, "mode": "markers", "name": "Gentoo", "orientation": "v", "showlegend": false, "type": "scatter", "x": [ 46.1, 48.7, 46.5, 45.4, 43.3, 40.9, 45.5, 45.8, 42, 46.2, 45.1, 46.5, 42.9, 48.2, 42.8, 45.1, 49.1, 42.6, 44, 42.7, 45.3, 43.6, 45.5, 44.9, 46.6, 45.1, 46.5, 43.8, 43.2, 45.3, 45.7, 45.8, 43.5, 47.7, 46.5, 46.4, 47.5, 45.2, 49.1, 47.4, 44.9, 43.4, 47.5, 47.5, 45.5, 44.5, 46.9, 48.4, 48.5, 47.2, 41.7, 43.3, 50.5, 43.5, 46.2, 47.2, 46.8, 45.2 ], "xaxis": "x2", "y": [ 13.2, 14.1, 13.5, 14.6, 13.4, 13.7, 13.7, 14.6, 13.5, 14.5, 14.5, 14.5, 13.1, 14.3, 14.2, 14.5, 14.8, 13.7, 13.6, 13.7, 13.7, 13.9, 13.9, 13.3, 14.2, 14.4, 14.4, 13.9, 14.5, 13.8, 13.9, 14.2, 14.2, 15, 14.8, 15, 14.2, 13.8, 14.5, 14.6, 13.8, 14.4, 14, 15, 14.5, 14.7, 14.6, 14.4, 15, 15.5, 14.7, 14, 15.2, 15.2, 14.1, 13.7, 14.3, 14.8 ], "yaxis": "y2" } ], "layout": { "annotations": [ { "font": {}, "showarrow": false, "text": "Sex=MALE", "x": 0.245, "xanchor": "center", "xref": "paper", "y": 1, "yanchor": "bottom", "yref": "paper" }, { "font": {}, "showarrow": false, "text": "Sex=FEMALE", "x": 0.755, "xanchor": "center", "xref": "paper", "y": 1, "yanchor": "bottom", "yref": "paper" } ], "height": 300, "legend": { "title": { "text": "Species" }, "tracegroupgap": 0 }, "margin": { "b": 0, "l": 0, "r": 0, "t": 50 }, "template": { "data": { "bar": [ { "error_x": { "color": "#2a3f5f" }, "error_y": { "color": "#2a3f5f" }, "marker": { "line": { "color": "white", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "bar" } ], "barpolar": [ { "marker": { "line": { "color": "white", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "barpolar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#2a3f5f", "gridcolor": "#C8D4E3", "linecolor": "#C8D4E3", "minorgridcolor": "#C8D4E3", "startlinecolor": "#2a3f5f" }, "baxis": { "endlinecolor": "#2a3f5f", "gridcolor": "#C8D4E3", "linecolor": "#C8D4E3", "minorgridcolor": "#C8D4E3", "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": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter" } ], "scatter3d": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter3d" } ], "scattercarpet": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattercarpet" } ], "scattergeo": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergeo" } ], "scattergl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergl" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#EBF0F8" }, "line": { "color": "white" } }, "header": { "fill": { "color": "#C8D4E3" }, "line": { "color": "white" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#2a3f5f", "arrowhead": 0, "arrowwidth": 1 }, "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": "white", "showlakes": true, "showland": true, "subunitcolor": "#C8D4E3" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "light" }, "paper_bgcolor": "white", "plot_bgcolor": "white", "polar": { "angularaxis": { "gridcolor": "#EBF0F8", "linecolor": "#EBF0F8", "ticks": "" }, "bgcolor": "white", "radialaxis": { "gridcolor": "#EBF0F8", "linecolor": "#EBF0F8", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "white", "gridcolor": "#DFE8F3", "gridwidth": 2, "linecolor": "#EBF0F8", "showbackground": true, "ticks": "", "zerolinecolor": "#EBF0F8" }, "yaxis": { "backgroundcolor": "white", "gridcolor": "#DFE8F3", "gridwidth": 2, "linecolor": "#EBF0F8", "showbackground": true, "ticks": "", "zerolinecolor": "#EBF0F8" }, "zaxis": { "backgroundcolor": "white", "gridcolor": "#DFE8F3", "gridwidth": 2, "linecolor": "#EBF0F8", "showbackground": true, "ticks": "", "zerolinecolor": "#EBF0F8" } }, "shapedefaults": { "line": { "color": "#2a3f5f" } }, "ternary": { "aaxis": { "gridcolor": "#DFE8F3", "linecolor": "#A2B1C6", "ticks": "" }, "baxis": { "gridcolor": "#DFE8F3", "linecolor": "#A2B1C6", "ticks": "" }, "bgcolor": "white", "caxis": { "gridcolor": "#DFE8F3", "linecolor": "#A2B1C6", "ticks": "" } }, "title": { "x": 0.05 }, "xaxis": { "automargin": true, "gridcolor": "#EBF0F8", "linecolor": "#EBF0F8", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "#EBF0F8", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "#EBF0F8", "linecolor": "#EBF0F8", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "#EBF0F8", "zerolinewidth": 2 } } }, "width": 600, "xaxis": { "anchor": "y", "domain": [ 0, 0.49 ], "title": { "text": "Culmen Length (mm)" } }, "xaxis2": { "anchor": "y2", "domain": [ 0.51, 1 ], "matches": "x", "title": { "text": "Culmen Length (mm)" } }, "yaxis": { "anchor": "x", "domain": [ 0, 1 ], "title": { "text": "Culmen Depth (mm)" } }, "yaxis2": { "anchor": "x2", "domain": [ 0, 1 ], "matches": "y", "showticklabels": false } } }, "text/html": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "fig = px.scatter(data_frame = penguins, \n", " x = \"Culmen Length (mm)\", \n", " y = \"Culmen Depth (mm)\",\n", " color = \"Species\",\n", " width = 600,\n", " height = 300,\n", " opacity = 0.5, \n", " facet_col = \"Sex\")\n", "\n", "# reduce whitespace\n", "fig.update_layout(margin={\"r\":0,\"t\":50,\"l\":0,\"b\":0})\n", "# show the plot\n", "fig.show()" ] }, { "cell_type": "markdown", "id": "immediate-marble", "metadata": {}, "source": [ "You can even use both at the same time! " ] }, { "cell_type": "code", "execution_count": 10, "id": "demanding-watson", "metadata": {}, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "hovertemplate": "Species=Adelie
Sex=MALE
Island=Torgersen
Culmen Length (mm)=%{x}
Culmen Depth (mm)=%{y}", "legendgroup": "Adelie", "marker": { "color": "#636efa", "opacity": 0.5, "symbol": "circle" }, "mode": "markers", "name": "Adelie", "orientation": "v", "showlegend": true, "type": "scatter", "x": [ 39.1, 39.3, 39.2, 38.6, 34.6, 42.5, 46, 41.8, 39.7, 45.8, 42.8, 37.2, 42.1, 42.9, 35.1, 37.3, 41.1, 37.7, 41.4, 40.6, 41.5, 44.1, 43.1 ], "xaxis": "x4", "y": [ 18.7, 20.6, 19.6, 21.2, 21.1, 20.7, 21.5, 19.4, 18.4, 18.9, 18.5, 19.4, 19.1, 17.6, 19.4, 20.5, 18.6, 19.8, 18.5, 19, 18.3, 18, 19.2 ], "yaxis": "y4" }, { "hovertemplate": "Species=Adelie
Sex=MALE
Island=Biscoe
Culmen Length (mm)=%{x}
Culmen Depth (mm)=%{y}", "legendgroup": "Adelie", "marker": { "color": "#636efa", "opacity": 0.5, "symbol": "circle" }, "mode": "markers", "name": "Adelie", "orientation": "v", "showlegend": false, "type": "scatter", "x": [ 37.7, 38.2, 38.8, 40.6, 40.5, 40.1, 42, 41.4, 40.6, 37.6, 41.3, 41.1, 41.6, 41.1, 41, 37.8, 39.7, 38.2, 43.2, 45.6, 42.2, 42.7 ], "xaxis": "x5", "y": [ 18.7, 18.1, 17.2, 18.6, 18.9, 18.9, 19.5, 18.6, 18.8, 19.1, 21.1, 18.2, 18, 19.1, 20, 20, 18.9, 20, 19, 20.3, 19.5, 18.3 ], "yaxis": "y5" }, { "hovertemplate": "Species=Adelie
Sex=MALE
Island=Dream
Culmen Length (mm)=%{x}
Culmen Depth (mm)=%{y}", "legendgroup": "Adelie", "marker": { "color": "#636efa", "opacity": 0.5, "symbol": "circle" }, "mode": "markers", "name": "Adelie", "orientation": "v", "showlegend": false, "type": "scatter", "x": [ 37.2, 40.9, 39.2, 38.8, 39.8, 40.8, 44.1, 39.6, 41.1, 42.3, 41.3, 36.3, 38.3, 41.1, 39.6, 40.8, 40.3, 43.2, 37.5, 41.1, 40.2, 39.7, 40.6, 40.7, 39, 39.2, 37.8, 41.5 ], "xaxis": "x6", "y": [ 18.1, 18.9, 21.1, 20, 19.1, 18.4, 19.7, 18.8, 19, 21.2, 20.3, 19.5, 19.2, 18.1, 18.1, 18.9, 18.5, 18.5, 18.5, 17.5, 20.1, 17.9, 17.2, 17, 18.7, 18.6, 18.1, 18.5 ], "yaxis": "y6" }, { "hovertemplate": "Species=Adelie
Sex=FEMALE
Island=Torgersen
Culmen Length (mm)=%{x}
Culmen Depth (mm)=%{y}", "legendgroup": "Adelie", "marker": { "color": "#636efa", "opacity": 0.5, "symbol": "circle" }, "mode": "markers", "name": "Adelie", "orientation": "v", "showlegend": false, "type": "scatter", "x": [ 39.5, 40.3, 36.7, 38.9, 41.1, 36.6, 38.7, 34.4, 35.9, 33.5, 39.6, 35.5, 40.9, 36.2, 34.6, 36.7, 38.6, 35.7, 36.2, 40.2, 35.2, 38.8, 39, 38.5 ], "xaxis": "x", "y": [ 17.4, 18, 19.3, 17.8, 17.6, 17.8, 19, 18.4, 16.6, 19, 17.2, 17.5, 16.8, 16.1, 17.2, 18.8, 17, 17, 17.2, 17, 15.9, 17.6, 17.1, 17.9 ], "yaxis": "y" }, { "hovertemplate": "Species=Adelie
Sex=FEMALE
Island=Biscoe
Culmen Length (mm)=%{x}
Culmen Depth (mm)=%{y}", "legendgroup": "Adelie", "marker": { "color": "#636efa", "opacity": 0.5, "symbol": "circle" }, "mode": "markers", "name": "Adelie", "orientation": "v", "showlegend": false, "type": "scatter", "x": [ 37.8, 35.9, 35.3, 40.5, 37.9, 39.6, 35, 34.5, 39, 36.5, 35.7, 37.6, 36.4, 35.5, 35, 37.7, 37.9, 38.6, 38.1, 38.1, 39.7, 39.6 ], "xaxis": "x2", "y": [ 18.3, 19.2, 18.9, 17.9, 18.6, 17.7, 17.9, 18.1, 17.5, 16.6, 16.9, 17, 17.1, 16.2, 17.9, 16, 18.6, 17.2, 17, 16.5, 17.7, 20.7 ], "yaxis": "y2" }, { "hovertemplate": "Species=Adelie
Sex=FEMALE
Island=Dream
Culmen Length (mm)=%{x}
Culmen Depth (mm)=%{y}", "legendgroup": "Adelie", "marker": { "color": "#636efa", "opacity": 0.5, "symbol": "circle" }, "mode": "markers", "name": "Adelie", "orientation": "v", "showlegend": false, "type": "scatter", "x": [ 39.5, 39.5, 36.4, 42.2, 37.6, 36.5, 36, 37, 36, 37.3, 36.9, 38.9, 35.7, 34, 36.2, 38.1, 33.1, 36.8, 38.1, 35.6, 37, 40.2, 32.1, 37.3, 36.6, 36, 36 ], "xaxis": "x3", "y": [ 16.7, 17.8, 17, 18.5, 19.3, 18, 18.5, 16.9, 17.9, 17.8, 18.6, 18.8, 18, 17.1, 17.3, 18.6, 16.1, 18.5, 17.6, 17.5, 16.5, 17.1, 15.5, 16.8, 18.4, 17.8, 17.1 ], "yaxis": "y3" }, { "hovertemplate": "Species=Chinstrap
Sex=MALE
Island=Dream
Culmen Length (mm)=%{x}
Culmen Depth (mm)=%{y}", "legendgroup": "Chinstrap", "marker": { "color": "#EF553B", "opacity": 0.5, "symbol": "circle" }, "mode": "markers", "name": "Chinstrap", "orientation": "v", "showlegend": true, "type": "scatter", "x": [ 50, 51.3, 52.7, 51.3, 51.3, 51.7, 52, 50.5, 50.3, 49.2, 48.5, 50.6, 52, 49.5, 52.8, 54.2, 51, 49.7, 52, 53.5, 49, 50.9, 50.8, 49, 51.5, 51.4, 50.7, 52.2, 49.3, 50.2, 51.9, 55.8, 49.6, 50.8 ], "xaxis": "x6", "y": [ 19.5, 19.2, 19.8, 18.2, 19.9, 20.3, 18.1, 19.6, 20, 18.2, 17.5, 19.4, 19, 19, 20, 20.8, 18.8, 18.6, 20.7, 19.9, 19.5, 19.1, 18.5, 19.6, 18.7, 19, 19.7, 18.8, 19.9, 18.8, 19.5, 19.8, 18.2, 19 ], "yaxis": "y6" }, { "hovertemplate": "Species=Chinstrap
Sex=FEMALE
Island=Dream
Culmen Length (mm)=%{x}
Culmen Depth (mm)=%{y}", "legendgroup": "Chinstrap", "marker": { "color": "#EF553B", "opacity": 0.5, "symbol": "circle" }, "mode": "markers", "name": "Chinstrap", "orientation": "v", "showlegend": false, "type": "scatter", "x": [ 46.5, 45.4, 45.2, 46.1, 46, 46.6, 47, 45.9, 58, 46.4, 42.4, 43.2, 46.7, 50.5, 46.4, 40.9, 42.5, 47.5, 47.6, 46.9, 46.2, 45.5, 50.9, 50.1, 49.8, 48.1, 45.7, 42.5, 45.2, 45.6, 46.8, 45.7, 43.5, 50.2 ], "xaxis": "x3", "y": [ 17.9, 18.7, 17.8, 18.2, 18.9, 17.8, 17.3, 17.1, 17.8, 18.6, 17.3, 16.6, 17.9, 18.4, 17.8, 16.6, 16.7, 16.8, 18.3, 16.6, 17.5, 17, 17.9, 17.9, 17.3, 16.4, 17.3, 17.3, 16.6, 19.4, 16.5, 17, 18.1, 18.7 ], "yaxis": "y3" }, { "hovertemplate": "Species=Gentoo
Sex=MALE
Island=Biscoe
Culmen Length (mm)=%{x}
Culmen Depth (mm)=%{y}", "legendgroup": "Gentoo", "marker": { "color": "#00cc96", "opacity": 0.5, "symbol": "circle" }, "mode": "markers", "name": "Gentoo", "orientation": "v", "showlegend": true, "type": "scatter", "x": [ 50, 50, 47.6, 46.7, 46.8, 49, 48.4, 49.3, 49.2, 48.7, 50.2, 46.3, 46.1, 47.8, 50, 47.3, 59.6, 48.4, 44.4, 48.7, 49.6, 49.6, 50.5, 50.5, 45.2, 48.5, 50.1, 45, 45.5, 50.4, 46.2, 54.3, 49.8, 49.5, 50.7, 46.4, 48.2, 48.6, 51.1, 45.2, 52.5, 50, 50.8, 51.3, 52.1, 52.2, 49.5, 50.8, 49.4, 51.1, 55.9, 49.1, 46.8, 53.4, 48.1, 49.8, 51.5, 55.1, 48.8, 50.4, 49.9 ], "xaxis": "x5", "y": [ 16.3, 15.2, 14.5, 15.3, 15.4, 16.1, 14.6, 15.7, 15.2, 15.1, 14.3, 15.8, 15.1, 15, 15.3, 15.3, 17, 16.3, 17.3, 15.7, 16, 15, 15.9, 15.9, 15.8, 14.1, 15, 15.4, 15, 15.3, 14.9, 15.7, 16.8, 16.2, 15, 15.6, 15.6, 16, 16.3, 16.4, 15.6, 15.9, 17.3, 14.2, 17, 17.1, 16.1, 15.7, 15.8, 16.5, 17, 15, 16.1, 15.8, 15.1, 15.9, 16.3, 16, 16.2, 15.7, 16.1 ], "yaxis": "y5" }, { "hovertemplate": "Species=Gentoo
Sex=FEMALE
Island=Biscoe
Culmen Length (mm)=%{x}
Culmen Depth (mm)=%{y}", "legendgroup": "Gentoo", "marker": { "color": "#00cc96", "opacity": 0.5, "symbol": "circle" }, "mode": "markers", "name": "Gentoo", "orientation": "v", "showlegend": false, "type": "scatter", "x": [ 46.1, 48.7, 46.5, 45.4, 43.3, 40.9, 45.5, 45.8, 42, 46.2, 45.1, 46.5, 42.9, 48.2, 42.8, 45.1, 49.1, 42.6, 44, 42.7, 45.3, 43.6, 45.5, 44.9, 46.6, 45.1, 46.5, 43.8, 43.2, 45.3, 45.7, 45.8, 43.5, 47.7, 46.5, 46.4, 47.5, 45.2, 49.1, 47.4, 44.9, 43.4, 47.5, 47.5, 45.5, 44.5, 46.9, 48.4, 48.5, 47.2, 41.7, 43.3, 50.5, 43.5, 46.2, 47.2, 46.8, 45.2 ], "xaxis": "x2", "y": [ 13.2, 14.1, 13.5, 14.6, 13.4, 13.7, 13.7, 14.6, 13.5, 14.5, 14.5, 14.5, 13.1, 14.3, 14.2, 14.5, 14.8, 13.7, 13.6, 13.7, 13.7, 13.9, 13.9, 13.3, 14.2, 14.4, 14.4, 13.9, 14.5, 13.8, 13.9, 14.2, 14.2, 15, 14.8, 15, 14.2, 13.8, 14.5, 14.6, 13.8, 14.4, 14, 15, 14.5, 14.7, 14.6, 14.4, 15, 15.5, 14.7, 14, 15.2, 15.2, 14.1, 13.7, 14.3, 14.8 ], "yaxis": "y2" } ], "layout": { "annotations": [ { "font": {}, "showarrow": false, "text": "Island=Torgersen", "x": 0.15666666666666665, "xanchor": "center", "xref": "paper", "y": 1, "yanchor": "bottom", "yref": "paper" }, { "font": {}, "showarrow": false, "text": "Island=Biscoe", "x": 0.49, "xanchor": "center", "xref": "paper", "y": 1, "yanchor": "bottom", "yref": "paper" }, { "font": {}, "showarrow": false, "text": "Island=Dream", "x": 0.8233333333333333, "xanchor": "center", "xref": "paper", "y": 1, "yanchor": "bottom", "yref": "paper" }, { "font": {}, "showarrow": false, "text": "Sex=FEMALE", "textangle": 90, "x": 0.98, "xanchor": "left", "xref": "paper", "y": 0.2425, "yanchor": "middle", "yref": "paper" }, { "font": {}, "showarrow": false, "text": "Sex=MALE", "textangle": 90, "x": 0.98, "xanchor": "left", "xref": "paper", "y": 0.7575000000000001, "yanchor": "middle", "yref": "paper" } ], "height": 300, "legend": { "title": { "text": "Species" }, "tracegroupgap": 0 }, "margin": { "b": 0, "l": 0, "r": 0, "t": 50 }, "template": { "data": { "bar": [ { "error_x": { "color": "#2a3f5f" }, "error_y": { "color": "#2a3f5f" }, "marker": { "line": { "color": "white", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "bar" } ], "barpolar": [ { "marker": { "line": { "color": "white", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "barpolar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#2a3f5f", "gridcolor": "#C8D4E3", "linecolor": "#C8D4E3", "minorgridcolor": "#C8D4E3", "startlinecolor": "#2a3f5f" }, "baxis": { "endlinecolor": "#2a3f5f", "gridcolor": "#C8D4E3", "linecolor": "#C8D4E3", "minorgridcolor": "#C8D4E3", "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": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter" } ], "scatter3d": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter3d" } ], "scattercarpet": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattercarpet" } ], "scattergeo": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergeo" } ], "scattergl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergl" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#EBF0F8" }, "line": { "color": "white" } }, "header": { "fill": { "color": "#C8D4E3" }, "line": { "color": "white" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#2a3f5f", "arrowhead": 0, "arrowwidth": 1 }, "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": "white", "showlakes": true, "showland": true, "subunitcolor": "#C8D4E3" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "light" }, "paper_bgcolor": "white", "plot_bgcolor": "white", "polar": { "angularaxis": { "gridcolor": "#EBF0F8", "linecolor": "#EBF0F8", "ticks": "" }, "bgcolor": "white", "radialaxis": { "gridcolor": "#EBF0F8", "linecolor": "#EBF0F8", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "white", "gridcolor": "#DFE8F3", "gridwidth": 2, "linecolor": "#EBF0F8", "showbackground": true, "ticks": "", "zerolinecolor": "#EBF0F8" }, "yaxis": { "backgroundcolor": "white", "gridcolor": "#DFE8F3", "gridwidth": 2, "linecolor": "#EBF0F8", "showbackground": true, "ticks": "", "zerolinecolor": "#EBF0F8" }, "zaxis": { "backgroundcolor": "white", "gridcolor": "#DFE8F3", "gridwidth": 2, "linecolor": "#EBF0F8", "showbackground": true, "ticks": "", "zerolinecolor": "#EBF0F8" } }, "shapedefaults": { "line": { "color": "#2a3f5f" } }, "ternary": { "aaxis": { "gridcolor": "#DFE8F3", "linecolor": "#A2B1C6", "ticks": "" }, "baxis": { "gridcolor": "#DFE8F3", "linecolor": "#A2B1C6", "ticks": "" }, "bgcolor": "white", "caxis": { "gridcolor": "#DFE8F3", "linecolor": "#A2B1C6", "ticks": "" } }, "title": { "x": 0.05 }, "xaxis": { "automargin": true, "gridcolor": "#EBF0F8", "linecolor": "#EBF0F8", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "#EBF0F8", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "#EBF0F8", "linecolor": "#EBF0F8", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "#EBF0F8", "zerolinewidth": 2 } } }, "width": 600, "xaxis": { "anchor": "y", "domain": [ 0, 0.3133333333333333 ], "title": { "text": "Culmen Length (mm)" } }, "xaxis2": { "anchor": "y2", "domain": [ 0.3333333333333333, 0.6466666666666666 ], "matches": "x", "title": { "text": "Culmen Length (mm)" } }, "xaxis3": { "anchor": "y3", "domain": [ 0.6666666666666666, 0.98 ], "matches": "x", "title": { "text": "Culmen Length (mm)" } }, "xaxis4": { "anchor": "y4", "domain": [ 0, 0.3133333333333333 ], "matches": "x", "showticklabels": false }, "xaxis5": { "anchor": "y5", "domain": [ 0.3333333333333333, 0.6466666666666666 ], "matches": "x", "showticklabels": false }, "xaxis6": { "anchor": "y6", "domain": [ 0.6666666666666666, 0.98 ], "matches": "x", "showticklabels": false }, "yaxis": { "anchor": "x", "domain": [ 0, 0.485 ], "title": { "text": "Culmen Depth (mm)" } }, "yaxis2": { "anchor": "x2", "domain": [ 0, 0.485 ], "matches": "y", "showticklabels": false }, "yaxis3": { "anchor": "x3", "domain": [ 0, 0.485 ], "matches": "y", "showticklabels": false }, "yaxis4": { "anchor": "x4", "domain": [ 0.515, 1 ], "matches": "y", "title": { "text": "Culmen Depth (mm)" } }, "yaxis5": { "anchor": "x5", "domain": [ 0.515, 1 ], "matches": "y", "showticklabels": false }, "yaxis6": { "anchor": "x6", "domain": [ 0.515, 1 ], "matches": "y", "showticklabels": false } } }, "text/html": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "fig = px.scatter(data_frame = penguins, \n", " x = \"Culmen Length (mm)\", \n", " y = \"Culmen Depth (mm)\",\n", " color = \"Species\",\n", " width = 600,\n", " height = 300,\n", " opacity = 0.5, \n", " facet_col = \"Island\",\n", " facet_row = \"Sex\")\n", "\n", "# reduce whitespace\n", "fig.update_layout(margin={\"r\":0,\"t\":50,\"l\":0,\"b\":0})\n", "# show the plot\n", "fig.show()" ] }, { "cell_type": "markdown", "id": "champion-transmission", "metadata": {}, "source": [ "Faceting is an easy way to create complex, scientifically interesting plots using minimal effort. " ] }, { "cell_type": "markdown", "id": "placed-replication", "metadata": {}, "source": [ "## Statistical Graphics: Histograms, Boxplots, and Densities\n", "\n", "Scatterplots are probably the most universally useful plot type, but Plotly enables the creation of many other useful plot types. Here, let's focus on plot types for estimating univariate and bivariate densities. \n", "\n", "### Histograms" ] }, { "cell_type": "code", "execution_count": 11, "id": "ceramic-camcorder", "metadata": {}, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "alignmentgroup": "True", "bingroup": "x", "hovertemplate": "Species=Adelie
Culmen Length (mm)=%{x}
count=%{y}", "legendgroup": "Adelie", "marker": { "color": "#636efa", "opacity": 0.5, "pattern": { "shape": "" } }, "name": "Adelie", "nbinsx": 30, "offsetgroup": "Adelie", "orientation": "v", "showlegend": true, "type": "histogram", "x": [ 39.1, 39.5, 40.3, 36.7, 39.3, 38.9, 39.2, 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, 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", "yaxis": "y" }, { "alignmentgroup": "True", "bingroup": "x", "hovertemplate": "Species=Chinstrap
Culmen Length (mm)=%{x}
count=%{y}", "legendgroup": "Chinstrap", "marker": { "color": "#EF553B", "opacity": 0.5, "pattern": { "shape": "" } }, "name": "Chinstrap", "nbinsx": 30, "offsetgroup": "Chinstrap", "orientation": "v", "showlegend": true, "type": "histogram", "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", "yaxis": "y" }, { "alignmentgroup": "True", "bingroup": "x", "hovertemplate": "Species=Gentoo
Culmen Length (mm)=%{x}
count=%{y}", "legendgroup": "Gentoo", "marker": { "color": "#00cc96", "opacity": 0.5, "pattern": { "shape": "" } }, "name": "Gentoo", "nbinsx": 30, "offsetgroup": "Gentoo", "orientation": "v", "showlegend": true, "type": "histogram", "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, 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, 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, 46.8, 41.7, 53.4, 43.3, 48.1, 50.5, 49.8, 43.5, 51.5, 46.2, 55.1, 48.8, 47.2, 46.8, 50.4, 45.2, 49.9 ], "xaxis": "x", "yaxis": "y" } ], "layout": { "barmode": "stack", "height": 300, "legend": { "title": { "text": "Species" }, "tracegroupgap": 0 }, "margin": { "b": 0, "l": 0, "r": 0, "t": 0 }, "template": { "data": { "bar": [ { "error_x": { "color": "#2a3f5f" }, "error_y": { "color": "#2a3f5f" }, "marker": { "line": { "color": "white", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "bar" } ], "barpolar": [ { "marker": { "line": { "color": "white", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "barpolar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#2a3f5f", "gridcolor": "#C8D4E3", "linecolor": "#C8D4E3", "minorgridcolor": "#C8D4E3", "startlinecolor": "#2a3f5f" }, "baxis": { "endlinecolor": "#2a3f5f", "gridcolor": "#C8D4E3", "linecolor": "#C8D4E3", "minorgridcolor": "#C8D4E3", "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": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter" } ], "scatter3d": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter3d" } ], "scattercarpet": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattercarpet" } ], "scattergeo": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergeo" } ], "scattergl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergl" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#EBF0F8" }, "line": { "color": "white" } }, "header": { "fill": { "color": "#C8D4E3" }, "line": { "color": "white" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#2a3f5f", "arrowhead": 0, "arrowwidth": 1 }, "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": "white", "showlakes": true, "showland": true, "subunitcolor": "#C8D4E3" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "light" }, "paper_bgcolor": "white", "plot_bgcolor": "white", "polar": { "angularaxis": { "gridcolor": "#EBF0F8", "linecolor": "#EBF0F8", "ticks": "" }, "bgcolor": "white", "radialaxis": { "gridcolor": "#EBF0F8", "linecolor": "#EBF0F8", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "white", "gridcolor": "#DFE8F3", "gridwidth": 2, "linecolor": "#EBF0F8", "showbackground": true, "ticks": "", "zerolinecolor": "#EBF0F8" }, "yaxis": { "backgroundcolor": "white", "gridcolor": "#DFE8F3", "gridwidth": 2, "linecolor": "#EBF0F8", "showbackground": true, "ticks": "", "zerolinecolor": "#EBF0F8" }, "zaxis": { "backgroundcolor": "white", "gridcolor": "#DFE8F3", "gridwidth": 2, "linecolor": "#EBF0F8", "showbackground": true, "ticks": "", "zerolinecolor": "#EBF0F8" } }, "shapedefaults": { "line": { "color": "#2a3f5f" } }, "ternary": { "aaxis": { "gridcolor": "#DFE8F3", "linecolor": "#A2B1C6", "ticks": "" }, "baxis": { "gridcolor": "#DFE8F3", "linecolor": "#A2B1C6", "ticks": "" }, "bgcolor": "white", "caxis": { "gridcolor": "#DFE8F3", "linecolor": "#A2B1C6", "ticks": "" } }, "title": { "x": 0.05 }, "xaxis": { "automargin": true, "gridcolor": "#EBF0F8", "linecolor": "#EBF0F8", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "#EBF0F8", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "#EBF0F8", "linecolor": "#EBF0F8", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "#EBF0F8", "zerolinewidth": 2 } } }, "width": 600, "xaxis": { "anchor": "y", "domain": [ 0, 1 ], "title": { "text": "Culmen Length (mm)" } }, "yaxis": { "anchor": "x", "domain": [ 0, 1 ], "title": { "text": "count" } } } }, "text/html": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "fig = px.histogram(penguins, \n", " x = \"Culmen Length (mm)\", \n", " color = \"Species\",\n", " opacity = 0.5, \n", " nbins = 30, \n", " barmode='stack',\n", " width = 600,\n", " height = 300)\n", "\n", "# reduce whitespace\n", "fig.update_layout(margin={\"r\":0,\"t\":0,\"l\":0,\"b\":0})\n", "# show the plot\n", "fig.show()" ] }, { "cell_type": "markdown", "id": "wrapped-freight", "metadata": {}, "source": [ "### Boxplots" ] }, { "cell_type": "code", "execution_count": 12, "id": "stone-divorce", "metadata": {}, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "alignmentgroup": "True", "hovertemplate": "Sex=MALE
Species=%{x}
Body Mass (g)=%{y}", "legendgroup": "MALE", "marker": { "color": "#636efa" }, "name": "MALE", "notched": false, "offsetgroup": "MALE", "orientation": "v", "showlegend": true, "type": "box", "x": [ "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", "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", "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" ], "x0": " ", "xaxis": "x", "y": [ 3750, 3650, 4675, 3800, 4400, 4500, 4200, 3600, 3950, 3800, 3550, 3950, 3900, 3900, 4150, 3950, 4650, 3900, 4400, 4600, 3425, 4150, 4300, 4050, 3700, 3800, 3750, 4400, 4050, 3950, 4100, 4450, 3900, 4150, 4250, 3900, 4000, 4700, 4200, 3550, 3800, 3950, 4300, 4450, 4300, 4350, 4100, 4725, 4250, 3550, 3900, 4775, 4600, 4275, 4075, 3775, 3325, 3500, 3875, 4000, 4300, 4000, 3500, 4475, 3900, 3975, 4250, 3475, 3725, 3650, 4250, 3750, 4000, 3900, 3650, 3725, 3750, 3700, 3775, 4050, 4050, 3300, 4400, 3400, 3800, 4150, 3800, 4550, 4300, 4100, 3600, 4800, 4500, 3950, 3550, 4450, 4300, 3250, 3950, 4050, 3450, 4050, 3800, 3950, 4000, 3775, 4100, 5700, 5700, 5400, 5200, 5150, 5550, 5850, 5850, 6300, 5350, 5700, 5050, 5100, 5650, 5550, 5250, 6050, 5400, 5250, 5350, 5700, 4750, 5550, 5400, 5300, 5300, 5000, 5050, 5000, 5550, 5300, 5650, 5700, 5800, 5550, 5000, 5100, 5800, 6000, 5950, 5450, 5350, 5600, 5300, 5550, 5400, 5650, 5200, 4925, 5250, 5600, 5500, 5500, 5500, 5500, 5950, 5500, 5850, 6000, 5750, 5400 ], "y0": " ", "yaxis": "y" }, { "alignmentgroup": "True", "hovertemplate": "Sex=FEMALE
Species=%{x}
Body Mass (g)=%{y}", "legendgroup": "FEMALE", "marker": { "color": "#EF553B" }, "name": "FEMALE", "notched": false, "offsetgroup": "FEMALE", "orientation": "v", "showlegend": true, "type": "box", "x": [ "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", "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", "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" ], "x0": " ", "xaxis": "x", "y": [ 3800, 3250, 3450, 3625, 3200, 3700, 3450, 3325, 3400, 3800, 3800, 3200, 3150, 3250, 3300, 3325, 3550, 3300, 3150, 3100, 3000, 3450, 3500, 3450, 2900, 3550, 2850, 3150, 3600, 2850, 3350, 3050, 3600, 3550, 3700, 3700, 3550, 3200, 3800, 3350, 3500, 3600, 3550, 3400, 3300, 3700, 2900, 3725, 3075, 2925, 3750, 3175, 3825, 3200, 3900, 2900, 3350, 3150, 3450, 3050, 3275, 3050, 3325, 3500, 3425, 3175, 3400, 3400, 3050, 3000, 3475, 3450, 3700, 3500, 3525, 3950, 3250, 4150, 3800, 3700, 3575, 3700, 3450, 3600, 2900, 3300, 3400, 3700, 3200, 3350, 3900, 3850, 2700, 3650, 3500, 3675, 3400, 3675, 3325, 3600, 3350, 3250, 3525, 3650, 3650, 3400, 3775, 4500, 4450, 4550, 4800, 4400, 4650, 4650, 4200, 4150, 4800, 5000, 4400, 5000, 4600, 4700, 5050, 5150, 4950, 4350, 3950, 4300, 4900, 4200, 5100, 4850, 4400, 4900, 4300, 4450, 4200, 4400, 4700, 4700, 4750, 5200, 4700, 4600, 4750, 4625, 4725, 4750, 4600, 4875, 4950, 4750, 4850, 4875, 4625, 4850, 4975, 4700, 4575, 5000, 4650, 4375, 4925, 4850, 5200 ], "y0": " ", "yaxis": "y" } ], "layout": { "boxmode": "group", "height": 300, "legend": { "title": { "text": "Sex" }, "tracegroupgap": 0 }, "margin": { "b": 0, "l": 0, "r": 0, "t": 0 }, "template": { "data": { "bar": [ { "error_x": { "color": "#2a3f5f" }, "error_y": { "color": "#2a3f5f" }, "marker": { "line": { "color": "white", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "bar" } ], "barpolar": [ { "marker": { "line": { "color": "white", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "barpolar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#2a3f5f", "gridcolor": "#C8D4E3", "linecolor": "#C8D4E3", "minorgridcolor": "#C8D4E3", "startlinecolor": "#2a3f5f" }, "baxis": { "endlinecolor": "#2a3f5f", "gridcolor": "#C8D4E3", "linecolor": "#C8D4E3", "minorgridcolor": "#C8D4E3", "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": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter" } ], "scatter3d": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter3d" } ], "scattercarpet": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattercarpet" } ], "scattergeo": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergeo" } ], "scattergl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergl" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#EBF0F8" }, "line": { "color": "white" } }, "header": { "fill": { "color": "#C8D4E3" }, "line": { "color": "white" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#2a3f5f", "arrowhead": 0, "arrowwidth": 1 }, "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": "white", "showlakes": true, "showland": true, "subunitcolor": "#C8D4E3" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "light" }, "paper_bgcolor": "white", "plot_bgcolor": "white", "polar": { "angularaxis": { "gridcolor": "#EBF0F8", "linecolor": "#EBF0F8", "ticks": "" }, "bgcolor": "white", "radialaxis": { "gridcolor": "#EBF0F8", "linecolor": "#EBF0F8", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "white", "gridcolor": "#DFE8F3", "gridwidth": 2, "linecolor": "#EBF0F8", "showbackground": true, "ticks": "", "zerolinecolor": "#EBF0F8" }, "yaxis": { "backgroundcolor": "white", "gridcolor": "#DFE8F3", "gridwidth": 2, "linecolor": "#EBF0F8", "showbackground": true, "ticks": "", "zerolinecolor": "#EBF0F8" }, "zaxis": { "backgroundcolor": "white", "gridcolor": "#DFE8F3", "gridwidth": 2, "linecolor": "#EBF0F8", "showbackground": true, "ticks": "", "zerolinecolor": "#EBF0F8" } }, "shapedefaults": { "line": { "color": "#2a3f5f" } }, "ternary": { "aaxis": { "gridcolor": "#DFE8F3", "linecolor": "#A2B1C6", "ticks": "" }, "baxis": { "gridcolor": "#DFE8F3", "linecolor": "#A2B1C6", "ticks": "" }, "bgcolor": "white", "caxis": { "gridcolor": "#DFE8F3", "linecolor": "#A2B1C6", "ticks": "" } }, "title": { "x": 0.05 }, "xaxis": { "automargin": true, "gridcolor": "#EBF0F8", "linecolor": "#EBF0F8", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "#EBF0F8", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "#EBF0F8", "linecolor": "#EBF0F8", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "#EBF0F8", "zerolinewidth": 2 } } }, "width": 600, "xaxis": { "anchor": "y", "domain": [ 0, 1 ], "title": { "text": "Species" } }, "yaxis": { "anchor": "x", "domain": [ 0, 1 ], "title": { "text": "Body Mass (g)" } } } }, "text/html": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "fig = px.box(penguins, \n", " x = \"Species\", \n", " y = \"Body Mass (g)\",\n", " color = \"Sex\",\n", " width = 600,\n", " height = 300)\n", "\n", "# reduce whitespace\n", "fig.update_layout(margin={\"r\":0,\"t\":0,\"l\":0,\"b\":0})\n", "# show the plot\n", "fig.show()" ] }, { "cell_type": "markdown", "id": "accepting-church", "metadata": {}, "source": [ "## Bivariate Distributions\n", "\n", "A density heatmap is just a bivariate histogram: " ] }, { "cell_type": "code", "execution_count": 13, "id": "preceding-relief", "metadata": {}, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "coloraxis": "coloraxis", "hovertemplate": "Sex=MALE
Body Mass (g)=%{x}
Flipper Length (mm)=%{y}
count=%{z}", "name": "", "nbinsx": 25, "nbinsy": 25, "type": "histogram2d", "x": [ 3750, 3650, 4675, 3800, 4400, 4500, 4200, 3600, 3950, 3800, 3550, 3950, 3900, 3900, 4150, 3950, 4650, 3900, 4400, 4600, 3425, 4150, 4300, 4050, 3700, 3800, 3750, 4400, 4050, 3950, 4100, 4450, 3900, 4150, 4250, 3900, 4000, 4700, 4200, 3550, 3800, 3950, 4300, 4450, 4300, 4350, 4100, 4725, 4250, 3550, 3900, 4775, 4600, 4275, 4075, 3775, 3325, 3500, 3875, 4000, 4300, 4000, 3500, 4475, 3900, 3975, 4250, 3475, 3725, 3650, 4250, 3750, 4000, 3900, 3650, 3725, 3750, 3700, 3775, 4050, 4050, 3300, 4400, 3400, 3800, 4150, 3800, 4550, 4300, 4100, 3600, 4800, 4500, 3950, 3550, 4450, 4300, 3250, 3950, 4050, 3450, 4050, 3800, 3950, 4000, 3775, 4100, 5700, 5700, 5400, 5200, 5150, 5550, 5850, 5850, 6300, 5350, 5700, 5050, 5100, 5650, 5550, 5250, 6050, 5400, 5250, 5350, 5700, 4750, 5550, 5400, 5300, 5300, 5000, 5050, 5000, 5550, 5300, 5650, 5700, 5800, 5550, 5000, 5100, 5800, 6000, 5950, 5450, 5350, 5600, 5300, 5550, 5400, 5650, 5200, 4925, 5250, 5600, 5500, 5500, 5500, 5500, 5950, 5500, 5850, 6000, 5750, 5400 ], "xaxis": "x2", "xbingroup": "x", "y": [ 181, 190, 195, 191, 198, 197, 194, 180, 185, 180, 183, 180, 178, 184, 196, 190, 184, 195, 196, 190, 182, 191, 188, 200, 191, 193, 194, 195, 192, 192, 188, 198, 190, 197, 195, 184, 195, 196, 193, 194, 190, 189, 205, 186, 208, 196, 192, 203, 190, 184, 190, 197, 191, 197, 196, 199, 189, 198, 202, 199, 195, 210, 197, 199, 190, 200, 193, 187, 190, 185, 190, 193, 201, 196, 193, 197, 197, 198, 194, 201, 201, 197, 195, 191, 193, 197, 200, 205, 201, 203, 195, 210, 205, 210, 196, 201, 212, 187, 201, 203, 197, 203, 202, 206, 207, 193, 210, 230, 218, 215, 219, 215, 216, 213, 217, 221, 222, 218, 215, 215, 215, 220, 222, 230, 220, 219, 208, 225, 216, 222, 225, 215, 220, 225, 220, 220, 224, 221, 231, 230, 229, 223, 221, 221, 230, 220, 223, 221, 224, 228, 218, 230, 228, 224, 226, 216, 225, 228, 228, 215, 219, 209, 229, 230, 230, 222, 222, 213 ], "yaxis": "y2", "ybingroup": "y" }, { "coloraxis": "coloraxis", "hovertemplate": "Sex=FEMALE
Body Mass (g)=%{x}
Flipper Length (mm)=%{y}
count=%{z}", "name": "", "nbinsx": 25, "nbinsy": 25, "type": "histogram2d", "x": [ 3800, 3250, 3450, 3625, 3200, 3700, 3450, 3325, 3400, 3800, 3800, 3200, 3150, 3250, 3300, 3325, 3550, 3300, 3150, 3100, 3000, 3450, 3500, 3450, 2900, 3550, 2850, 3150, 3600, 2850, 3350, 3050, 3600, 3550, 3700, 3700, 3550, 3200, 3800, 3350, 3500, 3600, 3550, 3400, 3300, 3700, 2900, 3725, 3075, 2925, 3750, 3175, 3825, 3200, 3900, 2900, 3350, 3150, 3450, 3050, 3275, 3050, 3325, 3500, 3425, 3175, 3400, 3400, 3050, 3000, 3475, 3450, 3700, 3500, 3525, 3950, 3250, 4150, 3800, 3700, 3575, 3700, 3450, 3600, 2900, 3300, 3400, 3700, 3200, 3350, 3900, 3850, 2700, 3650, 3500, 3675, 3400, 3675, 3325, 3600, 3350, 3250, 3525, 3650, 3650, 3400, 3775, 4500, 4450, 4550, 4800, 4400, 4650, 4650, 4200, 4150, 4800, 5000, 4400, 5000, 4600, 4700, 5050, 5150, 4950, 4350, 3950, 4300, 4900, 4200, 5100, 4850, 4400, 4900, 4300, 4450, 4200, 4400, 4700, 4700, 4750, 5200, 4700, 4600, 4750, 4625, 4725, 4750, 4600, 4875, 4950, 4750, 4850, 4875, 4625, 4850, 4975, 4700, 4575, 5000, 4650, 4375, 4925, 4850, 5200 ], "xaxis": "x", "xbingroup": "x", "y": [ 186, 195, 193, 181, 182, 185, 195, 184, 174, 189, 187, 187, 172, 178, 188, 195, 180, 181, 182, 186, 185, 190, 186, 190, 187, 186, 181, 185, 185, 184, 195, 190, 190, 196, 190, 191, 187, 189, 187, 191, 189, 190, 202, 185, 187, 190, 178, 192, 183, 193, 199, 181, 198, 193, 191, 188, 189, 187, 176, 186, 191, 191, 190, 193, 187, 191, 185, 193, 188, 192, 184, 195, 187, 192, 188, 198, 178, 195, 193, 185, 190, 181, 190, 181, 187, 195, 200, 191, 187, 187, 199, 195, 192, 187, 196, 196, 190, 198, 199, 193, 187, 191, 194, 189, 195, 202, 198, 211, 210, 210, 211, 209, 214, 214, 210, 210, 209, 215, 213, 215, 210, 209, 207, 220, 213, 208, 208, 210, 217, 210, 213, 210, 210, 217, 208, 208, 208, 214, 219, 220, 216, 217, 216, 209, 215, 212, 212, 212, 218, 212, 218, 212, 214, 222, 203, 219, 215, 210, 208, 216, 213, 217, 214, 215, 212 ], "yaxis": "y", "ybingroup": "y" } ], "layout": { "annotations": [ { "font": {}, "showarrow": false, "text": "Sex=FEMALE", "textangle": 90, "x": 0.98, "xanchor": "left", "xref": "paper", "y": 0.2425, "yanchor": "middle", "yref": "paper" }, { "font": {}, "showarrow": false, "text": "Sex=MALE", "textangle": 90, "x": 0.98, "xanchor": "left", "xref": "paper", "y": 0.7575000000000001, "yanchor": "middle", "yref": "paper" } ], "coloraxis": { "colorbar": { "title": { "text": "count" } }, "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" ] ] }, "legend": { "tracegroupgap": 0 }, "margin": { "b": 0, "l": 0, "r": 0, "t": 0 }, "template": { "data": { "bar": [ { "error_x": { "color": "#2a3f5f" }, "error_y": { "color": "#2a3f5f" }, "marker": { "line": { "color": "white", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "bar" } ], "barpolar": [ { "marker": { "line": { "color": "white", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "barpolar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#2a3f5f", "gridcolor": "#C8D4E3", "linecolor": "#C8D4E3", "minorgridcolor": "#C8D4E3", "startlinecolor": "#2a3f5f" }, "baxis": { "endlinecolor": "#2a3f5f", "gridcolor": "#C8D4E3", "linecolor": "#C8D4E3", "minorgridcolor": "#C8D4E3", "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": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter" } ], "scatter3d": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter3d" } ], "scattercarpet": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattercarpet" } ], "scattergeo": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergeo" } ], "scattergl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergl" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#EBF0F8" }, "line": { "color": "white" } }, "header": { "fill": { "color": "#C8D4E3" }, "line": { "color": "white" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#2a3f5f", "arrowhead": 0, "arrowwidth": 1 }, "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": "white", "showlakes": true, "showland": true, "subunitcolor": "#C8D4E3" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "light" }, "paper_bgcolor": "white", "plot_bgcolor": "white", "polar": { "angularaxis": { "gridcolor": "#EBF0F8", "linecolor": "#EBF0F8", "ticks": "" }, "bgcolor": "white", "radialaxis": { "gridcolor": "#EBF0F8", "linecolor": "#EBF0F8", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "white", "gridcolor": "#DFE8F3", "gridwidth": 2, "linecolor": "#EBF0F8", "showbackground": true, "ticks": "", "zerolinecolor": "#EBF0F8" }, "yaxis": { "backgroundcolor": "white", "gridcolor": "#DFE8F3", "gridwidth": 2, "linecolor": "#EBF0F8", "showbackground": true, "ticks": "", "zerolinecolor": "#EBF0F8" }, "zaxis": { "backgroundcolor": "white", "gridcolor": "#DFE8F3", "gridwidth": 2, "linecolor": "#EBF0F8", "showbackground": true, "ticks": "", "zerolinecolor": "#EBF0F8" } }, "shapedefaults": { "line": { "color": "#2a3f5f" } }, "ternary": { "aaxis": { "gridcolor": "#DFE8F3", "linecolor": "#A2B1C6", "ticks": "" }, "baxis": { "gridcolor": "#DFE8F3", "linecolor": "#A2B1C6", "ticks": "" }, "bgcolor": "white", "caxis": { "gridcolor": "#DFE8F3", "linecolor": "#A2B1C6", "ticks": "" } }, "title": { "x": 0.05 }, "xaxis": { "automargin": true, "gridcolor": "#EBF0F8", "linecolor": "#EBF0F8", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "#EBF0F8", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "#EBF0F8", "linecolor": "#EBF0F8", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "#EBF0F8", "zerolinewidth": 2 } } }, "xaxis": { "anchor": "y", "domain": [ 0, 0.98 ], "title": { "text": "Body Mass (g)" } }, "xaxis2": { "anchor": "y2", "domain": [ 0, 0.98 ], "matches": "x", "showticklabels": false }, "yaxis": { "anchor": "x", "domain": [ 0, 0.485 ], "title": { "text": "Flipper Length (mm)" } }, "yaxis2": { "anchor": "x2", "domain": [ 0.515, 1 ], "matches": "y", "title": { "text": "Flipper Length (mm)" } } } }, "text/html": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "fig = px.density_heatmap(penguins, \n", " x = \"Body Mass (g)\", \n", " y = \"Flipper Length (mm)\",\n", " facet_row = \"Sex\",\n", " nbinsx = 25,\n", " nbinsy = 25)\n", "\n", "fig.update_layout(margin={\"r\":0,\"t\":0,\"l\":0,\"b\":0})\n", "fig.show()" ] }, { "cell_type": "markdown", "id": "usual-private", "metadata": {}, "source": [ "Density *contours* provide a nice alternative: " ] }, { "cell_type": "code", "execution_count": 14, "id": "unsigned-glory", "metadata": {}, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "contours": { "coloring": "none" }, "hovertemplate": "Species=Adelie
Sex=MALE
Body Mass (g)=%{x}
Flipper Length (mm)=%{y}
count=%{z}", "legendgroup": "Adelie", "line": { "color": "#636efa" }, "name": "Adelie", "showlegend": true, "type": "histogram2dcontour", "x": [ 3750, 3650, 4675, 3800, 4400, 4500, 4200, 3600, 3950, 3800, 3550, 3950, 3900, 3900, 4150, 3950, 4650, 3900, 4400, 4600, 3425, 4150, 4300, 4050, 3700, 3800, 3750, 4400, 4050, 3950, 4100, 4450, 3900, 4150, 4250, 3900, 4000, 4700, 4200, 3550, 3800, 3950, 4300, 4450, 4300, 4350, 4100, 4725, 4250, 3550, 3900, 4775, 4600, 4275, 4075, 3775, 3325, 3500, 3875, 4000, 4300, 4000, 3500, 4475, 3900, 3975, 4250, 3475, 3725, 3650, 4250, 3750, 4000 ], "xaxis": "x2", "xbingroup": "x", "y": [ 181, 190, 195, 191, 198, 197, 194, 180, 185, 180, 183, 180, 178, 184, 196, 190, 184, 195, 196, 190, 182, 191, 188, 200, 191, 193, 194, 195, 192, 192, 188, 198, 190, 197, 195, 184, 195, 196, 193, 194, 190, 189, 205, 186, 208, 196, 192, 203, 190, 184, 190, 197, 191, 197, 196, 199, 189, 198, 202, 199, 195, 210, 197, 199, 190, 200, 193, 187, 190, 185, 190, 193, 201 ], "yaxis": "y2", "ybingroup": "y" }, { "contours": { "coloring": "none" }, "hovertemplate": "Species=Adelie
Sex=FEMALE
Body Mass (g)=%{x}
Flipper Length (mm)=%{y}
count=%{z}", "legendgroup": "Adelie", "line": { "color": "#636efa" }, "name": "Adelie", "showlegend": false, "type": "histogram2dcontour", "x": [ 3800, 3250, 3450, 3625, 3200, 3700, 3450, 3325, 3400, 3800, 3800, 3200, 3150, 3250, 3300, 3325, 3550, 3300, 3150, 3100, 3000, 3450, 3500, 3450, 2900, 3550, 2850, 3150, 3600, 2850, 3350, 3050, 3600, 3550, 3700, 3700, 3550, 3200, 3800, 3350, 3500, 3600, 3550, 3400, 3300, 3700, 2900, 3725, 3075, 2925, 3750, 3175, 3825, 3200, 3900, 2900, 3350, 3150, 3450, 3050, 3275, 3050, 3325, 3500, 3425, 3175, 3400, 3400, 3050, 3000, 3475, 3450, 3700 ], "xaxis": "x", "xbingroup": "x", "y": [ 186, 195, 193, 181, 182, 185, 195, 184, 174, 189, 187, 187, 172, 178, 188, 195, 180, 181, 182, 186, 185, 190, 186, 190, 187, 186, 181, 185, 185, 184, 195, 190, 190, 196, 190, 191, 187, 189, 187, 191, 189, 190, 202, 185, 187, 190, 178, 192, 183, 193, 199, 181, 198, 193, 191, 188, 189, 187, 176, 186, 191, 191, 190, 193, 187, 191, 185, 193, 188, 192, 184, 195, 187 ], "yaxis": "y", "ybingroup": "y" }, { "contours": { "coloring": "none" }, "hovertemplate": "Species=Chinstrap
Sex=MALE
Body Mass (g)=%{x}
Flipper Length (mm)=%{y}
count=%{z}", "legendgroup": "Chinstrap", "line": { "color": "#EF553B" }, "name": "Chinstrap", "showlegend": true, "type": "histogram2dcontour", "x": [ 3900, 3650, 3725, 3750, 3700, 3775, 4050, 4050, 3300, 4400, 3400, 3800, 4150, 3800, 4550, 4300, 4100, 3600, 4800, 4500, 3950, 3550, 4450, 4300, 3250, 3950, 4050, 3450, 4050, 3800, 3950, 4000, 3775, 4100 ], "xaxis": "x2", "xbingroup": "x", "y": [ 196, 193, 197, 197, 198, 194, 201, 201, 197, 195, 191, 193, 197, 200, 205, 201, 203, 195, 210, 205, 210, 196, 201, 212, 187, 201, 203, 197, 203, 202, 206, 207, 193, 210 ], "yaxis": "y2", "ybingroup": "y" }, { "contours": { "coloring": "none" }, "hovertemplate": "Species=Chinstrap
Sex=FEMALE
Body Mass (g)=%{x}
Flipper Length (mm)=%{y}
count=%{z}", "legendgroup": "Chinstrap", "line": { "color": "#EF553B" }, "name": "Chinstrap", "showlegend": false, "type": "histogram2dcontour", "x": [ 3500, 3525, 3950, 3250, 4150, 3800, 3700, 3575, 3700, 3450, 3600, 2900, 3300, 3400, 3700, 3200, 3350, 3900, 3850, 2700, 3650, 3500, 3675, 3400, 3675, 3325, 3600, 3350, 3250, 3525, 3650, 3650, 3400, 3775 ], "xaxis": "x", "xbingroup": "x", "y": [ 192, 188, 198, 178, 195, 193, 185, 190, 181, 190, 181, 187, 195, 200, 191, 187, 187, 199, 195, 192, 187, 196, 196, 190, 198, 199, 193, 187, 191, 194, 189, 195, 202, 198 ], "yaxis": "y", "ybingroup": "y" }, { "contours": { "coloring": "none" }, "hovertemplate": "Species=Gentoo
Sex=MALE
Body Mass (g)=%{x}
Flipper Length (mm)=%{y}
count=%{z}", "legendgroup": "Gentoo", "line": { "color": "#00cc96" }, "name": "Gentoo", "showlegend": true, "type": "histogram2dcontour", "x": [ 5700, 5700, 5400, 5200, 5150, 5550, 5850, 5850, 6300, 5350, 5700, 5050, 5100, 5650, 5550, 5250, 6050, 5400, 5250, 5350, 5700, 4750, 5550, 5400, 5300, 5300, 5000, 5050, 5000, 5550, 5300, 5650, 5700, 5800, 5550, 5000, 5100, 5800, 6000, 5950, 5450, 5350, 5600, 5300, 5550, 5400, 5650, 5200, 4925, 5250, 5600, 5500, 5500, 5500, 5500, 5950, 5500, 5850, 6000, 5750, 5400 ], "xaxis": "x2", "xbingroup": "x", "y": [ 230, 218, 215, 219, 215, 216, 213, 217, 221, 222, 218, 215, 215, 215, 220, 222, 230, 220, 219, 208, 225, 216, 222, 225, 215, 220, 225, 220, 220, 224, 221, 231, 230, 229, 223, 221, 221, 230, 220, 223, 221, 224, 228, 218, 230, 228, 224, 226, 216, 225, 228, 228, 215, 219, 209, 229, 230, 230, 222, 222, 213 ], "yaxis": "y2", "ybingroup": "y" }, { "contours": { "coloring": "none" }, "hovertemplate": "Species=Gentoo
Sex=FEMALE
Body Mass (g)=%{x}
Flipper Length (mm)=%{y}
count=%{z}", "legendgroup": "Gentoo", "line": { "color": "#00cc96" }, "name": "Gentoo", "showlegend": false, "type": "histogram2dcontour", "x": [ 4500, 4450, 4550, 4800, 4400, 4650, 4650, 4200, 4150, 4800, 5000, 4400, 5000, 4600, 4700, 5050, 5150, 4950, 4350, 3950, 4300, 4900, 4200, 5100, 4850, 4400, 4900, 4300, 4450, 4200, 4400, 4700, 4700, 4750, 5200, 4700, 4600, 4750, 4625, 4725, 4750, 4600, 4875, 4950, 4750, 4850, 4875, 4625, 4850, 4975, 4700, 4575, 5000, 4650, 4375, 4925, 4850, 5200 ], "xaxis": "x", "xbingroup": "x", "y": [ 211, 210, 210, 211, 209, 214, 214, 210, 210, 209, 215, 213, 215, 210, 209, 207, 220, 213, 208, 208, 210, 217, 210, 213, 210, 210, 217, 208, 208, 208, 214, 219, 220, 216, 217, 216, 209, 215, 212, 212, 212, 218, 212, 218, 212, 214, 222, 203, 219, 215, 210, 208, 216, 213, 217, 214, 215, 212 ], "yaxis": "y", "ybingroup": "y" } ], "layout": { "annotations": [ { "font": {}, "showarrow": false, "text": "Sex=FEMALE", "textangle": 90, "x": 0.98, "xanchor": "left", "xref": "paper", "y": 0.2425, "yanchor": "middle", "yref": "paper" }, { "font": {}, "showarrow": false, "text": "Sex=MALE", "textangle": 90, "x": 0.98, "xanchor": "left", "xref": "paper", "y": 0.7575000000000001, "yanchor": "middle", "yref": "paper" } ], "legend": { "title": { "text": "Species" }, "tracegroupgap": 0 }, "margin": { "b": 0, "l": 0, "r": 50, "t": 0 }, "template": { "data": { "bar": [ { "error_x": { "color": "#2a3f5f" }, "error_y": { "color": "#2a3f5f" }, "marker": { "line": { "color": "white", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "bar" } ], "barpolar": [ { "marker": { "line": { "color": "white", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "barpolar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#2a3f5f", "gridcolor": "#C8D4E3", "linecolor": "#C8D4E3", "minorgridcolor": "#C8D4E3", "startlinecolor": "#2a3f5f" }, "baxis": { "endlinecolor": "#2a3f5f", "gridcolor": "#C8D4E3", "linecolor": "#C8D4E3", "minorgridcolor": "#C8D4E3", "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": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter" } ], "scatter3d": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter3d" } ], "scattercarpet": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattercarpet" } ], "scattergeo": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergeo" } ], "scattergl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergl" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#EBF0F8" }, "line": { "color": "white" } }, "header": { "fill": { "color": "#C8D4E3" }, "line": { "color": "white" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#2a3f5f", "arrowhead": 0, "arrowwidth": 1 }, "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": "white", "showlakes": true, "showland": true, "subunitcolor": "#C8D4E3" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "light" }, "paper_bgcolor": "white", "plot_bgcolor": "white", "polar": { "angularaxis": { "gridcolor": "#EBF0F8", "linecolor": "#EBF0F8", "ticks": "" }, "bgcolor": "white", "radialaxis": { "gridcolor": "#EBF0F8", "linecolor": "#EBF0F8", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "white", "gridcolor": "#DFE8F3", "gridwidth": 2, "linecolor": "#EBF0F8", "showbackground": true, "ticks": "", "zerolinecolor": "#EBF0F8" }, "yaxis": { "backgroundcolor": "white", "gridcolor": "#DFE8F3", "gridwidth": 2, "linecolor": "#EBF0F8", "showbackground": true, "ticks": "", "zerolinecolor": "#EBF0F8" }, "zaxis": { "backgroundcolor": "white", "gridcolor": "#DFE8F3", "gridwidth": 2, "linecolor": "#EBF0F8", "showbackground": true, "ticks": "", "zerolinecolor": "#EBF0F8" } }, "shapedefaults": { "line": { "color": "#2a3f5f" } }, "ternary": { "aaxis": { "gridcolor": "#DFE8F3", "linecolor": "#A2B1C6", "ticks": "" }, "baxis": { "gridcolor": "#DFE8F3", "linecolor": "#A2B1C6", "ticks": "" }, "bgcolor": "white", "caxis": { "gridcolor": "#DFE8F3", "linecolor": "#A2B1C6", "ticks": "" } }, "title": { "x": 0.05 }, "xaxis": { "automargin": true, "gridcolor": "#EBF0F8", "linecolor": "#EBF0F8", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "#EBF0F8", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "#EBF0F8", "linecolor": "#EBF0F8", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "#EBF0F8", "zerolinewidth": 2 } } }, "xaxis": { "anchor": "y", "domain": [ 0, 0.98 ], "title": { "text": "Body Mass (g)" } }, "xaxis2": { "anchor": "y2", "domain": [ 0, 0.98 ], "matches": "x", "showticklabels": false }, "yaxis": { "anchor": "x", "domain": [ 0, 0.485 ], "title": { "text": "Flipper Length (mm)" } }, "yaxis2": { "anchor": "x2", "domain": [ 0.515, 1 ], "matches": "y", "title": { "text": "Flipper Length (mm)" } } } }, "text/html": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "fig = px.density_contour(penguins, \n", " x = \"Body Mass (g)\", \n", " y = \"Flipper Length (mm)\",\n", " facet_row = \"Sex\",\n", " color = \"Species\")\n", "\n", "fig.update_layout(margin={\"r\":50,\"t\":0,\"l\":0,\"b\":0})\n", "fig.show()" ] }, { "cell_type": "markdown", "id": "increasing-pearl", "metadata": {}, "source": [ "## Fancy Stuff\n", "\n", "Sometimes, we'd like to show relationships between many variables at once. In such cases, standard 2d plots can feel restrictive, and we might seek more complicated plot types. This is sometimes productive, but it's important not to chase complexity for its own sake. \n", "\n", "### 3d Scatterplots" ] }, { "cell_type": "code", "execution_count": 15, "id": "intimate-liechtenstein", "metadata": {}, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "hovertemplate": "Species=Adelie
Body Mass (g)=%{x}
Culmen Length (mm)=%{y}
Culmen Depth (mm)=%{z}", "legendgroup": "Adelie", "marker": { "color": "#636efa", "opacity": 0.5, "symbol": "circle" }, "mode": "markers", "name": "Adelie", "scene": "scene", "showlegend": true, "type": "scatter3d", "x": [ 3750, 3800, 3250, 3450, 3650, 3625, 4675, 3200, 3800, 4400, 3700, 3450, 4500, 3325, 4200, 3400, 3600, 3800, 3950, 3800, 3800, 3550, 3200, 3150, 3950, 3250, 3900, 3300, 3900, 3325, 4150, 3950, 3550, 3300, 4650, 3150, 3900, 3100, 4400, 3000, 4600, 3425, 3450, 4150, 3500, 4300, 3450, 4050, 2900, 3700, 3550, 3800, 2850, 3750, 3150, 4400, 3600, 4050, 2850, 3950, 3350, 4100, 3050, 4450, 3600, 3900, 3550, 4150, 3700, 4250, 3700, 3900, 3550, 4000, 3200, 4700, 3800, 4200, 3350, 3550, 3800, 3500, 3950, 3600, 3550, 4300, 3400, 4450, 3300, 4300, 3700, 4350, 2900, 4100, 3725, 4725, 3075, 4250, 2925, 3550, 3750, 3900, 3175, 4775, 3825, 4600, 3200, 4275, 3900, 4075, 2900, 3775, 3350, 3325, 3150, 3500, 3450, 3875, 3050, 4000, 3275, 4300, 3050, 4000, 3325, 3500, 3500, 4475, 3425, 3900, 3175, 3975, 3400, 4250, 3400, 3475, 3050, 3725, 3000, 3650, 4250, 3475, 3450, 3750, 3700, 4000 ], "y": [ 39.1, 39.5, 40.3, 36.7, 39.3, 38.9, 39.2, 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, 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 ], "z": [ 18.7, 17.4, 18, 19.3, 20.6, 17.8, 19.6, 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, 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 ] }, { "hovertemplate": "Species=Chinstrap
Body Mass (g)=%{x}
Culmen Length (mm)=%{y}
Culmen Depth (mm)=%{z}", "legendgroup": "Chinstrap", "marker": { "color": "#EF553B", "opacity": 0.5, "symbol": "circle" }, "mode": "markers", "name": "Chinstrap", "scene": "scene", "showlegend": true, "type": "scatter3d", "x": [ 3500, 3900, 3650, 3525, 3725, 3950, 3250, 3750, 4150, 3700, 3800, 3775, 3700, 4050, 3575, 4050, 3300, 3700, 3450, 4400, 3600, 3400, 2900, 3800, 3300, 4150, 3400, 3800, 3700, 4550, 3200, 4300, 3350, 4100, 3600, 3900, 3850, 4800, 2700, 4500, 3950, 3650, 3550, 3500, 3675, 4450, 3400, 4300, 3250, 3675, 3325, 3950, 3600, 4050, 3350, 3450, 3250, 4050, 3800, 3525, 3950, 3650, 3650, 4000, 3400, 3775, 4100, 3775 ], "y": [ 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 ], "z": [ 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 ] }, { "hovertemplate": "Species=Gentoo
Body Mass (g)=%{x}
Culmen Length (mm)=%{y}
Culmen Depth (mm)=%{z}", "legendgroup": "Gentoo", "marker": { "color": "#00cc96", "opacity": 0.5, "symbol": "circle" }, "mode": "markers", "name": "Gentoo", "scene": "scene", "showlegend": true, "type": "scatter3d", "x": [ 4500, 5700, 4450, 5700, 5400, 4550, 4800, 5200, 4400, 5150, 4650, 5550, 4650, 5850, 4200, 5850, 4150, 6300, 4800, 5350, 5700, 5000, 4400, 5050, 5000, 5100, 5650, 4600, 5550, 5250, 4700, 5050, 6050, 5150, 5400, 4950, 5250, 4350, 5350, 3950, 5700, 4300, 4750, 5550, 4900, 4200, 5400, 5100, 5300, 4850, 5300, 4400, 5000, 4900, 5050, 4300, 5000, 4450, 5550, 4200, 5300, 4400, 5650, 4700, 5700, 5800, 4700, 5550, 4750, 5000, 5100, 5200, 4700, 5800, 4600, 6000, 4750, 5950, 4625, 5450, 4725, 5350, 4750, 5600, 4600, 5300, 4875, 5550, 4950, 5400, 4750, 5650, 4850, 5200, 4925, 4875, 4625, 5250, 4850, 5600, 4975, 5500, 5500, 4700, 5500, 4575, 5500, 5000, 5950, 4650, 5500, 4375, 5850, 6000, 4925, 4850, 5750, 5200, 5400 ], "y": [ 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, 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, 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, 46.8, 41.7, 53.4, 43.3, 48.1, 50.5, 49.8, 43.5, 51.5, 46.2, 55.1, 48.8, 47.2, 46.8, 50.4, 45.2, 49.9 ], "z": [ 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, 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, 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, 16.1, 14.7, 15.8, 14, 15.1, 15.2, 15.9, 15.2, 16.3, 14.1, 16, 16.2, 13.7, 14.3, 15.7, 14.8, 16.1 ] } ], "layout": { "legend": { "title": { "text": "Species" }, "tracegroupgap": 0 }, "margin": { "b": 0, "l": 0, "r": 0, "t": 0 }, "scene": { "domain": { "x": [ 0, 1 ], "y": [ 0, 1 ] }, "xaxis": { "title": { "text": "Body Mass (g)" } }, "yaxis": { "title": { "text": "Culmen Length (mm)" } }, "zaxis": { "title": { "text": "Culmen Depth (mm)" } } }, "template": { "data": { "bar": [ { "error_x": { "color": "#2a3f5f" }, "error_y": { "color": "#2a3f5f" }, "marker": { "line": { "color": "white", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "bar" } ], "barpolar": [ { "marker": { "line": { "color": "white", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "barpolar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#2a3f5f", "gridcolor": "#C8D4E3", "linecolor": "#C8D4E3", "minorgridcolor": "#C8D4E3", "startlinecolor": "#2a3f5f" }, "baxis": { "endlinecolor": "#2a3f5f", "gridcolor": "#C8D4E3", "linecolor": "#C8D4E3", "minorgridcolor": "#C8D4E3", "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": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter" } ], "scatter3d": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter3d" } ], "scattercarpet": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattercarpet" } ], "scattergeo": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergeo" } ], "scattergl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergl" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#EBF0F8" }, "line": { "color": "white" } }, "header": { "fill": { "color": "#C8D4E3" }, "line": { "color": "white" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#2a3f5f", "arrowhead": 0, "arrowwidth": 1 }, "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": "white", "showlakes": true, "showland": true, "subunitcolor": "#C8D4E3" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "light" }, "paper_bgcolor": "white", "plot_bgcolor": "white", "polar": { "angularaxis": { "gridcolor": "#EBF0F8", "linecolor": "#EBF0F8", "ticks": "" }, "bgcolor": "white", "radialaxis": { "gridcolor": "#EBF0F8", "linecolor": "#EBF0F8", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "white", "gridcolor": "#DFE8F3", "gridwidth": 2, "linecolor": "#EBF0F8", "showbackground": true, "ticks": "", "zerolinecolor": "#EBF0F8" }, "yaxis": { "backgroundcolor": "white", "gridcolor": "#DFE8F3", "gridwidth": 2, "linecolor": "#EBF0F8", "showbackground": true, "ticks": "", "zerolinecolor": "#EBF0F8" }, "zaxis": { "backgroundcolor": "white", "gridcolor": "#DFE8F3", "gridwidth": 2, "linecolor": "#EBF0F8", "showbackground": true, "ticks": "", "zerolinecolor": "#EBF0F8" } }, "shapedefaults": { "line": { "color": "#2a3f5f" } }, "ternary": { "aaxis": { "gridcolor": "#DFE8F3", "linecolor": "#A2B1C6", "ticks": "" }, "baxis": { "gridcolor": "#DFE8F3", "linecolor": "#A2B1C6", "ticks": "" }, "bgcolor": "white", "caxis": { "gridcolor": "#DFE8F3", "linecolor": "#A2B1C6", "ticks": "" } }, "title": { "x": 0.05 }, "xaxis": { "automargin": true, "gridcolor": "#EBF0F8", "linecolor": "#EBF0F8", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "#EBF0F8", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "#EBF0F8", "linecolor": "#EBF0F8", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "#EBF0F8", "zerolinewidth": 2 } } } } }, "text/html": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "fig = px.scatter_3d(penguins,\n", " x = \"Body Mass (g)\",\n", " y = \"Culmen Length (mm)\",\n", " z = \"Culmen Depth (mm)\",\n", " color = \"Species\",\n", " opacity = 0.5)\n", "\n", "fig.update_layout(margin={\"r\":0,\"t\":0,\"l\":0,\"b\":0})\n", "fig.show()" ] }, { "cell_type": "markdown", "id": "dietary-advocacy", "metadata": {}, "source": [ "## Alluvial Diagrams\n", "\n", "Alluvial diagrams can be used to compare tabulations of categorical variables. " ] }, { "cell_type": "code", "execution_count": 16, "id": "foreign-despite", "metadata": {}, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "dimensions": [ { "label": "Species", "values": [ "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", "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", "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" ] }, { "label": "Island", "values": [ "Torgersen", "Torgersen", "Torgersen", "Torgersen", "Torgersen", "Torgersen", "Torgersen", "Torgersen", "Torgersen", "Torgersen", "Torgersen", "Torgersen", "Torgersen", "Torgersen", "Torgersen", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Torgersen", "Torgersen", "Torgersen", "Torgersen", "Torgersen", "Torgersen", "Torgersen", "Torgersen", "Torgersen", "Torgersen", "Torgersen", "Torgersen", "Torgersen", "Torgersen", "Torgersen", "Torgersen", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Torgersen", "Torgersen", "Torgersen", "Torgersen", "Torgersen", "Torgersen", "Torgersen", "Torgersen", "Torgersen", "Torgersen", "Torgersen", "Torgersen", "Torgersen", "Torgersen", "Torgersen", "Torgersen", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Dream", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe", "Biscoe" ] }, { "label": "Sex", "values": [ "MALE", "FEMALE", "FEMALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "MALE", "FEMALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "MALE", "FEMALE", "MALE", "FEMALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "MALE", "FEMALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "MALE", "FEMALE", "MALE", "FEMALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "MALE", "FEMALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "MALE", "FEMALE", "MALE", "FEMALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "MALE", "FEMALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "MALE", "FEMALE", "FEMALE", "MALE", "FEMALE", "MALE", "MALE", "FEMALE", "MALE", "FEMALE", "FEMALE", "MALE", "FEMALE", "MALE", "MALE", "FEMALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "MALE", "FEMALE", "MALE", "FEMALE", "FEMALE", "MALE", "FEMALE", "MALE", "MALE", "FEMALE", "FEMALE", "MALE", "FEMALE", "MALE", "MALE", "FEMALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "MALE", "FEMALE", "FEMALE", "MALE", "FEMALE", "MALE", "MALE", "FEMALE", "MALE", "MALE", "FEMALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "MALE", "FEMALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "MALE", "FEMALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "MALE", "FEMALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "FEMALE", "MALE", "MALE", "FEMALE", "FEMALE", "MALE", "FEMALE", "MALE" ] } ], "domain": { "x": [ 0, 1 ], "y": [ 0, 1 ] }, "line": { "color": [ "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#2a9d8f", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e9c46a", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51", "#e76f51" ], "coloraxis": "coloraxis" }, "name": "", "type": "parcats" } ], "layout": { "coloraxis": { "colorbar": { "title": { "text": "color" } }, "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" ] ] }, "height": 300, "legend": { "tracegroupgap": 0 }, "margin": { "b": 0, "l": 20, "r": 20, "t": 0 }, "template": { "data": { "bar": [ { "error_x": { "color": "#2a3f5f" }, "error_y": { "color": "#2a3f5f" }, "marker": { "line": { "color": "white", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "bar" } ], "barpolar": [ { "marker": { "line": { "color": "white", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "barpolar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#2a3f5f", "gridcolor": "#C8D4E3", "linecolor": "#C8D4E3", "minorgridcolor": "#C8D4E3", "startlinecolor": "#2a3f5f" }, "baxis": { "endlinecolor": "#2a3f5f", "gridcolor": "#C8D4E3", "linecolor": "#C8D4E3", "minorgridcolor": "#C8D4E3", "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": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter" } ], "scatter3d": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter3d" } ], "scattercarpet": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattercarpet" } ], "scattergeo": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergeo" } ], "scattergl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergl" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#EBF0F8" }, "line": { "color": "white" } }, "header": { "fill": { "color": "#C8D4E3" }, "line": { "color": "white" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#2a3f5f", "arrowhead": 0, "arrowwidth": 1 }, "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": "white", "showlakes": true, "showland": true, "subunitcolor": "#C8D4E3" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "light" }, "paper_bgcolor": "white", "plot_bgcolor": "white", "polar": { "angularaxis": { "gridcolor": "#EBF0F8", "linecolor": "#EBF0F8", "ticks": "" }, "bgcolor": "white", "radialaxis": { "gridcolor": "#EBF0F8", "linecolor": "#EBF0F8", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "white", "gridcolor": "#DFE8F3", "gridwidth": 2, "linecolor": "#EBF0F8", "showbackground": true, "ticks": "", "zerolinecolor": "#EBF0F8" }, "yaxis": { "backgroundcolor": "white", "gridcolor": "#DFE8F3", "gridwidth": 2, "linecolor": "#EBF0F8", "showbackground": true, "ticks": "", "zerolinecolor": "#EBF0F8" }, "zaxis": { "backgroundcolor": "white", "gridcolor": "#DFE8F3", "gridwidth": 2, "linecolor": "#EBF0F8", "showbackground": true, "ticks": "", "zerolinecolor": "#EBF0F8" } }, "shapedefaults": { "line": { "color": "#2a3f5f" } }, "ternary": { "aaxis": { "gridcolor": "#DFE8F3", "linecolor": "#A2B1C6", "ticks": "" }, "baxis": { "gridcolor": "#DFE8F3", "linecolor": "#A2B1C6", "ticks": "" }, "bgcolor": "white", "caxis": { "gridcolor": "#DFE8F3", "linecolor": "#A2B1C6", "ticks": "" } }, "title": { "x": 0.05 }, "xaxis": { "automargin": true, "gridcolor": "#EBF0F8", "linecolor": "#EBF0F8", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "#EBF0F8", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "#EBF0F8", "linecolor": "#EBF0F8", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "#EBF0F8", "zerolinewidth": 2 } } } } }, "text/html": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "colors = {\"Adelie\" : \"#2a9d8f\",\n", " \"Chinstrap\" : \"#e9c46a\",\n", " \"Gentoo\" : \"#e76f51\"}\n", "\n", "color_hex = penguins[\"Species\"].map(colors)\n", "fig = px.parallel_categories(penguins,\n", " dimensions = [\"Species\", \"Island\", \"Sex\"],\n", " color = color_hex,\n", " height = 300)\n", "\n", "fig.update_layout(margin={\"r\":20,\"t\":0,\"l\":20,\"b\":0})\n", "fig.show()" ] }, { "cell_type": "markdown", "id": "original-asbestos", "metadata": {}, "source": [ "This diagram makes it clear that Gentoo penguins are only found on Biscoe Island, and Gentoos are only found on Dream Island, while the sexes of penguins are approximately balanced for each species on each island. \n", "\n", "## Parallel Coordinates\n", "\n", "One can construct similar visualizations for quantitative variables. These are interesting and support quite entertaining filtering operations, but can also be somewhat challenging to give a clean \"look.\"" ] }, { "cell_type": "code", "execution_count": 17, "id": "native-burning", "metadata": {}, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "dimensions": [ { "label": "Culmen Depth (mm)", "values": [ 18.7, 17.4, 18, 19.3, 20.6, 17.8, 19.6, 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, 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, 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, 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, 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, 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, 16.1, 14.7, 15.8, 14, 15.1, 15.2, 15.9, 15.2, 16.3, 14.1, 16, 16.2, 13.7, 14.3, 15.7, 14.8, 16.1 ] }, { "label": "Culmen Length (mm)", "values": [ 39.1, 39.5, 40.3, 36.7, 39.3, 38.9, 39.2, 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, 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.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, 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, 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, 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, 46.8, 41.7, 53.4, 43.3, 48.1, 50.5, 49.8, 43.5, 51.5, 46.2, 55.1, 48.8, 47.2, 46.8, 50.4, 45.2, 49.9 ] }, { "label": "Flipper Length (mm)", "values": [ 181, 186, 195, 193, 190, 181, 195, 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, 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, 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, 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, 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, 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, 215, 210, 219, 208, 209, 216, 229, 213, 230, 217, 230, 222, 214, 215, 222, 212, 213 ] }, { "label": "Body Mass (g)", "values": [ 3750, 3800, 3250, 3450, 3650, 3625, 4675, 3200, 3800, 4400, 3700, 3450, 4500, 3325, 4200, 3400, 3600, 3800, 3950, 3800, 3800, 3550, 3200, 3150, 3950, 3250, 3900, 3300, 3900, 3325, 4150, 3950, 3550, 3300, 4650, 3150, 3900, 3100, 4400, 3000, 4600, 3425, 3450, 4150, 3500, 4300, 3450, 4050, 2900, 3700, 3550, 3800, 2850, 3750, 3150, 4400, 3600, 4050, 2850, 3950, 3350, 4100, 3050, 4450, 3600, 3900, 3550, 4150, 3700, 4250, 3700, 3900, 3550, 4000, 3200, 4700, 3800, 4200, 3350, 3550, 3800, 3500, 3950, 3600, 3550, 4300, 3400, 4450, 3300, 4300, 3700, 4350, 2900, 4100, 3725, 4725, 3075, 4250, 2925, 3550, 3750, 3900, 3175, 4775, 3825, 4600, 3200, 4275, 3900, 4075, 2900, 3775, 3350, 3325, 3150, 3500, 3450, 3875, 3050, 4000, 3275, 4300, 3050, 4000, 3325, 3500, 3500, 4475, 3425, 3900, 3175, 3975, 3400, 4250, 3400, 3475, 3050, 3725, 3000, 3650, 4250, 3475, 3450, 3750, 3700, 4000, 3500, 3900, 3650, 3525, 3725, 3950, 3250, 3750, 4150, 3700, 3800, 3775, 3700, 4050, 3575, 4050, 3300, 3700, 3450, 4400, 3600, 3400, 2900, 3800, 3300, 4150, 3400, 3800, 3700, 4550, 3200, 4300, 3350, 4100, 3600, 3900, 3850, 4800, 2700, 4500, 3950, 3650, 3550, 3500, 3675, 4450, 3400, 4300, 3250, 3675, 3325, 3950, 3600, 4050, 3350, 3450, 3250, 4050, 3800, 3525, 3950, 3650, 3650, 4000, 3400, 3775, 4100, 3775, 4500, 5700, 4450, 5700, 5400, 4550, 4800, 5200, 4400, 5150, 4650, 5550, 4650, 5850, 4200, 5850, 4150, 6300, 4800, 5350, 5700, 5000, 4400, 5050, 5000, 5100, 5650, 4600, 5550, 5250, 4700, 5050, 6050, 5150, 5400, 4950, 5250, 4350, 5350, 3950, 5700, 4300, 4750, 5550, 4900, 4200, 5400, 5100, 5300, 4850, 5300, 4400, 5000, 4900, 5050, 4300, 5000, 4450, 5550, 4200, 5300, 4400, 5650, 4700, 5700, 5800, 4700, 5550, 4750, 5000, 5100, 5200, 4700, 5800, 4600, 6000, 4750, 5950, 4625, 5450, 4725, 5350, 4750, 5600, 4600, 5300, 4875, 5550, 4950, 5400, 4750, 5650, 4850, 5200, 4925, 4875, 4625, 5250, 4850, 5600, 4975, 5500, 5500, 4700, 5500, 4575, 5500, 5000, 5950, 4650, 5500, 4375, 5850, 6000, 4925, 4850, 5750, 5200, 5400 ] } ], "domain": { "x": [ 0, 1 ], "y": [ 0, 1 ] }, "line": { "color": [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 ], "coloraxis": "coloraxis" }, "name": "", "type": "parcoords" } ], "layout": { "coloraxis": { "cmid": 2, "colorbar": { "title": { "text": "color" } }, "colorscale": [ [ 0, "rgb(0, 147, 146)" ], [ 0.16666666666666666, "rgb(114, 170, 161)" ], [ 0.3333333333333333, "rgb(177, 199, 179)" ], [ 0.5, "rgb(241, 234, 200)" ], [ 0.6666666666666666, "rgb(229, 185, 173)" ], [ 0.8333333333333334, "rgb(217, 137, 148)" ], [ 1, "rgb(208, 88, 126)" ] ] }, "height": 400, "legend": { "tracegroupgap": 0 }, "margin": { "t": 60 }, "template": { "data": { "bar": [ { "error_x": { "color": "#2a3f5f" }, "error_y": { "color": "#2a3f5f" }, "marker": { "line": { "color": "white", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "bar" } ], "barpolar": [ { "marker": { "line": { "color": "white", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "barpolar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#2a3f5f", "gridcolor": "#C8D4E3", "linecolor": "#C8D4E3", "minorgridcolor": "#C8D4E3", "startlinecolor": "#2a3f5f" }, "baxis": { "endlinecolor": "#2a3f5f", "gridcolor": "#C8D4E3", "linecolor": "#C8D4E3", "minorgridcolor": "#C8D4E3", "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": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter" } ], "scatter3d": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter3d" } ], "scattercarpet": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattercarpet" } ], "scattergeo": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergeo" } ], "scattergl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergl" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#EBF0F8" }, "line": { "color": "white" } }, "header": { "fill": { "color": "#C8D4E3" }, "line": { "color": "white" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#2a3f5f", "arrowhead": 0, "arrowwidth": 1 }, "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": "white", "showlakes": true, "showland": true, "subunitcolor": "#C8D4E3" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "light" }, "paper_bgcolor": "white", "plot_bgcolor": "white", "polar": { "angularaxis": { "gridcolor": "#EBF0F8", "linecolor": "#EBF0F8", "ticks": "" }, "bgcolor": "white", "radialaxis": { "gridcolor": "#EBF0F8", "linecolor": "#EBF0F8", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "white", "gridcolor": "#DFE8F3", "gridwidth": 2, "linecolor": "#EBF0F8", "showbackground": true, "ticks": "", "zerolinecolor": "#EBF0F8" }, "yaxis": { "backgroundcolor": "white", "gridcolor": "#DFE8F3", "gridwidth": 2, "linecolor": "#EBF0F8", "showbackground": true, "ticks": "", "zerolinecolor": "#EBF0F8" }, "zaxis": { "backgroundcolor": "white", "gridcolor": "#DFE8F3", "gridwidth": 2, "linecolor": "#EBF0F8", "showbackground": true, "ticks": "", "zerolinecolor": "#EBF0F8" } }, "shapedefaults": { "line": { "color": "#2a3f5f" } }, "ternary": { "aaxis": { "gridcolor": "#DFE8F3", "linecolor": "#A2B1C6", "ticks": "" }, "baxis": { "gridcolor": "#DFE8F3", "linecolor": "#A2B1C6", "ticks": "" }, "bgcolor": "white", "caxis": { "gridcolor": "#DFE8F3", "linecolor": "#A2B1C6", "ticks": "" } }, "title": { "x": 0.05 }, "xaxis": { "automargin": true, "gridcolor": "#EBF0F8", "linecolor": "#EBF0F8", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "#EBF0F8", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "#EBF0F8", "linecolor": "#EBF0F8", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "#EBF0F8", "zerolinewidth": 2 } } } } }, "text/html": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "spec_ids = penguins[\"Species\"].map({\"Adelie\" : 1,\n", " \"Chinstrap\" : 2,\n", " \"Gentoo\" : 3})\n", "\n", "fig = px.parallel_coordinates(penguins,\n", " dimensions = [\"Culmen Depth (mm)\",\n", " \"Culmen Length (mm)\",\n", " \"Flipper Length (mm)\", \n", " \"Body Mass (g)\"],\n", " color = spec_ids,\n", " color_continuous_scale=px.colors.diverging.Tealrose,\n", " color_continuous_midpoint=2,\n", " height = 400)\n", "\n", "fig.show()" ] }, { "cell_type": "markdown", "id": "artificial-university", "metadata": {}, "source": [ "After you've made your amazing plot, you can then save it as HTML and `include` it in your blog. " ] }, { "cell_type": "code", "execution_count": 18, "id": "guided-coaching", "metadata": {}, "outputs": [], "source": [ "from plotly.io import write_html\n", "write_html(fig, \"my_fancy_plot.html\")" ] }, { "cell_type": "markdown", "id": "indirect-sharp", "metadata": {}, "source": [ "## Takeaways For Today\n", "\n", "- Plotly Express makes it unreasonably easy to create attractive, sophisticated, and interactive data graphics. \n", "- Amidst all these tools, it's important to choose the one that's right for the story you want to tell -- if your story is simple, use a simple visualization. \n", "- Penguins are very good birds. " ] } ], "metadata": { "kernelspec": { "display_name": "Python [conda env:PIC16B] *", "language": "python", "name": "conda-env-PIC16B-py" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.11" }, "widgets": { "application/vnd.jupyter.widget-state+json": { "state": {}, "version_major": 2, "version_minor": 0 } } }, "nbformat": 4, "nbformat_minor": 5 }