{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 3D scatter plots with Plotly & Python\n",
"\n",
"(copied FROM https://plotly.com/python/3d-scatter-plots/ Wednesday, March 27, 2020)\n",
"\n",
"**All of these cells will display plots in current JupyterLab (versions 3.1.1 & 3.4.8 tested) even without using `%matplotlib inline`.** This was not the case with JupyterLab 2.1.3, where even using `%matplotlib inline` didn't help enable displaying these plots.\n",
"\n",
"\n",
"### 3D scatter plot with Plotly Express\n",
"\n",
"\n",
"[Plotly Express](https://plotly.com/python/plotly-express/) is the easy-to-use, high-level interface to Plotly, which [operates on a variety of types of data](https://plotly.com/python/px-arguments/) and produces [easy-to-style figures](https://plotly.com/python/styling-plotly-express/).\n",
"\n",
"Like the [2D scatter plot](https://plotly.com/python/line-and-scatter/) `px.scatter`, the 3D function `px.scatter_3d` plots individual data in three-dimensional space.\n",
"\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
" \n",
" "
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.plotly.v1+json": {
"config": {
"plotlyServerURL": "https://plot.ly"
},
"data": [
{
"hovertemplate": "species=setosa
sepal_length=%{x}
sepal_width=%{y}
petal_width=%{z}
sepal_length=%{x}
sepal_width=%{y}
petal_width=%{z}
sepal_length=%{x}
sepal_width=%{y}
petal_width=%{z}