{
"cells": [
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"from ipywidgets import interact\n",
"\n",
"import numpy as np\n",
"import pandas as pd\n",
"import plotly.express as px\n",
"import matplotlib.pyplot as plt\n",
"\n",
"%matplotlib inline"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Run Interact"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"def square(x):\n",
" return x * x"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "1e9fe531416e4f04a0272f9723628b31",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"interactive(children=(IntSlider(value=50, description='x', step=10), Output()), _dom_classes=('widget-interact…"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"interact(square, x=(0, 100, 10));"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"scrolled": false
},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" sepal lenght | \n",
" sapal width | \n",
" petal lenght | \n",
" petal width | \n",
" class | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 5.1 | \n",
" 3.5 | \n",
" 1.4 | \n",
" 0.2 | \n",
" Iris-setosa | \n",
"
\n",
" \n",
" 1 | \n",
" 4.9 | \n",
" 3.0 | \n",
" 1.4 | \n",
" 0.2 | \n",
" Iris-setosa | \n",
"
\n",
" \n",
" 2 | \n",
" 4.7 | \n",
" 3.2 | \n",
" 1.3 | \n",
" 0.2 | \n",
" Iris-setosa | \n",
"
\n",
" \n",
" 3 | \n",
" 4.6 | \n",
" 3.1 | \n",
" 1.5 | \n",
" 0.2 | \n",
" Iris-setosa | \n",
"
\n",
" \n",
" 4 | \n",
" 5.0 | \n",
" 3.6 | \n",
" 1.4 | \n",
" 0.2 | \n",
" Iris-setosa | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" sepal lenght sapal width petal lenght petal width class\n",
"0 5.1 3.5 1.4 0.2 Iris-setosa\n",
"1 4.9 3.0 1.4 0.2 Iris-setosa\n",
"2 4.7 3.2 1.3 0.2 Iris-setosa\n",
"3 4.6 3.1 1.5 0.2 Iris-setosa\n",
"4 5.0 3.6 1.4 0.2 Iris-setosa"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"uci = 'http://archive.ics.uci.edu/ml/machine-learning-databases/'\n",
"iris = pd.read_csv(uci + 'iris/iris.data', header=None,\n",
" names = ['sepal lenght', 'sapal width', \n",
" 'petal lenght', 'petal width',\n",
" 'class'])\n",
"iris[0:5]"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"scrolled": true
},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" sepal lenght | \n",
" sapal width | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 5.1 | \n",
" 3.5 | \n",
"
\n",
" \n",
" 1 | \n",
" 4.9 | \n",
" 3.0 | \n",
"
\n",
" \n",
" 2 | \n",
" 4.7 | \n",
" 3.2 | \n",
"
\n",
" \n",
" 3 | \n",
" 4.6 | \n",
" 3.1 | \n",
"
\n",
" \n",
" 4 | \n",
" 5.0 | \n",
" 3.6 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" sepal lenght sapal width\n",
"0 5.1 3.5\n",
"1 4.9 3.0\n",
"2 4.7 3.2\n",
"3 4.6 3.1\n",
"4 5.0 3.6"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"iris_fro = iris[0:5]\n",
"iris_sel = iris_fro[['sepal lenght','sapal width']]\n",
"iris_sel"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"scrolled": true
},
"outputs": [
{
"data": {
"text/html": [
" \n",
" "
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.plotly.v1+json": {
"config": {
"plotlyServerURL": "https://plot.ly"
},
"data": [
{
"hovertemplate": "sepal lenght=%{x}
sapal width=%{y}",
"legendgroup": "",
"marker": {
"color": "#636efa",
"symbol": "circle"
},
"mode": "markers",
"name": "",
"showlegend": false,
"type": "scatter",
"x": [
5.1,
4.9,
4.7,
4.6,
5
],
"xaxis": "x",
"y": [
3.5,
3,
3.2,
3.1,
3.6
],
"yaxis": "y"
}
],
"layout": {
"legend": {
"tracegroupgap": 0
},
"margin": {
"t": 60
},
"template": {
"data": {
"bar": [
{
"error_x": {
"color": "#2a3f5f"
},
"error_y": {
"color": "#2a3f5f"
},
"marker": {
"line": {
"color": "#E5ECF6",
"width": 0.5
}
},
"type": "bar"
}
],
"barpolar": [
{
"marker": {
"line": {
"color": "#E5ECF6",
"width": 0.5
}
},
"type": "barpolar"
}
],
"carpet": [
{
"aaxis": {
"endlinecolor": "#2a3f5f",
"gridcolor": "white",
"linecolor": "white",
"minorgridcolor": "white",
"startlinecolor": "#2a3f5f"
},
"baxis": {
"endlinecolor": "#2a3f5f",
"gridcolor": "white",
"linecolor": "white",
"minorgridcolor": "white",
"startlinecolor": "#2a3f5f"
},
"type": "carpet"
}
],
"choropleth": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "choropleth"
}
],
"contour": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "contour"
}
],
"contourcarpet": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "contourcarpet"
}
],
"heatmap": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "heatmap"
}
],
"heatmapgl": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "heatmapgl"
}
],
"histogram": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "histogram"
}
],
"histogram2d": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "histogram2d"
}
],
"histogram2dcontour": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "histogram2dcontour"
}
],
"mesh3d": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "mesh3d"
}
],
"parcoords": [
{
"line": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "parcoords"
}
],
"pie": [
{
"automargin": true,
"type": "pie"
}
],
"scatter": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatter"
}
],
"scatter3d": [
{
"line": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatter3d"
}
],
"scattercarpet": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattercarpet"
}
],
"scattergeo": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattergeo"
}
],
"scattergl": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattergl"
}
],
"scattermapbox": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattermapbox"
}
],
"scatterpolar": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterpolar"
}
],
"scatterpolargl": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterpolargl"
}
],
"scatterternary": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterternary"
}
],
"surface": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "surface"
}
],
"table": [
{
"cells": {
"fill": {
"color": "#EBF0F8"
},
"line": {
"color": "white"
}
},
"header": {
"fill": {
"color": "#C8D4E3"
},
"line": {
"color": "white"
}
},
"type": "table"
}
]
},
"layout": {
"annotationdefaults": {
"arrowcolor": "#2a3f5f",
"arrowhead": 0,
"arrowwidth": 1
},
"coloraxis": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"colorscale": {
"diverging": [
[
0,
"#8e0152"
],
[
0.1,
"#c51b7d"
],
[
0.2,
"#de77ae"
],
[
0.3,
"#f1b6da"
],
[
0.4,
"#fde0ef"
],
[
0.5,
"#f7f7f7"
],
[
0.6,
"#e6f5d0"
],
[
0.7,
"#b8e186"
],
[
0.8,
"#7fbc41"
],
[
0.9,
"#4d9221"
],
[
1,
"#276419"
]
],
"sequential": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"sequentialminus": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
]
},
"colorway": [
"#636efa",
"#EF553B",
"#00cc96",
"#ab63fa",
"#FFA15A",
"#19d3f3",
"#FF6692",
"#B6E880",
"#FF97FF",
"#FECB52"
],
"font": {
"color": "#2a3f5f"
},
"geo": {
"bgcolor": "white",
"lakecolor": "white",
"landcolor": "#E5ECF6",
"showlakes": true,
"showland": true,
"subunitcolor": "white"
},
"hoverlabel": {
"align": "left"
},
"hovermode": "closest",
"mapbox": {
"style": "light"
},
"paper_bgcolor": "white",
"plot_bgcolor": "#E5ECF6",
"polar": {
"angularaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"bgcolor": "#E5ECF6",
"radialaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
}
},
"scene": {
"xaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
},
"yaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
},
"zaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
}
},
"shapedefaults": {
"line": {
"color": "#2a3f5f"
}
},
"ternary": {
"aaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"baxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"bgcolor": "#E5ECF6",
"caxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
}
},
"title": {
"x": 0.05
},
"xaxis": {
"automargin": true,
"gridcolor": "white",
"linecolor": "white",
"ticks": "",
"title": {
"standoff": 15
},
"zerolinecolor": "white",
"zerolinewidth": 2
},
"yaxis": {
"automargin": true,
"gridcolor": "white",
"linecolor": "white",
"ticks": "",
"title": {
"standoff": 15
},
"zerolinecolor": "white",
"zerolinewidth": 2
}
}
},
"xaxis": {
"anchor": "y",
"domain": [
0,
1
],
"title": {
"text": "sepal lenght"
}
},
"yaxis": {
"anchor": "x",
"domain": [
0,
1
],
"title": {
"text": "sapal width"
}
}
}
},
"text/html": [
"\n",
" \n",
" \n",
"
\n",
" \n",
"
"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"px.scatter(iris_sel, x='sepal lenght', y='sapal width')"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"scrolled": true
},
"outputs": [
{
"data": {
"application/vnd.plotly.v1+json": {
"config": {
"plotlyServerURL": "https://plot.ly"
},
"data": [
{
"hovertemplate": "%{hovertext}
class=Iris-setosa
sepal lenght=%{x}
sapal width=%{y}",
"hovertext": [
1.4,
1.4,
1.3,
1.5,
1.4,
1.7,
1.4,
1.5,
1.4,
1.5,
1.5,
1.6,
1.4,
1.1,
1.2,
1.5,
1.3,
1.4,
1.7,
1.5,
1.7,
1.5,
1,
1.7,
1.9,
1.6,
1.6,
1.5,
1.4,
1.6,
1.6,
1.5,
1.5,
1.4,
1.5,
1.2,
1.3,
1.5,
1.3,
1.5,
1.3,
1.3,
1.3,
1.6,
1.9,
1.4,
1.6,
1.4,
1.5,
1.4
],
"legendgroup": "Iris-setosa",
"marker": {
"color": "#636efa",
"symbol": "circle"
},
"mode": "markers",
"name": "Iris-setosa",
"showlegend": true,
"type": "scatter",
"x": [
5.1,
4.9,
4.7,
4.6,
5,
5.4,
4.6,
5,
4.4,
4.9,
5.4,
4.8,
4.8,
4.3,
5.8,
5.7,
5.4,
5.1,
5.7,
5.1,
5.4,
5.1,
4.6,
5.1,
4.8,
5,
5,
5.2,
5.2,
4.7,
4.8,
5.4,
5.2,
5.5,
4.9,
5,
5.5,
4.9,
4.4,
5.1,
5,
4.5,
4.4,
5,
5.1,
4.8,
5.1,
4.6,
5.3,
5
],
"xaxis": "x",
"y": [
3.5,
3,
3.2,
3.1,
3.6,
3.9,
3.4,
3.4,
2.9,
3.1,
3.7,
3.4,
3,
3,
4,
4.4,
3.9,
3.5,
3.8,
3.8,
3.4,
3.7,
3.6,
3.3,
3.4,
3,
3.4,
3.5,
3.4,
3.2,
3.1,
3.4,
4.1,
4.2,
3.1,
3.2,
3.5,
3.1,
3,
3.4,
3.5,
2.3,
3.2,
3.5,
3.8,
3,
3.8,
3.2,
3.7,
3.3
],
"yaxis": "y"
},
{
"hovertemplate": "%{hovertext}
class=Iris-versicolor
sepal lenght=%{x}
sapal width=%{y}",
"hovertext": [
4.7,
4.5,
4.9,
4,
4.6,
4.5,
4.7,
3.3,
4.6,
3.9,
3.5,
4.2,
4,
4.7,
3.6,
4.4,
4.5,
4.1,
4.5,
3.9,
4.8,
4,
4.9,
4.7,
4.3,
4.4,
4.8,
5,
4.5,
3.5,
3.8,
3.7,
3.9,
5.1,
4.5,
4.5,
4.7,
4.4,
4.1,
4,
4.4,
4.6,
4,
3.3,
4.2,
4.2,
4.2,
4.3,
3,
4.1
],
"legendgroup": "Iris-versicolor",
"marker": {
"color": "#EF553B",
"symbol": "circle"
},
"mode": "markers",
"name": "Iris-versicolor",
"showlegend": true,
"type": "scatter",
"x": [
7,
6.4,
6.9,
5.5,
6.5,
5.7,
6.3,
4.9,
6.6,
5.2,
5,
5.9,
6,
6.1,
5.6,
6.7,
5.6,
5.8,
6.2,
5.6,
5.9,
6.1,
6.3,
6.1,
6.4,
6.6,
6.8,
6.7,
6,
5.7,
5.5,
5.5,
5.8,
6,
5.4,
6,
6.7,
6.3,
5.6,
5.5,
5.5,
6.1,
5.8,
5,
5.6,
5.7,
5.7,
6.2,
5.1,
5.7
],
"xaxis": "x",
"y": [
3.2,
3.2,
3.1,
2.3,
2.8,
2.8,
3.3,
2.4,
2.9,
2.7,
2,
3,
2.2,
2.9,
2.9,
3.1,
3,
2.7,
2.2,
2.5,
3.2,
2.8,
2.5,
2.8,
2.9,
3,
2.8,
3,
2.9,
2.6,
2.4,
2.4,
2.7,
2.7,
3,
3.4,
3.1,
2.3,
3,
2.5,
2.6,
3,
2.6,
2.3,
2.7,
3,
2.9,
2.9,
2.5,
2.8
],
"yaxis": "y"
},
{
"hovertemplate": "%{hovertext}
class=Iris-virginica
sepal lenght=%{x}
sapal width=%{y}",
"hovertext": [
6,
5.1,
5.9,
5.6,
5.8,
6.6,
4.5,
6.3,
5.8,
6.1,
5.1,
5.3,
5.5,
5,
5.1,
5.3,
5.5,
6.7,
6.9,
5,
5.7,
4.9,
6.7,
4.9,
5.7,
6,
4.8,
4.9,
5.6,
5.8,
6.1,
6.4,
5.6,
5.1,
5.6,
6.1,
5.6,
5.5,
4.8,
5.4,
5.6,
5.1,
5.1,
5.9,
5.7,
5.2,
5,
5.2,
5.4,
5.1
],
"legendgroup": "Iris-virginica",
"marker": {
"color": "#00cc96",
"symbol": "circle"
},
"mode": "markers",
"name": "Iris-virginica",
"showlegend": true,
"type": "scatter",
"x": [
6.3,
5.8,
7.1,
6.3,
6.5,
7.6,
4.9,
7.3,
6.7,
7.2,
6.5,
6.4,
6.8,
5.7,
5.8,
6.4,
6.5,
7.7,
7.7,
6,
6.9,
5.6,
7.7,
6.3,
6.7,
7.2,
6.2,
6.1,
6.4,
7.2,
7.4,
7.9,
6.4,
6.3,
6.1,
7.7,
6.3,
6.4,
6,
6.9,
6.7,
6.9,
5.8,
6.8,
6.7,
6.7,
6.3,
6.5,
6.2,
5.9
],
"xaxis": "x",
"y": [
3.3,
2.7,
3,
2.9,
3,
3,
2.5,
2.9,
2.5,
3.6,
3.2,
2.7,
3,
2.5,
2.8,
3.2,
3,
3.8,
2.6,
2.2,
3.2,
2.8,
2.8,
2.7,
3.3,
3.2,
2.8,
3,
2.8,
3,
2.8,
3.8,
2.8,
2.8,
2.6,
3,
3.4,
3.1,
3,
3.1,
3.1,
3.1,
2.7,
3.2,
3.3,
3,
2.5,
3,
3.4,
3
],
"yaxis": "y"
}
],
"layout": {
"legend": {
"title": {
"text": "class"
},
"tracegroupgap": 0
},
"margin": {
"t": 60
},
"template": {
"data": {
"bar": [
{
"error_x": {
"color": "#2a3f5f"
},
"error_y": {
"color": "#2a3f5f"
},
"marker": {
"line": {
"color": "#E5ECF6",
"width": 0.5
}
},
"type": "bar"
}
],
"barpolar": [
{
"marker": {
"line": {
"color": "#E5ECF6",
"width": 0.5
}
},
"type": "barpolar"
}
],
"carpet": [
{
"aaxis": {
"endlinecolor": "#2a3f5f",
"gridcolor": "white",
"linecolor": "white",
"minorgridcolor": "white",
"startlinecolor": "#2a3f5f"
},
"baxis": {
"endlinecolor": "#2a3f5f",
"gridcolor": "white",
"linecolor": "white",
"minorgridcolor": "white",
"startlinecolor": "#2a3f5f"
},
"type": "carpet"
}
],
"choropleth": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "choropleth"
}
],
"contour": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "contour"
}
],
"contourcarpet": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "contourcarpet"
}
],
"heatmap": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "heatmap"
}
],
"heatmapgl": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "heatmapgl"
}
],
"histogram": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "histogram"
}
],
"histogram2d": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "histogram2d"
}
],
"histogram2dcontour": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "histogram2dcontour"
}
],
"mesh3d": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "mesh3d"
}
],
"parcoords": [
{
"line": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "parcoords"
}
],
"pie": [
{
"automargin": true,
"type": "pie"
}
],
"scatter": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatter"
}
],
"scatter3d": [
{
"line": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatter3d"
}
],
"scattercarpet": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattercarpet"
}
],
"scattergeo": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattergeo"
}
],
"scattergl": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattergl"
}
],
"scattermapbox": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattermapbox"
}
],
"scatterpolar": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterpolar"
}
],
"scatterpolargl": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterpolargl"
}
],
"scatterternary": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterternary"
}
],
"surface": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "surface"
}
],
"table": [
{
"cells": {
"fill": {
"color": "#EBF0F8"
},
"line": {
"color": "white"
}
},
"header": {
"fill": {
"color": "#C8D4E3"
},
"line": {
"color": "white"
}
},
"type": "table"
}
]
},
"layout": {
"annotationdefaults": {
"arrowcolor": "#2a3f5f",
"arrowhead": 0,
"arrowwidth": 1
},
"coloraxis": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"colorscale": {
"diverging": [
[
0,
"#8e0152"
],
[
0.1,
"#c51b7d"
],
[
0.2,
"#de77ae"
],
[
0.3,
"#f1b6da"
],
[
0.4,
"#fde0ef"
],
[
0.5,
"#f7f7f7"
],
[
0.6,
"#e6f5d0"
],
[
0.7,
"#b8e186"
],
[
0.8,
"#7fbc41"
],
[
0.9,
"#4d9221"
],
[
1,
"#276419"
]
],
"sequential": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"sequentialminus": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
]
},
"colorway": [
"#636efa",
"#EF553B",
"#00cc96",
"#ab63fa",
"#FFA15A",
"#19d3f3",
"#FF6692",
"#B6E880",
"#FF97FF",
"#FECB52"
],
"font": {
"color": "#2a3f5f"
},
"geo": {
"bgcolor": "white",
"lakecolor": "white",
"landcolor": "#E5ECF6",
"showlakes": true,
"showland": true,
"subunitcolor": "white"
},
"hoverlabel": {
"align": "left"
},
"hovermode": "closest",
"mapbox": {
"style": "light"
},
"paper_bgcolor": "white",
"plot_bgcolor": "#E5ECF6",
"polar": {
"angularaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"bgcolor": "#E5ECF6",
"radialaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
}
},
"scene": {
"xaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
},
"yaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
},
"zaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
}
},
"shapedefaults": {
"line": {
"color": "#2a3f5f"
}
},
"ternary": {
"aaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"baxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"bgcolor": "#E5ECF6",
"caxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
}
},
"title": {
"x": 0.05
},
"xaxis": {
"automargin": true,
"gridcolor": "white",
"linecolor": "white",
"ticks": "",
"title": {
"standoff": 15
},
"zerolinecolor": "white",
"zerolinewidth": 2
},
"yaxis": {
"automargin": true,
"gridcolor": "white",
"linecolor": "white",
"ticks": "",
"title": {
"standoff": 15
},
"zerolinecolor": "white",
"zerolinewidth": 2
}
}
},
"xaxis": {
"anchor": "y",
"domain": [
0,
1
],
"title": {
"text": "sepal lenght"
}
},
"yaxis": {
"anchor": "x",
"domain": [
0,
1
],
"title": {
"text": "sapal width"
}
}
}
},
"text/html": [
"\n",
" \n",
" \n",
"
\n",
" \n",
"
"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"px.scatter(iris, x='sepal lenght', y='sapal width', color='class', hover_name='petal lenght')"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"scrolled": false
},
"outputs": [
{
"data": {
"application/vnd.plotly.v1+json": {
"config": {
"plotlyServerURL": "https://plot.ly"
},
"data": [
{
"hovertemplate": "%{hovertext}
sepal lenght=%{marker.color}
sapal width=%{y}",
"hovertext": [
1.4,
1.4,
1.3,
1.5,
1.4,
1.7,
1.4,
1.5,
1.4,
1.5,
1.5,
1.6,
1.4,
1.1,
1.2,
1.5,
1.3,
1.4,
1.7,
1.5,
1.7,
1.5,
1,
1.7,
1.9,
1.6,
1.6,
1.5,
1.4,
1.6,
1.6,
1.5,
1.5,
1.4,
1.5,
1.2,
1.3,
1.5,
1.3,
1.5,
1.3,
1.3,
1.3,
1.6,
1.9,
1.4,
1.6,
1.4,
1.5,
1.4,
4.7,
4.5,
4.9,
4,
4.6,
4.5,
4.7,
3.3,
4.6,
3.9,
3.5,
4.2,
4,
4.7,
3.6,
4.4,
4.5,
4.1,
4.5,
3.9,
4.8,
4,
4.9,
4.7,
4.3,
4.4,
4.8,
5,
4.5,
3.5,
3.8,
3.7,
3.9,
5.1,
4.5,
4.5,
4.7,
4.4,
4.1,
4,
4.4,
4.6,
4,
3.3,
4.2,
4.2,
4.2,
4.3,
3,
4.1,
6,
5.1,
5.9,
5.6,
5.8,
6.6,
4.5,
6.3,
5.8,
6.1,
5.1,
5.3,
5.5,
5,
5.1,
5.3,
5.5,
6.7,
6.9,
5,
5.7,
4.9,
6.7,
4.9,
5.7,
6,
4.8,
4.9,
5.6,
5.8,
6.1,
6.4,
5.6,
5.1,
5.6,
6.1,
5.6,
5.5,
4.8,
5.4,
5.6,
5.1,
5.1,
5.9,
5.7,
5.2,
5,
5.2,
5.4,
5.1
],
"legendgroup": "",
"marker": {
"color": [
5.1,
4.9,
4.7,
4.6,
5,
5.4,
4.6,
5,
4.4,
4.9,
5.4,
4.8,
4.8,
4.3,
5.8,
5.7,
5.4,
5.1,
5.7,
5.1,
5.4,
5.1,
4.6,
5.1,
4.8,
5,
5,
5.2,
5.2,
4.7,
4.8,
5.4,
5.2,
5.5,
4.9,
5,
5.5,
4.9,
4.4,
5.1,
5,
4.5,
4.4,
5,
5.1,
4.8,
5.1,
4.6,
5.3,
5,
7,
6.4,
6.9,
5.5,
6.5,
5.7,
6.3,
4.9,
6.6,
5.2,
5,
5.9,
6,
6.1,
5.6,
6.7,
5.6,
5.8,
6.2,
5.6,
5.9,
6.1,
6.3,
6.1,
6.4,
6.6,
6.8,
6.7,
6,
5.7,
5.5,
5.5,
5.8,
6,
5.4,
6,
6.7,
6.3,
5.6,
5.5,
5.5,
6.1,
5.8,
5,
5.6,
5.7,
5.7,
6.2,
5.1,
5.7,
6.3,
5.8,
7.1,
6.3,
6.5,
7.6,
4.9,
7.3,
6.7,
7.2,
6.5,
6.4,
6.8,
5.7,
5.8,
6.4,
6.5,
7.7,
7.7,
6,
6.9,
5.6,
7.7,
6.3,
6.7,
7.2,
6.2,
6.1,
6.4,
7.2,
7.4,
7.9,
6.4,
6.3,
6.1,
7.7,
6.3,
6.4,
6,
6.9,
6.7,
6.9,
5.8,
6.8,
6.7,
6.7,
6.3,
6.5,
6.2,
5.9
],
"coloraxis": "coloraxis",
"symbol": "circle"
},
"mode": "markers",
"name": "",
"showlegend": false,
"type": "scatter",
"x": [
5.1,
4.9,
4.7,
4.6,
5,
5.4,
4.6,
5,
4.4,
4.9,
5.4,
4.8,
4.8,
4.3,
5.8,
5.7,
5.4,
5.1,
5.7,
5.1,
5.4,
5.1,
4.6,
5.1,
4.8,
5,
5,
5.2,
5.2,
4.7,
4.8,
5.4,
5.2,
5.5,
4.9,
5,
5.5,
4.9,
4.4,
5.1,
5,
4.5,
4.4,
5,
5.1,
4.8,
5.1,
4.6,
5.3,
5,
7,
6.4,
6.9,
5.5,
6.5,
5.7,
6.3,
4.9,
6.6,
5.2,
5,
5.9,
6,
6.1,
5.6,
6.7,
5.6,
5.8,
6.2,
5.6,
5.9,
6.1,
6.3,
6.1,
6.4,
6.6,
6.8,
6.7,
6,
5.7,
5.5,
5.5,
5.8,
6,
5.4,
6,
6.7,
6.3,
5.6,
5.5,
5.5,
6.1,
5.8,
5,
5.6,
5.7,
5.7,
6.2,
5.1,
5.7,
6.3,
5.8,
7.1,
6.3,
6.5,
7.6,
4.9,
7.3,
6.7,
7.2,
6.5,
6.4,
6.8,
5.7,
5.8,
6.4,
6.5,
7.7,
7.7,
6,
6.9,
5.6,
7.7,
6.3,
6.7,
7.2,
6.2,
6.1,
6.4,
7.2,
7.4,
7.9,
6.4,
6.3,
6.1,
7.7,
6.3,
6.4,
6,
6.9,
6.7,
6.9,
5.8,
6.8,
6.7,
6.7,
6.3,
6.5,
6.2,
5.9
],
"xaxis": "x",
"y": [
3.5,
3,
3.2,
3.1,
3.6,
3.9,
3.4,
3.4,
2.9,
3.1,
3.7,
3.4,
3,
3,
4,
4.4,
3.9,
3.5,
3.8,
3.8,
3.4,
3.7,
3.6,
3.3,
3.4,
3,
3.4,
3.5,
3.4,
3.2,
3.1,
3.4,
4.1,
4.2,
3.1,
3.2,
3.5,
3.1,
3,
3.4,
3.5,
2.3,
3.2,
3.5,
3.8,
3,
3.8,
3.2,
3.7,
3.3,
3.2,
3.2,
3.1,
2.3,
2.8,
2.8,
3.3,
2.4,
2.9,
2.7,
2,
3,
2.2,
2.9,
2.9,
3.1,
3,
2.7,
2.2,
2.5,
3.2,
2.8,
2.5,
2.8,
2.9,
3,
2.8,
3,
2.9,
2.6,
2.4,
2.4,
2.7,
2.7,
3,
3.4,
3.1,
2.3,
3,
2.5,
2.6,
3,
2.6,
2.3,
2.7,
3,
2.9,
2.9,
2.5,
2.8,
3.3,
2.7,
3,
2.9,
3,
3,
2.5,
2.9,
2.5,
3.6,
3.2,
2.7,
3,
2.5,
2.8,
3.2,
3,
3.8,
2.6,
2.2,
3.2,
2.8,
2.8,
2.7,
3.3,
3.2,
2.8,
3,
2.8,
3,
2.8,
3.8,
2.8,
2.8,
2.6,
3,
3.4,
3.1,
3,
3.1,
3.1,
3.1,
2.7,
3.2,
3.3,
3,
2.5,
3,
3.4,
3
],
"yaxis": "y"
}
],
"layout": {
"coloraxis": {
"colorbar": {
"title": {
"text": "sepal lenght"
}
},
"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": {
"t": 60
},
"template": {
"data": {
"bar": [
{
"error_x": {
"color": "#2a3f5f"
},
"error_y": {
"color": "#2a3f5f"
},
"marker": {
"line": {
"color": "#E5ECF6",
"width": 0.5
}
},
"type": "bar"
}
],
"barpolar": [
{
"marker": {
"line": {
"color": "#E5ECF6",
"width": 0.5
}
},
"type": "barpolar"
}
],
"carpet": [
{
"aaxis": {
"endlinecolor": "#2a3f5f",
"gridcolor": "white",
"linecolor": "white",
"minorgridcolor": "white",
"startlinecolor": "#2a3f5f"
},
"baxis": {
"endlinecolor": "#2a3f5f",
"gridcolor": "white",
"linecolor": "white",
"minorgridcolor": "white",
"startlinecolor": "#2a3f5f"
},
"type": "carpet"
}
],
"choropleth": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "choropleth"
}
],
"contour": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "contour"
}
],
"contourcarpet": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "contourcarpet"
}
],
"heatmap": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "heatmap"
}
],
"heatmapgl": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "heatmapgl"
}
],
"histogram": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "histogram"
}
],
"histogram2d": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "histogram2d"
}
],
"histogram2dcontour": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "histogram2dcontour"
}
],
"mesh3d": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "mesh3d"
}
],
"parcoords": [
{
"line": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "parcoords"
}
],
"pie": [
{
"automargin": true,
"type": "pie"
}
],
"scatter": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatter"
}
],
"scatter3d": [
{
"line": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatter3d"
}
],
"scattercarpet": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattercarpet"
}
],
"scattergeo": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattergeo"
}
],
"scattergl": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattergl"
}
],
"scattermapbox": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattermapbox"
}
],
"scatterpolar": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterpolar"
}
],
"scatterpolargl": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterpolargl"
}
],
"scatterternary": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterternary"
}
],
"surface": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "surface"
}
],
"table": [
{
"cells": {
"fill": {
"color": "#EBF0F8"
},
"line": {
"color": "white"
}
},
"header": {
"fill": {
"color": "#C8D4E3"
},
"line": {
"color": "white"
}
},
"type": "table"
}
]
},
"layout": {
"annotationdefaults": {
"arrowcolor": "#2a3f5f",
"arrowhead": 0,
"arrowwidth": 1
},
"coloraxis": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"colorscale": {
"diverging": [
[
0,
"#8e0152"
],
[
0.1,
"#c51b7d"
],
[
0.2,
"#de77ae"
],
[
0.3,
"#f1b6da"
],
[
0.4,
"#fde0ef"
],
[
0.5,
"#f7f7f7"
],
[
0.6,
"#e6f5d0"
],
[
0.7,
"#b8e186"
],
[
0.8,
"#7fbc41"
],
[
0.9,
"#4d9221"
],
[
1,
"#276419"
]
],
"sequential": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"sequentialminus": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
]
},
"colorway": [
"#636efa",
"#EF553B",
"#00cc96",
"#ab63fa",
"#FFA15A",
"#19d3f3",
"#FF6692",
"#B6E880",
"#FF97FF",
"#FECB52"
],
"font": {
"color": "#2a3f5f"
},
"geo": {
"bgcolor": "white",
"lakecolor": "white",
"landcolor": "#E5ECF6",
"showlakes": true,
"showland": true,
"subunitcolor": "white"
},
"hoverlabel": {
"align": "left"
},
"hovermode": "closest",
"mapbox": {
"style": "light"
},
"paper_bgcolor": "white",
"plot_bgcolor": "#E5ECF6",
"polar": {
"angularaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"bgcolor": "#E5ECF6",
"radialaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
}
},
"scene": {
"xaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
},
"yaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
},
"zaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
}
},
"shapedefaults": {
"line": {
"color": "#2a3f5f"
}
},
"ternary": {
"aaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"baxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"bgcolor": "#E5ECF6",
"caxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
}
},
"title": {
"x": 0.05
},
"xaxis": {
"automargin": true,
"gridcolor": "white",
"linecolor": "white",
"ticks": "",
"title": {
"standoff": 15
},
"zerolinecolor": "white",
"zerolinewidth": 2
},
"yaxis": {
"automargin": true,
"gridcolor": "white",
"linecolor": "white",
"ticks": "",
"title": {
"standoff": 15
},
"zerolinecolor": "white",
"zerolinewidth": 2
}
}
},
"xaxis": {
"anchor": "y",
"domain": [
0,
1
],
"title": {
"text": "sepal lenght"
}
},
"yaxis": {
"anchor": "x",
"domain": [
0,
1
],
"title": {
"text": "sapal width"
}
}
}
},
"text/html": [
"\n",
" \n",
" \n",
"
\n",
" \n",
"
"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"px.scatter(iris, x='sepal lenght', y='sapal width', color='sepal lenght', hover_name='petal lenght')"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"scrolled": true
},
"outputs": [
{
"data": {
"application/vnd.plotly.v1+json": {
"config": {
"plotlyServerURL": "https://plot.ly"
},
"data": [
{
"hovertemplate": "%{hovertext}
class=Iris-setosa
sepal lenght=%{marker.size}
sapal width=%{y}",
"hovertext": [
0.2,
0.2,
0.2,
0.2,
0.2,
0.4,
0.3,
0.2,
0.2,
0.1,
0.2,
0.2,
0.1,
0.1,
0.2,
0.4,
0.4,
0.3,
0.3,
0.3,
0.2,
0.4,
0.2,
0.5,
0.2,
0.2,
0.4,
0.2,
0.2,
0.2,
0.2,
0.4,
0.1,
0.2,
0.1,
0.2,
0.2,
0.1,
0.2,
0.2,
0.3,
0.3,
0.2,
0.6,
0.4,
0.3,
0.2,
0.2,
0.2,
0.2
],
"legendgroup": "Iris-setosa",
"marker": {
"color": "#636efa",
"size": [
5.1,
4.9,
4.7,
4.6,
5,
5.4,
4.6,
5,
4.4,
4.9,
5.4,
4.8,
4.8,
4.3,
5.8,
5.7,
5.4,
5.1,
5.7,
5.1,
5.4,
5.1,
4.6,
5.1,
4.8,
5,
5,
5.2,
5.2,
4.7,
4.8,
5.4,
5.2,
5.5,
4.9,
5,
5.5,
4.9,
4.4,
5.1,
5,
4.5,
4.4,
5,
5.1,
4.8,
5.1,
4.6,
5.3,
5
],
"sizemode": "area",
"sizeref": 0.01975,
"symbol": "circle"
},
"mode": "markers",
"name": "Iris-setosa",
"showlegend": true,
"type": "scatter",
"x": [
5.1,
4.9,
4.7,
4.6,
5,
5.4,
4.6,
5,
4.4,
4.9,
5.4,
4.8,
4.8,
4.3,
5.8,
5.7,
5.4,
5.1,
5.7,
5.1,
5.4,
5.1,
4.6,
5.1,
4.8,
5,
5,
5.2,
5.2,
4.7,
4.8,
5.4,
5.2,
5.5,
4.9,
5,
5.5,
4.9,
4.4,
5.1,
5,
4.5,
4.4,
5,
5.1,
4.8,
5.1,
4.6,
5.3,
5
],
"xaxis": "x",
"y": [
3.5,
3,
3.2,
3.1,
3.6,
3.9,
3.4,
3.4,
2.9,
3.1,
3.7,
3.4,
3,
3,
4,
4.4,
3.9,
3.5,
3.8,
3.8,
3.4,
3.7,
3.6,
3.3,
3.4,
3,
3.4,
3.5,
3.4,
3.2,
3.1,
3.4,
4.1,
4.2,
3.1,
3.2,
3.5,
3.1,
3,
3.4,
3.5,
2.3,
3.2,
3.5,
3.8,
3,
3.8,
3.2,
3.7,
3.3
],
"yaxis": "y"
},
{
"hovertemplate": "%{hovertext}
class=Iris-versicolor
sepal lenght=%{marker.size}
sapal width=%{y}",
"hovertext": [
1.4,
1.5,
1.5,
1.3,
1.5,
1.3,
1.6,
1,
1.3,
1.4,
1,
1.5,
1,
1.4,
1.3,
1.4,
1.5,
1,
1.5,
1.1,
1.8,
1.3,
1.5,
1.2,
1.3,
1.4,
1.4,
1.7,
1.5,
1,
1.1,
1,
1.2,
1.6,
1.5,
1.6,
1.5,
1.3,
1.3,
1.3,
1.2,
1.4,
1.2,
1,
1.3,
1.2,
1.3,
1.3,
1.1,
1.3
],
"legendgroup": "Iris-versicolor",
"marker": {
"color": "#EF553B",
"size": [
7,
6.4,
6.9,
5.5,
6.5,
5.7,
6.3,
4.9,
6.6,
5.2,
5,
5.9,
6,
6.1,
5.6,
6.7,
5.6,
5.8,
6.2,
5.6,
5.9,
6.1,
6.3,
6.1,
6.4,
6.6,
6.8,
6.7,
6,
5.7,
5.5,
5.5,
5.8,
6,
5.4,
6,
6.7,
6.3,
5.6,
5.5,
5.5,
6.1,
5.8,
5,
5.6,
5.7,
5.7,
6.2,
5.1,
5.7
],
"sizemode": "area",
"sizeref": 0.01975,
"symbol": "circle"
},
"mode": "markers",
"name": "Iris-versicolor",
"showlegend": true,
"type": "scatter",
"x": [
7,
6.4,
6.9,
5.5,
6.5,
5.7,
6.3,
4.9,
6.6,
5.2,
5,
5.9,
6,
6.1,
5.6,
6.7,
5.6,
5.8,
6.2,
5.6,
5.9,
6.1,
6.3,
6.1,
6.4,
6.6,
6.8,
6.7,
6,
5.7,
5.5,
5.5,
5.8,
6,
5.4,
6,
6.7,
6.3,
5.6,
5.5,
5.5,
6.1,
5.8,
5,
5.6,
5.7,
5.7,
6.2,
5.1,
5.7
],
"xaxis": "x",
"y": [
3.2,
3.2,
3.1,
2.3,
2.8,
2.8,
3.3,
2.4,
2.9,
2.7,
2,
3,
2.2,
2.9,
2.9,
3.1,
3,
2.7,
2.2,
2.5,
3.2,
2.8,
2.5,
2.8,
2.9,
3,
2.8,
3,
2.9,
2.6,
2.4,
2.4,
2.7,
2.7,
3,
3.4,
3.1,
2.3,
3,
2.5,
2.6,
3,
2.6,
2.3,
2.7,
3,
2.9,
2.9,
2.5,
2.8
],
"yaxis": "y"
},
{
"hovertemplate": "%{hovertext}
class=Iris-virginica
sepal lenght=%{marker.size}
sapal width=%{y}",
"hovertext": [
2.5,
1.9,
2.1,
1.8,
2.2,
2.1,
1.7,
1.8,
1.8,
2.5,
2,
1.9,
2.1,
2,
2.4,
2.3,
1.8,
2.2,
2.3,
1.5,
2.3,
2,
2,
1.8,
2.1,
1.8,
1.8,
1.8,
2.1,
1.6,
1.9,
2,
2.2,
1.5,
1.4,
2.3,
2.4,
1.8,
1.8,
2.1,
2.4,
2.3,
1.9,
2.3,
2.5,
2.3,
1.9,
2,
2.3,
1.8
],
"legendgroup": "Iris-virginica",
"marker": {
"color": "#00cc96",
"size": [
6.3,
5.8,
7.1,
6.3,
6.5,
7.6,
4.9,
7.3,
6.7,
7.2,
6.5,
6.4,
6.8,
5.7,
5.8,
6.4,
6.5,
7.7,
7.7,
6,
6.9,
5.6,
7.7,
6.3,
6.7,
7.2,
6.2,
6.1,
6.4,
7.2,
7.4,
7.9,
6.4,
6.3,
6.1,
7.7,
6.3,
6.4,
6,
6.9,
6.7,
6.9,
5.8,
6.8,
6.7,
6.7,
6.3,
6.5,
6.2,
5.9
],
"sizemode": "area",
"sizeref": 0.01975,
"symbol": "circle"
},
"mode": "markers",
"name": "Iris-virginica",
"showlegend": true,
"type": "scatter",
"x": [
6.3,
5.8,
7.1,
6.3,
6.5,
7.6,
4.9,
7.3,
6.7,
7.2,
6.5,
6.4,
6.8,
5.7,
5.8,
6.4,
6.5,
7.7,
7.7,
6,
6.9,
5.6,
7.7,
6.3,
6.7,
7.2,
6.2,
6.1,
6.4,
7.2,
7.4,
7.9,
6.4,
6.3,
6.1,
7.7,
6.3,
6.4,
6,
6.9,
6.7,
6.9,
5.8,
6.8,
6.7,
6.7,
6.3,
6.5,
6.2,
5.9
],
"xaxis": "x",
"y": [
3.3,
2.7,
3,
2.9,
3,
3,
2.5,
2.9,
2.5,
3.6,
3.2,
2.7,
3,
2.5,
2.8,
3.2,
3,
3.8,
2.6,
2.2,
3.2,
2.8,
2.8,
2.7,
3.3,
3.2,
2.8,
3,
2.8,
3,
2.8,
3.8,
2.8,
2.8,
2.6,
3,
3.4,
3.1,
3,
3.1,
3.1,
3.1,
2.7,
3.2,
3.3,
3,
2.5,
3,
3.4,
3
],
"yaxis": "y"
}
],
"layout": {
"legend": {
"itemsizing": "constant",
"title": {
"text": "class"
},
"tracegroupgap": 0
},
"margin": {
"t": 60
},
"template": {
"data": {
"bar": [
{
"error_x": {
"color": "#2a3f5f"
},
"error_y": {
"color": "#2a3f5f"
},
"marker": {
"line": {
"color": "#E5ECF6",
"width": 0.5
}
},
"type": "bar"
}
],
"barpolar": [
{
"marker": {
"line": {
"color": "#E5ECF6",
"width": 0.5
}
},
"type": "barpolar"
}
],
"carpet": [
{
"aaxis": {
"endlinecolor": "#2a3f5f",
"gridcolor": "white",
"linecolor": "white",
"minorgridcolor": "white",
"startlinecolor": "#2a3f5f"
},
"baxis": {
"endlinecolor": "#2a3f5f",
"gridcolor": "white",
"linecolor": "white",
"minorgridcolor": "white",
"startlinecolor": "#2a3f5f"
},
"type": "carpet"
}
],
"choropleth": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "choropleth"
}
],
"contour": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "contour"
}
],
"contourcarpet": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "contourcarpet"
}
],
"heatmap": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "heatmap"
}
],
"heatmapgl": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "heatmapgl"
}
],
"histogram": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "histogram"
}
],
"histogram2d": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "histogram2d"
}
],
"histogram2dcontour": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "histogram2dcontour"
}
],
"mesh3d": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "mesh3d"
}
],
"parcoords": [
{
"line": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "parcoords"
}
],
"pie": [
{
"automargin": true,
"type": "pie"
}
],
"scatter": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatter"
}
],
"scatter3d": [
{
"line": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatter3d"
}
],
"scattercarpet": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattercarpet"
}
],
"scattergeo": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattergeo"
}
],
"scattergl": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattergl"
}
],
"scattermapbox": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattermapbox"
}
],
"scatterpolar": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterpolar"
}
],
"scatterpolargl": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterpolargl"
}
],
"scatterternary": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterternary"
}
],
"surface": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "surface"
}
],
"table": [
{
"cells": {
"fill": {
"color": "#EBF0F8"
},
"line": {
"color": "white"
}
},
"header": {
"fill": {
"color": "#C8D4E3"
},
"line": {
"color": "white"
}
},
"type": "table"
}
]
},
"layout": {
"annotationdefaults": {
"arrowcolor": "#2a3f5f",
"arrowhead": 0,
"arrowwidth": 1
},
"coloraxis": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"colorscale": {
"diverging": [
[
0,
"#8e0152"
],
[
0.1,
"#c51b7d"
],
[
0.2,
"#de77ae"
],
[
0.3,
"#f1b6da"
],
[
0.4,
"#fde0ef"
],
[
0.5,
"#f7f7f7"
],
[
0.6,
"#e6f5d0"
],
[
0.7,
"#b8e186"
],
[
0.8,
"#7fbc41"
],
[
0.9,
"#4d9221"
],
[
1,
"#276419"
]
],
"sequential": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"sequentialminus": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
]
},
"colorway": [
"#636efa",
"#EF553B",
"#00cc96",
"#ab63fa",
"#FFA15A",
"#19d3f3",
"#FF6692",
"#B6E880",
"#FF97FF",
"#FECB52"
],
"font": {
"color": "#2a3f5f"
},
"geo": {
"bgcolor": "white",
"lakecolor": "white",
"landcolor": "#E5ECF6",
"showlakes": true,
"showland": true,
"subunitcolor": "white"
},
"hoverlabel": {
"align": "left"
},
"hovermode": "closest",
"mapbox": {
"style": "light"
},
"paper_bgcolor": "white",
"plot_bgcolor": "#E5ECF6",
"polar": {
"angularaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"bgcolor": "#E5ECF6",
"radialaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
}
},
"scene": {
"xaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
},
"yaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
},
"zaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
}
},
"shapedefaults": {
"line": {
"color": "#2a3f5f"
}
},
"ternary": {
"aaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"baxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"bgcolor": "#E5ECF6",
"caxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
}
},
"title": {
"x": 0.05
},
"xaxis": {
"automargin": true,
"gridcolor": "white",
"linecolor": "white",
"ticks": "",
"title": {
"standoff": 15
},
"zerolinecolor": "white",
"zerolinewidth": 2
},
"yaxis": {
"automargin": true,
"gridcolor": "white",
"linecolor": "white",
"ticks": "",
"title": {
"standoff": 15
},
"zerolinecolor": "white",
"zerolinewidth": 2
}
}
},
"xaxis": {
"anchor": "y",
"domain": [
0,
1
],
"title": {
"text": "sepal lenght"
}
},
"yaxis": {
"anchor": "x",
"domain": [
0,
1
],
"title": {
"text": "sapal width"
}
}
}
},
"text/html": [
"\n",
" \n",
" \n",
"
\n",
" \n",
"
"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"px.scatter(iris, x='sepal lenght', y='sapal width', color='class', size='sepal lenght', hover_name='petal width')"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"scrolled": true
},
"outputs": [
{
"data": {
"application/vnd.plotly.v1+json": {
"config": {
"plotlyServerURL": "https://plot.ly"
},
"data": [
{
"hovertemplate": "class=Iris-setosa
sepal lenght=%{x}
petal lenght=%{y}
sapal width=%{z}",
"legendgroup": "Iris-setosa",
"marker": {
"color": "#636efa",
"symbol": "circle"
},
"mode": "markers",
"name": "Iris-setosa",
"scene": "scene",
"showlegend": true,
"type": "scatter3d",
"x": [
5.1,
4.9,
4.7,
4.6,
5,
5.4,
4.6,
5,
4.4,
4.9,
5.4,
4.8,
4.8,
4.3,
5.8,
5.7,
5.4,
5.1,
5.7,
5.1,
5.4,
5.1,
4.6,
5.1,
4.8,
5,
5,
5.2,
5.2,
4.7,
4.8,
5.4,
5.2,
5.5,
4.9,
5,
5.5,
4.9,
4.4,
5.1,
5,
4.5,
4.4,
5,
5.1,
4.8,
5.1,
4.6,
5.3,
5
],
"y": [
1.4,
1.4,
1.3,
1.5,
1.4,
1.7,
1.4,
1.5,
1.4,
1.5,
1.5,
1.6,
1.4,
1.1,
1.2,
1.5,
1.3,
1.4,
1.7,
1.5,
1.7,
1.5,
1,
1.7,
1.9,
1.6,
1.6,
1.5,
1.4,
1.6,
1.6,
1.5,
1.5,
1.4,
1.5,
1.2,
1.3,
1.5,
1.3,
1.5,
1.3,
1.3,
1.3,
1.6,
1.9,
1.4,
1.6,
1.4,
1.5,
1.4
],
"z": [
3.5,
3,
3.2,
3.1,
3.6,
3.9,
3.4,
3.4,
2.9,
3.1,
3.7,
3.4,
3,
3,
4,
4.4,
3.9,
3.5,
3.8,
3.8,
3.4,
3.7,
3.6,
3.3,
3.4,
3,
3.4,
3.5,
3.4,
3.2,
3.1,
3.4,
4.1,
4.2,
3.1,
3.2,
3.5,
3.1,
3,
3.4,
3.5,
2.3,
3.2,
3.5,
3.8,
3,
3.8,
3.2,
3.7,
3.3
]
},
{
"hovertemplate": "class=Iris-versicolor
sepal lenght=%{x}
petal lenght=%{y}
sapal width=%{z}",
"legendgroup": "Iris-versicolor",
"marker": {
"color": "#EF553B",
"symbol": "circle"
},
"mode": "markers",
"name": "Iris-versicolor",
"scene": "scene",
"showlegend": true,
"type": "scatter3d",
"x": [
7,
6.4,
6.9,
5.5,
6.5,
5.7,
6.3,
4.9,
6.6,
5.2,
5,
5.9,
6,
6.1,
5.6,
6.7,
5.6,
5.8,
6.2,
5.6,
5.9,
6.1,
6.3,
6.1,
6.4,
6.6,
6.8,
6.7,
6,
5.7,
5.5,
5.5,
5.8,
6,
5.4,
6,
6.7,
6.3,
5.6,
5.5,
5.5,
6.1,
5.8,
5,
5.6,
5.7,
5.7,
6.2,
5.1,
5.7
],
"y": [
4.7,
4.5,
4.9,
4,
4.6,
4.5,
4.7,
3.3,
4.6,
3.9,
3.5,
4.2,
4,
4.7,
3.6,
4.4,
4.5,
4.1,
4.5,
3.9,
4.8,
4,
4.9,
4.7,
4.3,
4.4,
4.8,
5,
4.5,
3.5,
3.8,
3.7,
3.9,
5.1,
4.5,
4.5,
4.7,
4.4,
4.1,
4,
4.4,
4.6,
4,
3.3,
4.2,
4.2,
4.2,
4.3,
3,
4.1
],
"z": [
3.2,
3.2,
3.1,
2.3,
2.8,
2.8,
3.3,
2.4,
2.9,
2.7,
2,
3,
2.2,
2.9,
2.9,
3.1,
3,
2.7,
2.2,
2.5,
3.2,
2.8,
2.5,
2.8,
2.9,
3,
2.8,
3,
2.9,
2.6,
2.4,
2.4,
2.7,
2.7,
3,
3.4,
3.1,
2.3,
3,
2.5,
2.6,
3,
2.6,
2.3,
2.7,
3,
2.9,
2.9,
2.5,
2.8
]
},
{
"hovertemplate": "class=Iris-virginica
sepal lenght=%{x}
petal lenght=%{y}
sapal width=%{z}",
"legendgroup": "Iris-virginica",
"marker": {
"color": "#00cc96",
"symbol": "circle"
},
"mode": "markers",
"name": "Iris-virginica",
"scene": "scene",
"showlegend": true,
"type": "scatter3d",
"x": [
6.3,
5.8,
7.1,
6.3,
6.5,
7.6,
4.9,
7.3,
6.7,
7.2,
6.5,
6.4,
6.8,
5.7,
5.8,
6.4,
6.5,
7.7,
7.7,
6,
6.9,
5.6,
7.7,
6.3,
6.7,
7.2,
6.2,
6.1,
6.4,
7.2,
7.4,
7.9,
6.4,
6.3,
6.1,
7.7,
6.3,
6.4,
6,
6.9,
6.7,
6.9,
5.8,
6.8,
6.7,
6.7,
6.3,
6.5,
6.2,
5.9
],
"y": [
6,
5.1,
5.9,
5.6,
5.8,
6.6,
4.5,
6.3,
5.8,
6.1,
5.1,
5.3,
5.5,
5,
5.1,
5.3,
5.5,
6.7,
6.9,
5,
5.7,
4.9,
6.7,
4.9,
5.7,
6,
4.8,
4.9,
5.6,
5.8,
6.1,
6.4,
5.6,
5.1,
5.6,
6.1,
5.6,
5.5,
4.8,
5.4,
5.6,
5.1,
5.1,
5.9,
5.7,
5.2,
5,
5.2,
5.4,
5.1
],
"z": [
3.3,
2.7,
3,
2.9,
3,
3,
2.5,
2.9,
2.5,
3.6,
3.2,
2.7,
3,
2.5,
2.8,
3.2,
3,
3.8,
2.6,
2.2,
3.2,
2.8,
2.8,
2.7,
3.3,
3.2,
2.8,
3,
2.8,
3,
2.8,
3.8,
2.8,
2.8,
2.6,
3,
3.4,
3.1,
3,
3.1,
3.1,
3.1,
2.7,
3.2,
3.3,
3,
2.5,
3,
3.4,
3
]
}
],
"layout": {
"legend": {
"title": {
"text": "class"
},
"tracegroupgap": 0
},
"margin": {
"t": 60
},
"scene": {
"domain": {
"x": [
0,
1
],
"y": [
0,
1
]
},
"xaxis": {
"title": {
"text": "sepal lenght"
}
},
"yaxis": {
"title": {
"text": "petal lenght"
}
},
"zaxis": {
"title": {
"text": "sapal width"
}
}
},
"template": {
"data": {
"bar": [
{
"error_x": {
"color": "#2a3f5f"
},
"error_y": {
"color": "#2a3f5f"
},
"marker": {
"line": {
"color": "#E5ECF6",
"width": 0.5
}
},
"type": "bar"
}
],
"barpolar": [
{
"marker": {
"line": {
"color": "#E5ECF6",
"width": 0.5
}
},
"type": "barpolar"
}
],
"carpet": [
{
"aaxis": {
"endlinecolor": "#2a3f5f",
"gridcolor": "white",
"linecolor": "white",
"minorgridcolor": "white",
"startlinecolor": "#2a3f5f"
},
"baxis": {
"endlinecolor": "#2a3f5f",
"gridcolor": "white",
"linecolor": "white",
"minorgridcolor": "white",
"startlinecolor": "#2a3f5f"
},
"type": "carpet"
}
],
"choropleth": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "choropleth"
}
],
"contour": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "contour"
}
],
"contourcarpet": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "contourcarpet"
}
],
"heatmap": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "heatmap"
}
],
"heatmapgl": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "heatmapgl"
}
],
"histogram": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "histogram"
}
],
"histogram2d": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "histogram2d"
}
],
"histogram2dcontour": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "histogram2dcontour"
}
],
"mesh3d": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "mesh3d"
}
],
"parcoords": [
{
"line": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "parcoords"
}
],
"pie": [
{
"automargin": true,
"type": "pie"
}
],
"scatter": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatter"
}
],
"scatter3d": [
{
"line": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatter3d"
}
],
"scattercarpet": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattercarpet"
}
],
"scattergeo": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattergeo"
}
],
"scattergl": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattergl"
}
],
"scattermapbox": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattermapbox"
}
],
"scatterpolar": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterpolar"
}
],
"scatterpolargl": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterpolargl"
}
],
"scatterternary": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterternary"
}
],
"surface": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "surface"
}
],
"table": [
{
"cells": {
"fill": {
"color": "#EBF0F8"
},
"line": {
"color": "white"
}
},
"header": {
"fill": {
"color": "#C8D4E3"
},
"line": {
"color": "white"
}
},
"type": "table"
}
]
},
"layout": {
"annotationdefaults": {
"arrowcolor": "#2a3f5f",
"arrowhead": 0,
"arrowwidth": 1
},
"coloraxis": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"colorscale": {
"diverging": [
[
0,
"#8e0152"
],
[
0.1,
"#c51b7d"
],
[
0.2,
"#de77ae"
],
[
0.3,
"#f1b6da"
],
[
0.4,
"#fde0ef"
],
[
0.5,
"#f7f7f7"
],
[
0.6,
"#e6f5d0"
],
[
0.7,
"#b8e186"
],
[
0.8,
"#7fbc41"
],
[
0.9,
"#4d9221"
],
[
1,
"#276419"
]
],
"sequential": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"sequentialminus": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
]
},
"colorway": [
"#636efa",
"#EF553B",
"#00cc96",
"#ab63fa",
"#FFA15A",
"#19d3f3",
"#FF6692",
"#B6E880",
"#FF97FF",
"#FECB52"
],
"font": {
"color": "#2a3f5f"
},
"geo": {
"bgcolor": "white",
"lakecolor": "white",
"landcolor": "#E5ECF6",
"showlakes": true,
"showland": true,
"subunitcolor": "white"
},
"hoverlabel": {
"align": "left"
},
"hovermode": "closest",
"mapbox": {
"style": "light"
},
"paper_bgcolor": "white",
"plot_bgcolor": "#E5ECF6",
"polar": {
"angularaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"bgcolor": "#E5ECF6",
"radialaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
}
},
"scene": {
"xaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
},
"yaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
},
"zaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
}
},
"shapedefaults": {
"line": {
"color": "#2a3f5f"
}
},
"ternary": {
"aaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"baxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"bgcolor": "#E5ECF6",
"caxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
}
},
"title": {
"x": 0.05
},
"xaxis": {
"automargin": true,
"gridcolor": "white",
"linecolor": "white",
"ticks": "",
"title": {
"standoff": 15
},
"zerolinecolor": "white",
"zerolinewidth": 2
},
"yaxis": {
"automargin": true,
"gridcolor": "white",
"linecolor": "white",
"ticks": "",
"title": {
"standoff": 15
},
"zerolinecolor": "white",
"zerolinewidth": 2
}
}
}
}
},
"text/html": [
"\n",
" \n",
" \n",
"
\n",
" \n",
"
"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"px.scatter_3d(iris, x='sepal lenght', z='sapal width', y='petal lenght', color='class')"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"scrolled": true
},
"outputs": [
{
"data": {
"application/vnd.plotly.v1+json": {
"config": {
"plotlyServerURL": "https://plot.ly"
},
"data": [
{
"dimensions": [
{
"axis": {
"matches": true
},
"label": "sepal lenght",
"values": [
5.1,
4.9,
4.7,
4.6,
5,
5.4,
4.6,
5,
4.4,
4.9,
5.4,
4.8,
4.8,
4.3,
5.8,
5.7,
5.4,
5.1,
5.7,
5.1,
5.4,
5.1,
4.6,
5.1,
4.8,
5,
5,
5.2,
5.2,
4.7,
4.8,
5.4,
5.2,
5.5,
4.9,
5,
5.5,
4.9,
4.4,
5.1,
5,
4.5,
4.4,
5,
5.1,
4.8,
5.1,
4.6,
5.3,
5
]
},
{
"axis": {
"matches": true
},
"label": "sapal width",
"values": [
3.5,
3,
3.2,
3.1,
3.6,
3.9,
3.4,
3.4,
2.9,
3.1,
3.7,
3.4,
3,
3,
4,
4.4,
3.9,
3.5,
3.8,
3.8,
3.4,
3.7,
3.6,
3.3,
3.4,
3,
3.4,
3.5,
3.4,
3.2,
3.1,
3.4,
4.1,
4.2,
3.1,
3.2,
3.5,
3.1,
3,
3.4,
3.5,
2.3,
3.2,
3.5,
3.8,
3,
3.8,
3.2,
3.7,
3.3
]
},
{
"axis": {
"matches": true
},
"label": "petal lenght",
"values": [
1.4,
1.4,
1.3,
1.5,
1.4,
1.7,
1.4,
1.5,
1.4,
1.5,
1.5,
1.6,
1.4,
1.1,
1.2,
1.5,
1.3,
1.4,
1.7,
1.5,
1.7,
1.5,
1,
1.7,
1.9,
1.6,
1.6,
1.5,
1.4,
1.6,
1.6,
1.5,
1.5,
1.4,
1.5,
1.2,
1.3,
1.5,
1.3,
1.5,
1.3,
1.3,
1.3,
1.6,
1.9,
1.4,
1.6,
1.4,
1.5,
1.4
]
},
{
"axis": {
"matches": true
},
"label": "petal width",
"values": [
0.2,
0.2,
0.2,
0.2,
0.2,
0.4,
0.3,
0.2,
0.2,
0.1,
0.2,
0.2,
0.1,
0.1,
0.2,
0.4,
0.4,
0.3,
0.3,
0.3,
0.2,
0.4,
0.2,
0.5,
0.2,
0.2,
0.4,
0.2,
0.2,
0.2,
0.2,
0.4,
0.1,
0.2,
0.1,
0.2,
0.2,
0.1,
0.2,
0.2,
0.3,
0.3,
0.2,
0.6,
0.4,
0.3,
0.2,
0.2,
0.2,
0.2
]
},
{
"axis": {
"matches": true
},
"label": "class",
"values": [
"Iris-setosa",
"Iris-setosa",
"Iris-setosa",
"Iris-setosa",
"Iris-setosa",
"Iris-setosa",
"Iris-setosa",
"Iris-setosa",
"Iris-setosa",
"Iris-setosa",
"Iris-setosa",
"Iris-setosa",
"Iris-setosa",
"Iris-setosa",
"Iris-setosa",
"Iris-setosa",
"Iris-setosa",
"Iris-setosa",
"Iris-setosa",
"Iris-setosa",
"Iris-setosa",
"Iris-setosa",
"Iris-setosa",
"Iris-setosa",
"Iris-setosa",
"Iris-setosa",
"Iris-setosa",
"Iris-setosa",
"Iris-setosa",
"Iris-setosa",
"Iris-setosa",
"Iris-setosa",
"Iris-setosa",
"Iris-setosa",
"Iris-setosa",
"Iris-setosa",
"Iris-setosa",
"Iris-setosa",
"Iris-setosa",
"Iris-setosa",
"Iris-setosa",
"Iris-setosa",
"Iris-setosa",
"Iris-setosa",
"Iris-setosa",
"Iris-setosa",
"Iris-setosa",
"Iris-setosa",
"Iris-setosa",
"Iris-setosa"
]
}
],
"hovertemplate": "class=Iris-setosa
%{xaxis.title.text}=%{x}
%{yaxis.title.text}=%{y}",
"legendgroup": "Iris-setosa",
"marker": {
"color": "#636efa",
"symbol": "circle"
},
"name": "Iris-setosa",
"showlegend": true,
"type": "splom"
},
{
"dimensions": [
{
"axis": {
"matches": true
},
"label": "sepal lenght",
"values": [
7,
6.4,
6.9,
5.5,
6.5,
5.7,
6.3,
4.9,
6.6,
5.2,
5,
5.9,
6,
6.1,
5.6,
6.7,
5.6,
5.8,
6.2,
5.6,
5.9,
6.1,
6.3,
6.1,
6.4,
6.6,
6.8,
6.7,
6,
5.7,
5.5,
5.5,
5.8,
6,
5.4,
6,
6.7,
6.3,
5.6,
5.5,
5.5,
6.1,
5.8,
5,
5.6,
5.7,
5.7,
6.2,
5.1,
5.7
]
},
{
"axis": {
"matches": true
},
"label": "sapal width",
"values": [
3.2,
3.2,
3.1,
2.3,
2.8,
2.8,
3.3,
2.4,
2.9,
2.7,
2,
3,
2.2,
2.9,
2.9,
3.1,
3,
2.7,
2.2,
2.5,
3.2,
2.8,
2.5,
2.8,
2.9,
3,
2.8,
3,
2.9,
2.6,
2.4,
2.4,
2.7,
2.7,
3,
3.4,
3.1,
2.3,
3,
2.5,
2.6,
3,
2.6,
2.3,
2.7,
3,
2.9,
2.9,
2.5,
2.8
]
},
{
"axis": {
"matches": true
},
"label": "petal lenght",
"values": [
4.7,
4.5,
4.9,
4,
4.6,
4.5,
4.7,
3.3,
4.6,
3.9,
3.5,
4.2,
4,
4.7,
3.6,
4.4,
4.5,
4.1,
4.5,
3.9,
4.8,
4,
4.9,
4.7,
4.3,
4.4,
4.8,
5,
4.5,
3.5,
3.8,
3.7,
3.9,
5.1,
4.5,
4.5,
4.7,
4.4,
4.1,
4,
4.4,
4.6,
4,
3.3,
4.2,
4.2,
4.2,
4.3,
3,
4.1
]
},
{
"axis": {
"matches": true
},
"label": "petal width",
"values": [
1.4,
1.5,
1.5,
1.3,
1.5,
1.3,
1.6,
1,
1.3,
1.4,
1,
1.5,
1,
1.4,
1.3,
1.4,
1.5,
1,
1.5,
1.1,
1.8,
1.3,
1.5,
1.2,
1.3,
1.4,
1.4,
1.7,
1.5,
1,
1.1,
1,
1.2,
1.6,
1.5,
1.6,
1.5,
1.3,
1.3,
1.3,
1.2,
1.4,
1.2,
1,
1.3,
1.2,
1.3,
1.3,
1.1,
1.3
]
},
{
"axis": {
"matches": true
},
"label": "class",
"values": [
"Iris-versicolor",
"Iris-versicolor",
"Iris-versicolor",
"Iris-versicolor",
"Iris-versicolor",
"Iris-versicolor",
"Iris-versicolor",
"Iris-versicolor",
"Iris-versicolor",
"Iris-versicolor",
"Iris-versicolor",
"Iris-versicolor",
"Iris-versicolor",
"Iris-versicolor",
"Iris-versicolor",
"Iris-versicolor",
"Iris-versicolor",
"Iris-versicolor",
"Iris-versicolor",
"Iris-versicolor",
"Iris-versicolor",
"Iris-versicolor",
"Iris-versicolor",
"Iris-versicolor",
"Iris-versicolor",
"Iris-versicolor",
"Iris-versicolor",
"Iris-versicolor",
"Iris-versicolor",
"Iris-versicolor",
"Iris-versicolor",
"Iris-versicolor",
"Iris-versicolor",
"Iris-versicolor",
"Iris-versicolor",
"Iris-versicolor",
"Iris-versicolor",
"Iris-versicolor",
"Iris-versicolor",
"Iris-versicolor",
"Iris-versicolor",
"Iris-versicolor",
"Iris-versicolor",
"Iris-versicolor",
"Iris-versicolor",
"Iris-versicolor",
"Iris-versicolor",
"Iris-versicolor",
"Iris-versicolor",
"Iris-versicolor"
]
}
],
"hovertemplate": "class=Iris-versicolor
%{xaxis.title.text}=%{x}
%{yaxis.title.text}=%{y}",
"legendgroup": "Iris-versicolor",
"marker": {
"color": "#EF553B",
"symbol": "circle"
},
"name": "Iris-versicolor",
"showlegend": true,
"type": "splom"
},
{
"dimensions": [
{
"axis": {
"matches": true
},
"label": "sepal lenght",
"values": [
6.3,
5.8,
7.1,
6.3,
6.5,
7.6,
4.9,
7.3,
6.7,
7.2,
6.5,
6.4,
6.8,
5.7,
5.8,
6.4,
6.5,
7.7,
7.7,
6,
6.9,
5.6,
7.7,
6.3,
6.7,
7.2,
6.2,
6.1,
6.4,
7.2,
7.4,
7.9,
6.4,
6.3,
6.1,
7.7,
6.3,
6.4,
6,
6.9,
6.7,
6.9,
5.8,
6.8,
6.7,
6.7,
6.3,
6.5,
6.2,
5.9
]
},
{
"axis": {
"matches": true
},
"label": "sapal width",
"values": [
3.3,
2.7,
3,
2.9,
3,
3,
2.5,
2.9,
2.5,
3.6,
3.2,
2.7,
3,
2.5,
2.8,
3.2,
3,
3.8,
2.6,
2.2,
3.2,
2.8,
2.8,
2.7,
3.3,
3.2,
2.8,
3,
2.8,
3,
2.8,
3.8,
2.8,
2.8,
2.6,
3,
3.4,
3.1,
3,
3.1,
3.1,
3.1,
2.7,
3.2,
3.3,
3,
2.5,
3,
3.4,
3
]
},
{
"axis": {
"matches": true
},
"label": "petal lenght",
"values": [
6,
5.1,
5.9,
5.6,
5.8,
6.6,
4.5,
6.3,
5.8,
6.1,
5.1,
5.3,
5.5,
5,
5.1,
5.3,
5.5,
6.7,
6.9,
5,
5.7,
4.9,
6.7,
4.9,
5.7,
6,
4.8,
4.9,
5.6,
5.8,
6.1,
6.4,
5.6,
5.1,
5.6,
6.1,
5.6,
5.5,
4.8,
5.4,
5.6,
5.1,
5.1,
5.9,
5.7,
5.2,
5,
5.2,
5.4,
5.1
]
},
{
"axis": {
"matches": true
},
"label": "petal width",
"values": [
2.5,
1.9,
2.1,
1.8,
2.2,
2.1,
1.7,
1.8,
1.8,
2.5,
2,
1.9,
2.1,
2,
2.4,
2.3,
1.8,
2.2,
2.3,
1.5,
2.3,
2,
2,
1.8,
2.1,
1.8,
1.8,
1.8,
2.1,
1.6,
1.9,
2,
2.2,
1.5,
1.4,
2.3,
2.4,
1.8,
1.8,
2.1,
2.4,
2.3,
1.9,
2.3,
2.5,
2.3,
1.9,
2,
2.3,
1.8
]
},
{
"axis": {
"matches": true
},
"label": "class",
"values": [
"Iris-virginica",
"Iris-virginica",
"Iris-virginica",
"Iris-virginica",
"Iris-virginica",
"Iris-virginica",
"Iris-virginica",
"Iris-virginica",
"Iris-virginica",
"Iris-virginica",
"Iris-virginica",
"Iris-virginica",
"Iris-virginica",
"Iris-virginica",
"Iris-virginica",
"Iris-virginica",
"Iris-virginica",
"Iris-virginica",
"Iris-virginica",
"Iris-virginica",
"Iris-virginica",
"Iris-virginica",
"Iris-virginica",
"Iris-virginica",
"Iris-virginica",
"Iris-virginica",
"Iris-virginica",
"Iris-virginica",
"Iris-virginica",
"Iris-virginica",
"Iris-virginica",
"Iris-virginica",
"Iris-virginica",
"Iris-virginica",
"Iris-virginica",
"Iris-virginica",
"Iris-virginica",
"Iris-virginica",
"Iris-virginica",
"Iris-virginica",
"Iris-virginica",
"Iris-virginica",
"Iris-virginica",
"Iris-virginica",
"Iris-virginica",
"Iris-virginica",
"Iris-virginica",
"Iris-virginica",
"Iris-virginica",
"Iris-virginica"
]
}
],
"hovertemplate": "class=Iris-virginica
%{xaxis.title.text}=%{x}
%{yaxis.title.text}=%{y}",
"legendgroup": "Iris-virginica",
"marker": {
"color": "#00cc96",
"symbol": "circle"
},
"name": "Iris-virginica",
"showlegend": true,
"type": "splom"
}
],
"layout": {
"dragmode": "select",
"legend": {
"title": {
"text": "class"
},
"tracegroupgap": 0
},
"margin": {
"t": 60
},
"template": {
"data": {
"bar": [
{
"error_x": {
"color": "#2a3f5f"
},
"error_y": {
"color": "#2a3f5f"
},
"marker": {
"line": {
"color": "#E5ECF6",
"width": 0.5
}
},
"type": "bar"
}
],
"barpolar": [
{
"marker": {
"line": {
"color": "#E5ECF6",
"width": 0.5
}
},
"type": "barpolar"
}
],
"carpet": [
{
"aaxis": {
"endlinecolor": "#2a3f5f",
"gridcolor": "white",
"linecolor": "white",
"minorgridcolor": "white",
"startlinecolor": "#2a3f5f"
},
"baxis": {
"endlinecolor": "#2a3f5f",
"gridcolor": "white",
"linecolor": "white",
"minorgridcolor": "white",
"startlinecolor": "#2a3f5f"
},
"type": "carpet"
}
],
"choropleth": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "choropleth"
}
],
"contour": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "contour"
}
],
"contourcarpet": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "contourcarpet"
}
],
"heatmap": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "heatmap"
}
],
"heatmapgl": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "heatmapgl"
}
],
"histogram": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "histogram"
}
],
"histogram2d": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "histogram2d"
}
],
"histogram2dcontour": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "histogram2dcontour"
}
],
"mesh3d": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "mesh3d"
}
],
"parcoords": [
{
"line": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "parcoords"
}
],
"pie": [
{
"automargin": true,
"type": "pie"
}
],
"scatter": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatter"
}
],
"scatter3d": [
{
"line": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatter3d"
}
],
"scattercarpet": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattercarpet"
}
],
"scattergeo": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattergeo"
}
],
"scattergl": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattergl"
}
],
"scattermapbox": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattermapbox"
}
],
"scatterpolar": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterpolar"
}
],
"scatterpolargl": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterpolargl"
}
],
"scatterternary": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterternary"
}
],
"surface": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "surface"
}
],
"table": [
{
"cells": {
"fill": {
"color": "#EBF0F8"
},
"line": {
"color": "white"
}
},
"header": {
"fill": {
"color": "#C8D4E3"
},
"line": {
"color": "white"
}
},
"type": "table"
}
]
},
"layout": {
"annotationdefaults": {
"arrowcolor": "#2a3f5f",
"arrowhead": 0,
"arrowwidth": 1
},
"coloraxis": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"colorscale": {
"diverging": [
[
0,
"#8e0152"
],
[
0.1,
"#c51b7d"
],
[
0.2,
"#de77ae"
],
[
0.3,
"#f1b6da"
],
[
0.4,
"#fde0ef"
],
[
0.5,
"#f7f7f7"
],
[
0.6,
"#e6f5d0"
],
[
0.7,
"#b8e186"
],
[
0.8,
"#7fbc41"
],
[
0.9,
"#4d9221"
],
[
1,
"#276419"
]
],
"sequential": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"sequentialminus": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
]
},
"colorway": [
"#636efa",
"#EF553B",
"#00cc96",
"#ab63fa",
"#FFA15A",
"#19d3f3",
"#FF6692",
"#B6E880",
"#FF97FF",
"#FECB52"
],
"font": {
"color": "#2a3f5f"
},
"geo": {
"bgcolor": "white",
"lakecolor": "white",
"landcolor": "#E5ECF6",
"showlakes": true,
"showland": true,
"subunitcolor": "white"
},
"hoverlabel": {
"align": "left"
},
"hovermode": "closest",
"mapbox": {
"style": "light"
},
"paper_bgcolor": "white",
"plot_bgcolor": "#E5ECF6",
"polar": {
"angularaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"bgcolor": "#E5ECF6",
"radialaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
}
},
"scene": {
"xaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
},
"yaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
},
"zaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
}
},
"shapedefaults": {
"line": {
"color": "#2a3f5f"
}
},
"ternary": {
"aaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"baxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"bgcolor": "#E5ECF6",
"caxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
}
},
"title": {
"x": 0.05
},
"xaxis": {
"automargin": true,
"gridcolor": "white",
"linecolor": "white",
"ticks": "",
"title": {
"standoff": 15
},
"zerolinecolor": "white",
"zerolinewidth": 2
},
"yaxis": {
"automargin": true,
"gridcolor": "white",
"linecolor": "white",
"ticks": "",
"title": {
"standoff": 15
},
"zerolinecolor": "white",
"zerolinewidth": 2
}
}
}
}
},
"text/html": [
"\n",
" \n",
" \n",
"
\n",
" \n",
"
"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"px.scatter_matrix(iris, color='class')"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {
"scrolled": true
},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" country | \n",
" continent | \n",
" year | \n",
" lifeExp | \n",
" pop | \n",
" gdpPercap | \n",
" iso_alpha | \n",
" iso_num | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" Afghanistan | \n",
" Asia | \n",
" 1952 | \n",
" 28.801 | \n",
" 8425333 | \n",
" 779.445314 | \n",
" AFG | \n",
" 4 | \n",
"
\n",
" \n",
" 1 | \n",
" Afghanistan | \n",
" Asia | \n",
" 1957 | \n",
" 30.332 | \n",
" 9240934 | \n",
" 820.853030 | \n",
" AFG | \n",
" 4 | \n",
"
\n",
" \n",
" 2 | \n",
" Afghanistan | \n",
" Asia | \n",
" 1962 | \n",
" 31.997 | \n",
" 10267083 | \n",
" 853.100710 | \n",
" AFG | \n",
" 4 | \n",
"
\n",
" \n",
" 3 | \n",
" Afghanistan | \n",
" Asia | \n",
" 1967 | \n",
" 34.020 | \n",
" 11537966 | \n",
" 836.197138 | \n",
" AFG | \n",
" 4 | \n",
"
\n",
" \n",
" 4 | \n",
" Afghanistan | \n",
" Asia | \n",
" 1972 | \n",
" 36.088 | \n",
" 13079460 | \n",
" 739.981106 | \n",
" AFG | \n",
" 4 | \n",
"
\n",
" \n",
" 5 | \n",
" Afghanistan | \n",
" Asia | \n",
" 1977 | \n",
" 38.438 | \n",
" 14880372 | \n",
" 786.113360 | \n",
" AFG | \n",
" 4 | \n",
"
\n",
" \n",
" 6 | \n",
" Afghanistan | \n",
" Asia | \n",
" 1982 | \n",
" 39.854 | \n",
" 12881816 | \n",
" 978.011439 | \n",
" AFG | \n",
" 4 | \n",
"
\n",
" \n",
" 7 | \n",
" Afghanistan | \n",
" Asia | \n",
" 1987 | \n",
" 40.822 | \n",
" 13867957 | \n",
" 852.395945 | \n",
" AFG | \n",
" 4 | \n",
"
\n",
" \n",
" 8 | \n",
" Afghanistan | \n",
" Asia | \n",
" 1992 | \n",
" 41.674 | \n",
" 16317921 | \n",
" 649.341395 | \n",
" AFG | \n",
" 4 | \n",
"
\n",
" \n",
" 9 | \n",
" Afghanistan | \n",
" Asia | \n",
" 1997 | \n",
" 41.763 | \n",
" 22227415 | \n",
" 635.341351 | \n",
" AFG | \n",
" 4 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" country continent year lifeExp pop gdpPercap iso_alpha \\\n",
"0 Afghanistan Asia 1952 28.801 8425333 779.445314 AFG \n",
"1 Afghanistan Asia 1957 30.332 9240934 820.853030 AFG \n",
"2 Afghanistan Asia 1962 31.997 10267083 853.100710 AFG \n",
"3 Afghanistan Asia 1967 34.020 11537966 836.197138 AFG \n",
"4 Afghanistan Asia 1972 36.088 13079460 739.981106 AFG \n",
"5 Afghanistan Asia 1977 38.438 14880372 786.113360 AFG \n",
"6 Afghanistan Asia 1982 39.854 12881816 978.011439 AFG \n",
"7 Afghanistan Asia 1987 40.822 13867957 852.395945 AFG \n",
"8 Afghanistan Asia 1992 41.674 16317921 649.341395 AFG \n",
"9 Afghanistan Asia 1997 41.763 22227415 635.341351 AFG \n",
"\n",
" iso_num \n",
"0 4 \n",
"1 4 \n",
"2 4 \n",
"3 4 \n",
"4 4 \n",
"5 4 \n",
"6 4 \n",
"7 4 \n",
"8 4 \n",
"9 4 "
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"gapminder = px.data.gapminder()\n",
"gapminder[0:10]"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" country | \n",
" continent | \n",
" year | \n",
" lifeExp | \n",
" pop | \n",
" gdpPercap | \n",
" iso_alpha | \n",
" iso_num | \n",
"
\n",
" \n",
" \n",
" \n",
" 564 | \n",
" Germany | \n",
" Europe | \n",
" 1952 | \n",
" 67.500 | \n",
" 69145952 | \n",
" 7144.114393 | \n",
" DEU | \n",
" 276 | \n",
"
\n",
" \n",
" 565 | \n",
" Germany | \n",
" Europe | \n",
" 1957 | \n",
" 69.100 | \n",
" 71019069 | \n",
" 10187.826650 | \n",
" DEU | \n",
" 276 | \n",
"
\n",
" \n",
" 566 | \n",
" Germany | \n",
" Europe | \n",
" 1962 | \n",
" 70.300 | \n",
" 73739117 | \n",
" 12902.462910 | \n",
" DEU | \n",
" 276 | \n",
"
\n",
" \n",
" 567 | \n",
" Germany | \n",
" Europe | \n",
" 1967 | \n",
" 70.800 | \n",
" 76368453 | \n",
" 14745.625610 | \n",
" DEU | \n",
" 276 | \n",
"
\n",
" \n",
" 568 | \n",
" Germany | \n",
" Europe | \n",
" 1972 | \n",
" 71.000 | \n",
" 78717088 | \n",
" 18016.180270 | \n",
" DEU | \n",
" 276 | \n",
"
\n",
" \n",
" 569 | \n",
" Germany | \n",
" Europe | \n",
" 1977 | \n",
" 72.500 | \n",
" 78160773 | \n",
" 20512.921230 | \n",
" DEU | \n",
" 276 | \n",
"
\n",
" \n",
" 570 | \n",
" Germany | \n",
" Europe | \n",
" 1982 | \n",
" 73.800 | \n",
" 78335266 | \n",
" 22031.532740 | \n",
" DEU | \n",
" 276 | \n",
"
\n",
" \n",
" 571 | \n",
" Germany | \n",
" Europe | \n",
" 1987 | \n",
" 74.847 | \n",
" 77718298 | \n",
" 24639.185660 | \n",
" DEU | \n",
" 276 | \n",
"
\n",
" \n",
" 572 | \n",
" Germany | \n",
" Europe | \n",
" 1992 | \n",
" 76.070 | \n",
" 80597764 | \n",
" 26505.303170 | \n",
" DEU | \n",
" 276 | \n",
"
\n",
" \n",
" 573 | \n",
" Germany | \n",
" Europe | \n",
" 1997 | \n",
" 77.340 | \n",
" 82011073 | \n",
" 27788.884160 | \n",
" DEU | \n",
" 276 | \n",
"
\n",
" \n",
" 574 | \n",
" Germany | \n",
" Europe | \n",
" 2002 | \n",
" 78.670 | \n",
" 82350671 | \n",
" 30035.801980 | \n",
" DEU | \n",
" 276 | \n",
"
\n",
" \n",
" 575 | \n",
" Germany | \n",
" Europe | \n",
" 2007 | \n",
" 79.406 | \n",
" 82400996 | \n",
" 32170.374420 | \n",
" DEU | \n",
" 276 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" country continent year lifeExp pop gdpPercap iso_alpha \\\n",
"564 Germany Europe 1952 67.500 69145952 7144.114393 DEU \n",
"565 Germany Europe 1957 69.100 71019069 10187.826650 DEU \n",
"566 Germany Europe 1962 70.300 73739117 12902.462910 DEU \n",
"567 Germany Europe 1967 70.800 76368453 14745.625610 DEU \n",
"568 Germany Europe 1972 71.000 78717088 18016.180270 DEU \n",
"569 Germany Europe 1977 72.500 78160773 20512.921230 DEU \n",
"570 Germany Europe 1982 73.800 78335266 22031.532740 DEU \n",
"571 Germany Europe 1987 74.847 77718298 24639.185660 DEU \n",
"572 Germany Europe 1992 76.070 80597764 26505.303170 DEU \n",
"573 Germany Europe 1997 77.340 82011073 27788.884160 DEU \n",
"574 Germany Europe 2002 78.670 82350671 30035.801980 DEU \n",
"575 Germany Europe 2007 79.406 82400996 32170.374420 DEU \n",
"\n",
" iso_num \n",
"564 276 \n",
"565 276 \n",
"566 276 \n",
"567 276 \n",
"568 276 \n",
"569 276 \n",
"570 276 \n",
"571 276 \n",
"572 276 \n",
"573 276 \n",
"574 276 \n",
"575 276 "
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"gapminder.query('country==\"Germany\"')"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.2"
}
},
"nbformat": 4,
"nbformat_minor": 2
}