From 9439b3ea0f49ace6e2ba4e18fbe4373066e9715e Mon Sep 17 00:00:00 2001 From: Jon Mease Date: Tue, 25 Jun 2019 09:38:16 -0400 Subject: [PATCH 1/8] Update getting started section --- notebooks/getting-started.md | 371 +++++++++++++---------------------- 1 file changed, 139 insertions(+), 232 deletions(-) diff --git a/notebooks/getting-started.md b/notebooks/getting-started.md index 2603d4c7b..0806835a2 100644 --- a/notebooks/getting-started.md +++ b/notebooks/getting-started.md @@ -6,13 +6,23 @@ jupyter: extension: .md format_name: markdown format_version: '1.1' - jupytext_version: 1.1.1 + jupytext_version: 1.1.6 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.7.3 plotly: - description: Installation and Initialization Steps for Using Plotly in Python. + description: Getting Started with Plotly for Python. has_thumbnail: false ipynb: ~notebook_demo/123/installation language: python @@ -24,302 +34,199 @@ jupyter: title: Getting Started with Plotly for Python | plotly --- -### Installation - - -To install Plotly's python package, use the package manager **pip** inside your terminal.
-If you don't have **pip** installed on your machine, [click here](https://pip.pypa.io/en/latest/installing.html) for pip's installation instructions. -
-
-`$ pip install plotly` -
or -
`$ sudo pip install plotly` -
-
-Plotly's Python package is [updated frequently](https://github.com/plotly/plotly.py/blob/master/CHANGELOG.md)! To upgrade, run: -
-
-`$ pip install plotly --upgrade` - - -### Initialization for Online Plotting -Plotly provides a web-service for hosting graphs! Create a [free account](https://plot.ly/api_signup) to get started. Graphs are saved inside your online Plotly account and you control the privacy. Public hosting is free, for private hosting, check out our [paid plans](https://plot.ly/products/cloud/). -
-
-After installing the Plotly package, you're ready to fire up python: -
-
-`$ python` -
-
-and set your credentials: +## Overview +The plotly Python library ([plotly.py](https://plot.ly/python/)) is an interactive, [open-source](https://github.com/plotly/plotly.py) plotting library that supports over 30 unique chart types covering a wide range of statistical, financial, geographic, scientific, and 3-dimensional use-cases. -```python -import plotly -plotly.tools.set_credentials_file(username='DemoAccount', api_key='lr1c37zw81') -``` +Built on top of the Plotly JavaScript library ([plotly.js](https://plot.ly/javascript/)), plotly.py enables Python users to create beautiful interactive web-based visualizations that can be displayed in Jupyter notebooks, saved to standalone HTML files, or served as part of pure Python-built web applications using Dash. - -You'll need to replace **'DemoAccount'** and **'lr1c37zw81'** with *your* Plotly username and [API key](https://plot.ly/settings/api).
-Find your API key [here](https://plot.ly/settings/api). -
-
-The initialization step places a special **.plotly/.credentials** file in your home directory. Your **~/.plotly/.credentials** file should look something like this: -
+Thanks to deep integration with the [orca](https://github.com/plotly/orca) image export utility, plotly.py also provides great support for non-web contexts including desktop editors (e.g. QtConsole, Spyder, PyCharm) and static document publishing (e.g. exporting notebooks to PDF with high-quality vector images). + +## Installation +plotly.py may be installed using pip... ``` -{ - "username": "DemoAccount", - "stream_ids": ["ylosqsyet5", "h2ct8btk1s", "oxz4fm883b"], - "api_key": "lr1c37zw81" -} +$ pip install plotly==4.0.0 ``` - -### Online Plot Privacy - -Plot can be set to three different type of privacies: public, private or secret. -- **public**: Anyone can view this graph. It will appear in your profile and can appear in search engines. You do not need to be logged in to Plotly to view this chart. -- **private**: Only you can view this plot. It will not appear in the Plotly feed, your profile, or search engines. You must be logged in to Plotly to view this graph. You can privately share this graph with other Plotly users in your online Plotly account and they will need to be logged in to view this plot. -- **secret**: Anyone with this secret link can view this chart. It will not appear in the Plotly feed, your profile, or search engines. If it is embedded inside a webpage or an IPython notebook, anybody who is viewing that page will be able to view the graph. You do not need to be logged in to view this plot. +or conda. +``` +$ conda install -c plotly plotly=4.0.0 +``` -By default all plots are set to **public**. Users with free account have the permission to keep one private plot. If you need to save private plots, [upgrade to a pro account](https://plot.ly/plans). If you're a [Personal or Professional user](https://plot.ly/settings/subscription/?modal=true&utm_source=api-docs&utm_medium=support-oss) and would like the default setting for your plots to be private, you can edit your Plotly configuration: +This package contains everything you need to write figures to standalone HTML files. ```python -import plotly -plotly.tools.set_config_file(world_readable=False, - sharing='private') +import plotly.graph_objects as go +fig = go.Figure(data=go.Bar(y=[2, 3, 1])) +fig.write_html('first_figure.html', auto_open=True) ``` -For more examples on privacy settings please visit [Python privacy documentation](https://plot.ly/python/privacy/) +### Jupyter Notebook Support +For use in the classic [Jupyter Notebook](https://jupyter.org/), install the `notebook` and `ipywidgets` +packages using pip... +``` +$ pip install "notebook>=5.3" "ipywidgets>=7.2" +``` -### Special Instructions for [Chart Studio Enterprise](https://plot.ly/product/enterprise/) Users +or conda. +``` +$ conda install "notebook>=5.3" "ipywidgets>=7.2" +``` -Your API key for account on the public cloud will be different than the API key in Chart Studio Enterprise. Visit https://plotly.your-company.com/settings/api/ to find your Chart Studio Enterprise API key. Remember to replace "your-company.com" with the URL of your Chart Studio Enterprise server. -If your company has a Chart Studio Enterprise server, change the Python API endpoint so that it points to your company's Plotly server instead of Plotly's cloud. -
-
-In python, enter: +These packages contain everything you need to run a Jupyter notebook... -```python -import plotly -plotly.tools.set_config_file(plotly_domain='https://plotly.your-company.com', - plotly_streaming_domain='https://stream-plotly.your-company.com') +``` +$ jupyter notebook ``` -Make sure to replace **"your-company.com"** with the URL of *your* Chart Studio Enterprise server. - +and display plotly figures inline using the notebook renderer... +```python +import plotly.graph_objects as go +fig = go.Figure(data=go.Bar(y=[2, 3, 1])) +fig.show() +``` -Additionally, you can set your configuration so that you generate **private plots by default**. For more information on privacy settings see: https://plot.ly/python/privacy/
-
-In python, enter: +or using `FigureWidget` objects. ```python -import plotly -plotly.tools.set_config_file(plotly_domain='https://plotly.your-company.com', - plotly_streaming_domain='https://stream-plotly.your-company.com', - world_readable=False, - sharing='private') +import plotly.graph_objects as go +fig = go.FigureWidget(data=go.Bar(y=[2, 3, 1])) +fig ``` -### Plotly Using virtualenv -Python's `virtualenv` allows us create multiple working Python environments which can each use different versions of packages. We can use `virtualenv` from the command line to create an environment using plotly.py version 3.3.0 and a separate one using plotly.py version 2.7.0. See [the virtualenv documentation](https://virtualenv.pypa.io/en/stable) for more info. - -**Install virtualenv globally** -
`$ sudo pip install virtualenv` +See [*Displaying Figures in Python*](https://plot.ly/python/renderers/) for more information on the renderers framework, and see [*Plotly FigureWidget Overview*](https://plot.ly/python/figurewidget/) for more information on using `FigureWidget`. -**Create your virtualenvs** -
`$ mkdir ~/.virtualenvs` -
`$ cd ~/.virtualenvs` -
`$ python -m venv plotly2.7` -
`$ python -m venv plotly3.3` +### JupyterLab Support (Python 3.5+) +For use in [JupyterLab](https://jupyterlab.readthedocs.io/en/stable/), install the `jupyterlab` and `ipywidgets` +packages using pip... -**Activate the virtualenv.** -You will see the name of your virtualenv in parenthesis next to the input promt. -
`$ source ~/.virtualenvs/plotly2.7/bin/activate` -
`(plotly2.7) $` +``` +$ pip install jupyterlab==1.0.0 "ipywidgets>=7.2" +``` -**Install plotly locally to virtualenv** (note that we don't use sudo). -
`(plotly2.7) $ pip install plotly==2.7` +or conda. -**Deactivate to exit** -
-`(plotly2.7) $ deactivate` -
`$` +``` +$ conda install jupyterlab=1.0.0 "ipywidgets>=7.2" +``` +Then run the following commands to install the required JupyterLab extensions: +``` +# Avoid "JavaScript heap out of memory" errors during extension installation +# (OS X/Linux) +export NODE_OPTIONS=--max-old-space-size=4096 +# (Windows) +set NODE_OPTIONS=--max-old-space-size=4096 -### Jupyter Setup -**Install Jupyter into a virtualenv** -
`$ source ~/.virtualenvs/plotly3.3/bin/activate` -
`(plotly3.3) $ pip install notebook` +# Jupyter widgets extension +jupyter labextension install @jupyter-widgets/jupyterlab-manager@0.38 --no-build -**Start the Jupyter kernel from a virtualenv** -
`(plotly3.3) $ jupyter notebook` +# FigureWidget support and jupyterlab renderer support +jupyter labextension install jupyterlab-plotly@1.0.0 --no-build +# JupyterLab chart editor support (optional) +jupyter labextension install jupyterlab-chart-editor@1.1 --no-build +# Build extensions (must be done to activate extensions since --no-build is used above) +jupyter lab build +# Unset NODE_OPTIONS environment variable +# (OS X/Linux) +unset NODE_OPTIONS +# (Windows) +set NODE_OPTIONS= +``` -### Start Plotting Online -When plotting online, the plot and data will be saved to your cloud account. There are two methods for plotting online: `py.plot()` and `py.iplot()`. Both options create a unique url for the plot and save it in your Plotly account. -- Use `py.plot()` to return the unique url and optionally open the url. -- Use `py.iplot()` when working in a Jupyter Notebook to display the plot in the notebook. +These packages contain everything you need to run JupyterLab... -Copy and paste one of the following examples to create your first hosted Plotly graph using the Plotly Python library: +``` +$ jupyter lab +``` +and display plotly figures inline using the `plotly_mimetype` renderer... ```python -import plotly.plotly as py -import plotly.graph_objs as go - -trace0 = go.Scatter( - x=[1, 2, 3, 4], - y=[10, 15, 13, 17] -) -trace1 = go.Scatter( - x=[1, 2, 3, 4], - y=[16, 5, 11, 9] -) -data = [trace0, trace1] - -py.plot(data, filename = 'basic-line', auto_open=True) +import plotly.graph_objects as go +fig = go.Figure(data=go.Bar(y=[2, 3, 1])) +fig.show() ``` -Checkout the docstrings for more information: - +or using `FigureWidget` objects. ```python -import plotly.plotly as py -help(py.plot) +import plotly.graph_objects as go +fig = go.FigureWidget(data=go.Bar(y=[2, 3, 1])) +fig ``` -```python -import plotly.plotly as py -import plotly.graph_objs as go +See [*Displaying Figures in Python*](https://plot.ly/python/renderers/) for more information on the renderers framework, and see [*Plotly FigureWidget Overview*](https://plot.ly/python/figurewidget/) for more information on using `FigureWidget`. -trace0 = go.Scatter( - x=[1, 2, 3, 4], - y=[10, 15, 13, 17] -) -trace1 = go.Scatter( - x=[1, 2, 3, 4], - y=[16, 5, 11, 9] -) -data = [trace0, trace1] +### Static Image Export Support +plotly.py supports static image export using the `to_image` and `write_image` +functions in the `plotly.io` package. This functionality requires the +installation of the plotly [orca](https://github.com/plotly/orca) command line utility and the +[`psutil`](https://github.com/giampaolo/psutil) and [`requests`](https://2.python-requests.org/en/master/) Python packages. -py.iplot(data, filename = 'basic-line') +These dependencies can all be installed using conda: ``` - -See more examples in our [IPython notebook documentation](https://plot.ly/ipython-notebooks/) or check out the `py.iplot()` docstring for more information. - -```python -import plotly.plotly as py -help(py.iplot) +$ conda install -c plotly plotly-orca psutil requests ``` -You can also create plotly graphs with **matplotlib** syntax. Learn more in our [matplotlib documentation](https://plot.ly/matplotlib/). - +Or, `psutil` and `requests` can be installed using pip... +``` +$ pip install psutil requests +``` -### Initialization for Offline Plotting -Plotly Offline allows you to create graphs offline and save them locally. There are also two methods for plotting offline: `plotly.offline.plot()` and `plotly.offline.iplot()`. -- Use `plotly.offline.plot()` to create and standalone HTML that is saved locally and opened inside your web browser. -- Use `plotly.offline.iplot()` when working offline in a Jupyter Notebook to display the plot in the notebook. +and orca can be installed according to the instructions in the [orca README](https://github.com/plotly/orca). -Check your Plotly version, version 1.9.4+ is needed for offline plotting: +These packages contain everything you need to save figures as static images. ```python -import plotly -plotly.__version__ +import plotly.graph_objects as go +fig = go.FigureWidget(data=go.Bar(y=[2, 3, 1])) +fig.write_image('figure.png') ``` +See [*Static Image Export in Python*](https://plot.ly/python/static-image-export/) for more information on static image export. -Copy and paste one of the following examples to create your first offline Plotly graph using the Plotly Python library: +### Extended Geo Support +Some plotly.py features rely on fairly large geographic shape files. The county +choropleth figure factory is one such example. These shape files are distributed as a +separate `plotly-geo` package. This package can be installed using pip... -```python -import plotly -import plotly.graph_objs as go - -plotly.offline.plot({ - "data": [go.Scatter(x=[1, 2, 3, 4], y=[4, 3, 2, 1])], - "layout": go.Layout(title="hello world") -}, auto_open=True) ``` - -Learn more by calling `help()`: - -```python -import plotly -help(plotly.offline.plot) +$ pip install plotly-geo==1.0.0 ``` -When using `plotly.offline.iplot` to plot offline in Jupyter Notebooks, there is an additional initialization step of running: `plotly.offline.init_notebook_mode()` at the start of each notebook session.
See the example below: - -```python -import plotly -import plotly.graph_objs as go - -plotly.offline.init_notebook_mode(connected=True) - -plotly.offline.iplot({ - "data": [go.Scatter(x=[1, 2, 3, 4], y=[4, 3, 2, 1])], - "layout": go.Layout(title="hello world") -}) +or conda. ``` - -```python -import plotly -help(plotly.offline.iplot) +$ conda install -c plotly plotly-geo=1.0.0 ``` -For more examples on plotting offline with Plotly in python please visit our [offline documentation](https://plot.ly/python/offline/). - +See [*USA County Choropleth Maps in Python*](https://plot.ly/python/county-choropleth/) for more information on the county choropleth figure factory. -### Using Plotly with Pandas +### Chart Studio Support +The `chart-studio` package can be used to upload plotly figures to Plotly's Chart +Studio Cloud or On-Prem services. This package can be installed using pip... -To use Plotly with Pandas first `$ pip install pandas` and then import pandas in your code like in the example below. - -```python -import plotly.plotly as py -import plotly.graph_objs as go -import pandas as pd - -df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/gapminder2007.csv') - -fig = { - 'data': [ - { - 'x': df.gdpPercap, - 'y': df.lifeExp, - 'text': df.country, - 'mode': 'markers', - 'name': '2007'}, - ], - 'layout': { - 'xaxis': {'title': 'GDP per Capita', 'type': 'log'}, - 'yaxis': {'title': "Life Expectancy"} - } -} +``` +$ pip install chart-studio==1.0.0 +``` -py.iplot(fig, filename='pandas-multiple-scatter') +or conda. +``` +$ conda install -c plotly chart-studio=1.0.0 ``` -### [MORE EXAMPLES](https://plot.ly/python/) -Check out more examples and tutorials for using Plotly in python [here](https://plot.ly/python)! +> **Note:** This package is optional, and if it is not installed it is not possible for figures to be uploaded to the Chart Studio cloud service. -```python -from IPython.display import display, HTML +## Where to next? +Now that you have everything installed, you are ready to start reading and running examples of [basic charts](https://plot.ly/python/basic-charts/), [statistical charts](https://plot.ly/python/statistical-charts/), [scientific charts](https://plot.ly/python/scientific-charts/), [financial charts](https://plot.ly/python/#financial-charts), [geographic charts](https://plot.ly/python/maps/), and [3-dimensional charts](https://plot.ly/python/3d-charts/). -display(HTML('')) -display(HTML('')) +For a complete overview of all of the ways that figures can be created and updated, see [*Creating and updating figures with Python*](https://plot.ly/python/creating-updating-figures/). -#!pip install git+https://github.com/plotly/publisher.git --upgrade -import publisher -publisher.publish( - 'getting-started.ipynb', 'python/getting-started/', 'Getting Started Plotly for Python', - 'Installation and Initialization Steps for Using Plotly in Python.', - title = 'Getting Started with Plotly for Python | plotly', - name = 'Getting Started with Plotly for Python', - language='python', layout='getstart', has_thumbnail='false', - ipynb= '~notebook_demo/123/installation', uses_plotly_offline=True) -``` +For information on all of the ways that plotly figures can be displayed, see [*Displaying plotly figures with plotly for Python*](https://plot.ly/python/renderers/). -```python +For information on theming plotly figures, see [*Theming and templates with plotly for Python*](https://plot.ly/python/templates/). -``` +For the full searchable reference of every figure property, see the [*Python figure reference*](https://plot.ly/python/reference/). + +For information on using Python to build web applications containing plotly figures, see the [*Dash User Guide*](https://dash.plot.ly/). From 5d6293fa8fc637f17786b288e4b79884defbd5f0 Mon Sep 17 00:00:00 2001 From: Jon Mease Date: Tue, 25 Jun 2019 09:39:04 -0400 Subject: [PATCH 2/8] v4upgrade: true --- notebooks/getting-started.md | 1 + 1 file changed, 1 insertion(+) diff --git a/notebooks/getting-started.md b/notebooks/getting-started.md index 0806835a2..af0ee40e8 100644 --- a/notebooks/getting-started.md +++ b/notebooks/getting-started.md @@ -32,6 +32,7 @@ jupyter: permalink: python/getting-started/ thumbnail: /images/static-image title: Getting Started with Plotly for Python | plotly + v4upgrade: true --- ## Overview From 3f82ac35fa04d7a46d0f047cb054007b504ff4e3 Mon Sep 17 00:00:00 2001 From: Jon Mease Date: Tue, 25 Jun 2019 10:12:57 -0400 Subject: [PATCH 3/8] 40! --- notebooks/getting-started.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notebooks/getting-started.md b/notebooks/getting-started.md index af0ee40e8..515c70f72 100644 --- a/notebooks/getting-started.md +++ b/notebooks/getting-started.md @@ -36,7 +36,7 @@ jupyter: --- ## Overview -The plotly Python library ([plotly.py](https://plot.ly/python/)) is an interactive, [open-source](https://github.com/plotly/plotly.py) plotting library that supports over 30 unique chart types covering a wide range of statistical, financial, geographic, scientific, and 3-dimensional use-cases. +The plotly Python library ([plotly.py](https://plot.ly/python/)) is an interactive, [open-source](https://github.com/plotly/plotly.py) plotting library that supports over 40 unique chart types covering a wide range of statistical, financial, geographic, scientific, and 3-dimensional use-cases. Built on top of the Plotly JavaScript library ([plotly.js](https://plot.ly/javascript/)), plotly.py enables Python users to create beautiful interactive web-based visualizations that can be displayed in Jupyter notebooks, saved to standalone HTML files, or served as part of pure Python-built web applications using Dash. From 9f1ed8b92a0fce9ee10b9eebb42277dfaa374a48 Mon Sep 17 00:00:00 2001 From: Jon Mease Date: Tue, 25 Jun 2019 10:30:15 -0400 Subject: [PATCH 4/8] Update user-guide links --- notebooks/getting-started.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notebooks/getting-started.md b/notebooks/getting-started.md index 515c70f72..1ea7c0320 100644 --- a/notebooks/getting-started.md +++ b/notebooks/getting-started.md @@ -222,7 +222,7 @@ $ conda install -c plotly chart-studio=1.0.0 ## Where to next? Now that you have everything installed, you are ready to start reading and running examples of [basic charts](https://plot.ly/python/basic-charts/), [statistical charts](https://plot.ly/python/statistical-charts/), [scientific charts](https://plot.ly/python/scientific-charts/), [financial charts](https://plot.ly/python/#financial-charts), [geographic charts](https://plot.ly/python/maps/), and [3-dimensional charts](https://plot.ly/python/3d-charts/). -For a complete overview of all of the ways that figures can be created and updated, see [*Creating and updating figures with Python*](https://plot.ly/python/creating-updating-figures/). +For a complete overview of all of the ways that figures can be created and updated, see [*Creating and updating figures with Python*](https://plot.ly/python/user-guide/). For information on all of the ways that plotly figures can be displayed, see [*Displaying plotly figures with plotly for Python*](https://plot.ly/python/renderers/). From 8df26a3917e83d26348c56e2b08c64bd565c428a Mon Sep 17 00:00:00 2001 From: Jon Mease Date: Tue, 25 Jun 2019 10:37:23 -0400 Subject: [PATCH 5/8] Add links to style and layout options --- notebooks/getting-started.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/notebooks/getting-started.md b/notebooks/getting-started.md index 1ea7c0320..678b67bec 100644 --- a/notebooks/getting-started.md +++ b/notebooks/getting-started.md @@ -224,9 +224,11 @@ Now that you have everything installed, you are ready to start reading and runni For a complete overview of all of the ways that figures can be created and updated, see [*Creating and updating figures with Python*](https://plot.ly/python/user-guide/). -For information on all of the ways that plotly figures can be displayed, see [*Displaying plotly figures with plotly for Python*](https://plot.ly/python/renderers/). +For information on configuring figure layout options (e.g. axes, titles, legends, etc) see [*Layout Options*](https://plot.ly/python/#layout-options). + +For information on styling figures (e.g. colors, fonts, annotations, images, shapes, etc.), see [*Style Options*](https://plot.ly/python/#style-options). And for information on theming plotly figures, see [*Theming and templates with plotly for Python*](https://plot.ly/python/templates/). -For information on theming plotly figures, see [*Theming and templates with plotly for Python*](https://plot.ly/python/templates/). +For information on all of the ways that plotly figures can be displayed, see [*Displaying plotly figures with plotly for Python*](https://plot.ly/python/renderers/). For the full searchable reference of every figure property, see the [*Python figure reference*](https://plot.ly/python/reference/). From dd5402e3977cfe110846d4e70ca799d25c9486e5 Mon Sep 17 00:00:00 2001 From: Jon Mease Date: Tue, 25 Jun 2019 10:44:10 -0400 Subject: [PATCH 6/8] Update user guide name in link --- notebooks/getting-started.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notebooks/getting-started.md b/notebooks/getting-started.md index 678b67bec..cfb195b20 100644 --- a/notebooks/getting-started.md +++ b/notebooks/getting-started.md @@ -222,7 +222,7 @@ $ conda install -c plotly chart-studio=1.0.0 ## Where to next? Now that you have everything installed, you are ready to start reading and running examples of [basic charts](https://plot.ly/python/basic-charts/), [statistical charts](https://plot.ly/python/statistical-charts/), [scientific charts](https://plot.ly/python/scientific-charts/), [financial charts](https://plot.ly/python/#financial-charts), [geographic charts](https://plot.ly/python/maps/), and [3-dimensional charts](https://plot.ly/python/3d-charts/). -For a complete overview of all of the ways that figures can be created and updated, see [*Creating and updating figures with Python*](https://plot.ly/python/user-guide/). +For a complete overview of all of the ways that figures can be created and updated, see the [*Plotly User Guide for Python*](https://plot.ly/python/user-guide/). For information on configuring figure layout options (e.g. axes, titles, legends, etc) see [*Layout Options*](https://plot.ly/python/#layout-options). From 87ce12a0df9325783d4b2a003a184c2ff2dce4e6 Mon Sep 17 00:00:00 2001 From: Jon Mease Date: Wed, 26 Jun 2019 09:09:08 -0400 Subject: [PATCH 7/8] Added note about version 4 being "offline" only --- notebooks/getting-started.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/notebooks/getting-started.md b/notebooks/getting-started.md index cfb195b20..fb2cd572b 100644 --- a/notebooks/getting-started.md +++ b/notebooks/getting-started.md @@ -55,6 +55,8 @@ $ conda install -c plotly plotly=4.0.0 This package contains everything you need to write figures to standalone HTML files. +> Note: No internet connection or account is required to use plotly.py. Prior to version 4, this library could operate in either an "online" or "offline" mode. The documentation tended to emphasize the online mode, where graphs get published to the Chart Studio web service. In version 4, all "online" functionality was removed from the `plotly` package and is now available as the separate, optional, `chart-studio` package (See below). plotly.py version 4 is "offline" only, and does not include any functionality for uploading figures to cloud services. + ```python import plotly.graph_objects as go fig = go.Figure(data=go.Bar(y=[2, 3, 1])) From d61752f901da383da21ce7c33837b5df0101e80d Mon Sep 17 00:00:00 2001 From: Jon Mease Date: Thu, 27 Jun 2019 05:51:31 -0400 Subject: [PATCH 8/8] A few review updates --- notebooks/getting-started.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/notebooks/getting-started.md b/notebooks/getting-started.md index fb2cd572b..13e1c6fd0 100644 --- a/notebooks/getting-started.md +++ b/notebooks/getting-started.md @@ -55,7 +55,7 @@ $ conda install -c plotly plotly=4.0.0 This package contains everything you need to write figures to standalone HTML files. -> Note: No internet connection or account is required to use plotly.py. Prior to version 4, this library could operate in either an "online" or "offline" mode. The documentation tended to emphasize the online mode, where graphs get published to the Chart Studio web service. In version 4, all "online" functionality was removed from the `plotly` package and is now available as the separate, optional, `chart-studio` package (See below). plotly.py version 4 is "offline" only, and does not include any functionality for uploading figures to cloud services. +> Note: **No internet connection, account, or payment is required to use plotly.py.** Prior to version 4, this library could operate in either an "online" or "offline" mode. The documentation tended to emphasize the online mode, where graphs get published to the Chart Studio web service. In version 4, all "online" functionality was removed from the `plotly` package and is now available as the separate, optional, `chart-studio` package (See below). **plotly.py version 4 is "offline" only, and does not include any functionality for uploading figures or data to cloud services.** ```python import plotly.graph_objects as go @@ -169,6 +169,8 @@ functions in the `plotly.io` package. This functionality requires the installation of the plotly [orca](https://github.com/plotly/orca) command line utility and the [`psutil`](https://github.com/giampaolo/psutil) and [`requests`](https://2.python-requests.org/en/master/) Python packages. +> Note: The `requests` library is used to communicate between the Python process and a local orca server process, it is not used to communicate with any external services. + These dependencies can all be installed using conda: ``` $ conda install -c plotly plotly-orca psutil requests @@ -226,9 +228,9 @@ Now that you have everything installed, you are ready to start reading and runni For a complete overview of all of the ways that figures can be created and updated, see the [*Plotly User Guide for Python*](https://plot.ly/python/user-guide/). -For information on configuring figure layout options (e.g. axes, titles, legends, etc) see [*Layout Options*](https://plot.ly/python/#layout-options). +For information on configuring figure layout options (e.g. axes, titles, legends, etc) and styling figures (e.g. colors, fonts, annotations, images, shapes, etc.), see [*Plotly Fundamentals*](https://plot.ly/python/plotly-fundamentals/#fundamentals). -For information on styling figures (e.g. colors, fonts, annotations, images, shapes, etc.), see [*Style Options*](https://plot.ly/python/#style-options). And for information on theming plotly figures, see [*Theming and templates with plotly for Python*](https://plot.ly/python/templates/). +For information on theming plotly figures, see [*Theming and templates with plotly for Python*](https://plot.ly/python/templates/). For information on all of the ways that plotly figures can be displayed, see [*Displaying plotly figures with plotly for Python*](https://plot.ly/python/renderers/).