{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### New to Plotly?\n",
"Plotly's Python library is free and open source! [Get started](https://plotly.com/python/getting-started/) by downloading the client and [reading the primer](https://plotly.com/python/getting-started/).\n",
"
You can set up Plotly to work in [online](https://plotly.com/python/getting-started/#initialization-for-online-plotting) or [offline](https://plotly.com/python/getting-started/#initialization-for-offline-plotting) mode, or in [jupyter notebooks](https://plotly.com/python/getting-started/#start-plotting-online).\n",
"
We also have a quick-reference [cheatsheet](https://images.plot.ly/plotly-documentation/images/python_cheat_sheet.pdf) (new!) to help you get started!"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Version Check\n",
"Plotly's python package is updated frequently. Run `pip install plotly --upgrade` to use the latest version."
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'2.2.1'"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import plotly\n",
"plotly.__version__"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Basic Example"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
""
],
"text/vnd.plotly.v1+html": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.plotly.v1+json": {
"data": [
{
"mode": "markers",
"transforms": [
{
"groups": [
"Moe",
"Larry",
"Curly",
"Moe",
"Larry",
"Curly",
"Moe",
"Larry",
"Curly",
"Moe",
"Larry",
"Curly"
],
"styles": [
{
"target": "Moe",
"value": {
"marker": {
"color": "blue"
}
}
},
{
"target": "Larry",
"value": {
"marker": {
"color": "red"
}
}
},
{
"target": "Curly",
"value": {
"marker": {
"color": "black"
}
}
}
],
"type": "groupby"
}
],
"type": "scatter",
"x": [
"Moe",
"Larry",
"Curly",
"Moe",
"Larry",
"Curly",
"Moe",
"Larry",
"Curly",
"Moe",
"Larry",
"Curly"
],
"y": [
1,
6,
2,
8,
2,
9,
4,
5,
1,
5,
2,
8
]
}
],
"layout": {}
},
"text/html": [
"