Skip to content

Commit 50fa0da

Browse files
new extension docs
1 parent 7595f4b commit 50fa0da

File tree

4 files changed

+73
-75
lines changed

4 files changed

+73
-75
lines changed

README.md

+17-20
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Our recommended IDE for Plotly’s Python graphing library is Dash Enterprise’
3939

4040
`pip install plotly==4.14.3`
4141

42-
Inside [Jupyter notebook](https://jupyter.org/install) (installable with `pip install "notebook>=5.3" "ipywidgets>=7.5"`):
42+
Inside [Jupyter](https://jupyter.org/install) (installable with `pip install "jupyterlab>=3" "ipywidgets>=7.6"`):
4343

4444
```python
4545
import plotly.graph_objects as go
@@ -95,48 +95,45 @@ or conda.
9595
conda install -c plotly plotly=4.14.3
9696
```
9797

98-
### Jupyter Notebook Support
98+
### JupyterLab Support
9999

100-
For use in the Jupyter Notebook, install the `notebook` and `ipywidgets`
100+
For use in [JupyterLab](https://jupyterlab.readthedocs.io/en/stable/), install the `jupyterlab` and `ipywidgets`
101101
packages using `pip`:
102102

103103
```
104-
pip install "notebook>=5.3" "ipywidgets>=7.5"
104+
$ pip install "jupyterlab>=3" "ipywidgets>=7.6"
105105
```
106106

107107
or `conda`:
108108

109109
```
110-
conda install "notebook>=5.3" "ipywidgets>=7.5"
110+
$ conda install "jupyterlab>=3" "ipywidgets>=7.6"
111111
```
112112

113-
### JupyterLab Support
114-
115-
For use in JupyterLab, install the `jupyterlab` and `ipywidgets`
116-
packages using `pip`:
113+
The instructions above apply to JupyterLab 3.x. **For JupyterLab 2 or earlier**, run the following commands to install the required JupyterLab extensions (note that this will require [`node`](https://nodejs.org/) to be installed):
117114

118115
```
119-
pip install jupyterlab "ipywidgets>=7.5"
116+
# JupyterLab 2.x renderer support
117+
jupyter labextension install [email protected] @jupyter-widgets/jupyterlab-manager
120118
```
121119

122-
or `conda`:
120+
Please check out our [Troubleshooting guide](https://plotly.com/python/troubleshooting/) if you run into any problems with JupyterLab.
121+
122+
### Jupyter Notebook Support
123+
124+
For use in the Jupyter Notebook, install the `notebook` and `ipywidgets`
125+
packages using `pip`:
123126

124127
```
125-
conda install jupyterlab "ipywidgets>=7.5"
128+
pip install "notebook>=5.3" "ipywidgets>=7.5"
126129
```
127130

128-
Then run the following commands to install the required JupyterLab extensions (note that this will require [`node`](https://nodejs.org/) to be installed):
131+
or `conda`:
129132

130133
```
131-
# Basic JupyterLab renderer support
132-
jupyter labextension install [email protected]
133-
134-
# OPTIONAL: Jupyter widgets extension for FigureWidget support
135-
jupyter labextension install @jupyter-widgets/jupyterlab-manager [email protected]
134+
conda install "notebook>=5.3" "ipywidgets>=7.5"
136135
```
137136

138-
Please check out our [Troubleshooting guide](https://plotly.com/python/troubleshooting/) if you run into any problems with JupyterLab.
139-
140137
### Static Image Export
141138

142139
plotly.py supports [static image export](https://plotly.com/python/static-image-export/),

doc/python/getting-started.md

+28-40
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jupyter:
66
extension: .md
77
format_name: markdown
88
format_version: '1.2'
9-
jupytext_version: 1.6.0
9+
jupytext_version: 1.4.2
1010
kernelspec:
1111
display_name: Python 3
1212
language: python
@@ -34,7 +34,6 @@ jupyter:
3434
- /python/pytables/
3535
---
3636

37-
<!-- #region -->
3837

3938
### Overview
4039

@@ -72,7 +71,6 @@ This package contains everything you need to write figures to standalone HTML fi
7271

7372
> 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.**
7473
75-
<!-- #endregion -->
7674

7775
```python
7876
import plotly.graph_objects as go
@@ -93,32 +91,28 @@ snippet_url = 'https://dash-gallery.plotly.host/python-docs-dash-snippets/'
9391
IFrame(snippet_url + 'getting-started', width='100%', height=630)
9492
```
9593

96-
<!-- #region -->
97-
98-
#### Jupyter Notebook Support
94+
#### JupyterLab Support
9995

100-
For use in the classic [Jupyter Notebook](https://jupyter.org/), install the `notebook` and `ipywidgets`
96+
For use in [JupyterLab](https://jupyterlab.readthedocs.io/en/stable/), install the `jupyterlab` and `ipywidgets`
10197
packages using `pip`:
10298

10399
```
104-
$ pip install "notebook>=5.3" "ipywidgets>=7.5"
100+
$ pip install "jupyterlab>=3" "ipywidgets>=7.6"
105101
```
106102

107103
or `conda`:
108104

109105
```
110-
$ conda install "notebook>=5.3" "ipywidgets>=7.5"
106+
$ conda install "jupyterlab>=3" "ipywidgets>=7.6"
111107
```
112108

113-
These packages contain everything you need to run a Jupyter notebook...
109+
These packages contain everything you need to run JupyterLab...
114110

115111
```
116-
$ jupyter notebook
112+
$ jupyter lab
117113
```
118114

119-
and display plotly figures inline using the notebook renderer...
120-
121-
<!-- #endregion -->
115+
and display plotly figures inline using the `plotly_mimetype` renderer...
122116

123117
```python
124118
import plotly.graph_objects as go
@@ -134,65 +128,61 @@ fig = go.FigureWidget(data=go.Bar(y=[2, 3, 1]))
134128
fig
135129
```
136130

137-
<!-- #region -->
131+
The instructions above apply to JupyterLab 3.x. **For JupyterLab 2 or earlier**, run the following commands to install the required JupyterLab extensions (note that this will require [`node`](https://nodejs.org/) to be installed):
132+
133+
```
134+
# JupyterLab 2.x renderer support
135+
jupyter labextension install [email protected] @jupyter-widgets/jupyterlab-manager
136+
```
137+
138+
Please check out our [Troubleshooting guide](/python/troubleshooting/) if you run into any problems with JupyterLab, particularly if you are using multiple python environments inside Jupyter.
139+
138140

139141
See [_Displaying Figures in Python_](/python/renderers/) for more information on the renderers framework, and see [_Plotly FigureWidget Overview_](/python/figurewidget/) for more information on using `FigureWidget`.
140142

141-
#### JupyterLab Support
142143

143-
For use in [JupyterLab](https://jupyterlab.readthedocs.io/en/stable/), install the `jupyterlab` and `ipywidgets`
144-
packages using `pip`:
145144

146-
```
147-
$ pip install jupyterlab "ipywidgets>=7.6"
148-
```
145+
#### Jupyter Notebook Support
149146

150-
or `conda`:
147+
For use in the classic [Jupyter Notebook](https://jupyter.org/), install the `notebook` and `ipywidgets`
148+
packages using `pip`:
151149

152150
```
153-
$ conda install jupyterlab "ipywidgets>=7.6"
151+
$ pip install "notebook>=5.3" "ipywidgets>=7.5"
154152
```
155153

156-
For JupyterLab 2 or earlier, run the following commands to install the required JupyterLab extensions (note that this will require [`node`](https://nodejs.org/) to be installed):
154+
or `conda`:
157155

158156
```
159-
# JupyterLab renderer support
160-
jupyter labextension install [email protected]
161-
162-
# OPTIONAL: Jupyter widgets extension
163-
jupyter labextension install @jupyter-widgets/jupyterlab-manager [email protected]
157+
$ conda install "notebook>=5.3" "ipywidgets>=7.5"
164158
```
165159

166-
These packages contain everything you need to run JupyterLab...
160+
These packages contain everything you need to run a Jupyter notebook...
167161

168162
```
169-
$ jupyter lab
163+
$ jupyter notebook
170164
```
171165

172-
and display plotly figures inline using the `plotly_mimetype` renderer...
166+
and display plotly figures inline using the notebook renderer...
173167

174-
<!-- #endregion -->
175168

176169
```python
177170
import plotly.graph_objects as go
178171
fig = go.Figure(data=go.Bar(y=[2, 3, 1]))
179172
fig.show()
180173
```
181174

182-
or using `FigureWidget` objects (if the "OPTIONAL" step above was executed).
175+
or using `FigureWidget` objects.
183176

184177
```python
185178
import plotly.graph_objects as go
186179
fig = go.FigureWidget(data=go.Bar(y=[2, 3, 1]))
187180
fig
188181
```
189182

190-
Please check out our [Troubleshooting guide](/python/troubleshooting/) if you run into any problems with JupyterLab, particularly if you are using multiple python environments inside Jupyter.
191-
192-
<!-- #region -->
193-
194183
See [_Displaying Figures in Python_](/python/renderers/) for more information on the renderers framework, and see [_Plotly FigureWidget Overview_](/python/figurewidget/) for more information on using `FigureWidget`.
195184

185+
196186
### Static Image Export
197187

198188
plotly.py supports [static image export](https://plotly.com/python/static-image-export/),
@@ -283,5 +273,3 @@ Once you've installed, you can use our documentation in three main ways:
283273
For information on using Python to build web applications containing plotly figures, see the [_Dash User Guide_](https://dash.plotly.com/).
284274

285275
We also encourage you to join the [Plotly Community Forum](http://community.plotly.com/) if you want help with anything related to `plotly`.
286-
287-
<!-- #endregion -->

doc/python/renderers.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jupyter:
66
extension: .md
77
format_name: markdown
88
format_version: '1.2'
9-
jupytext_version: 1.6.0
9+
jupytext_version: 1.4.2
1010
kernelspec:
1111
display_name: Python 3
1212
language: python
@@ -20,7 +20,7 @@ jupyter:
2020
name: python
2121
nbconvert_exporter: python
2222
pygments_lexer: ipython3
23-
version: 3.7.6
23+
version: 3.7.7
2424
plotly:
2525
description: Displaying Figures using Plotly's Python graphing library
2626
display_as: file_settings
@@ -72,7 +72,7 @@ fig
7272

7373
> To be precise, figures will display themselves using the current default renderer when the two following conditions are true. First, the last expression in a cell must evaluate to a figure. Second, `plotly.py` must be running from within an `IPython` kernel.
7474
75-
**In many contexts, an appropriate renderer will be chosen automatically and you will not need to perform any additional configuration.** These contexts include the classic [Jupyter Notebook](https://jupyter.org/), [JupyterLab](https://jupyterlab.readthedocs.io/en/stable/) (provided the `plotlywidget` JupyterLab extension is installed), [Visual Studio Code notebooks](https://code.visualstudio.com/docs/python/jupyter-support), [Google Colaboratory](https://colab.research.google.com/notebooks/intro.ipynb), [Kaggle](https://www.kaggle.com/kernels) notebooks, [Azure](https://notebooks.azure.com/) notebooks, and the [Python interactive shell](https://www.python.org/shell/).
75+
**In many contexts, an appropriate renderer will be chosen automatically and you will not need to perform any additional configuration.** These contexts include the classic [Jupyter Notebook](https://jupyter.org/), [JupyterLab](https://jupyterlab.readthedocs.io/en/stable/), [Visual Studio Code notebooks](https://code.visualstudio.com/docs/python/jupyter-support), [Google Colaboratory](https://colab.research.google.com/notebooks/intro.ipynb), [Kaggle](https://www.kaggle.com/kernels) notebooks, [Azure](https://notebooks.azure.com/) notebooks, and the [Python interactive shell](https://www.python.org/shell/).
7676

7777
Additional contexts are supported by choosing a compatible renderer including the [IPython console](https://docs.spyder-ide.org/ipythonconsole.html), [QtConsole](https://qtconsole.readthedocs.io/en/stable/), [Spyder](https://www.spyder-ide.org/), and more.
7878

@@ -169,7 +169,7 @@ This renderer may be useful when working with notebooks than contain lots of lar
169169

170170
###### `plotly_mimetype`
171171

172-
The `plotly_mimetype` renderer creates a specification of the figure (called a MIME-type bundle), and requests that the current user interface displays it. User interfaces that support this renderer include [JupyterLab](https://jupyterlab.readthedocs.io/en/stable/) (requires the [`plotlywidget`](https://www.npmjs.com/package/plotlywidget) extension), [nteract](https://nteract.io/), and the Visual Studio Code [notebook interface](https://code.visualstudio.com/docs/python/jupyter-support).
172+
The `plotly_mimetype` renderer creates a specification of the figure (called a MIME-type bundle), and requests that the current user interface displays it. User interfaces that support this renderer include [JupyterLab](https://jupyterlab.readthedocs.io/en/stable/), [nteract](https://nteract.io/), and the Visual Studio Code [notebook interface](https://code.visualstudio.com/docs/python/jupyter-support).
173173

174174
###### `jupyterlab`, `nteract`, and `vscode`
175175
These are aliases for `plotly_mimetype` since this renderer is a good choice when working in JupyterLab, nteract, and the Visual Studio Code notebook interface. Note that in VSCode Notebooks, the version of Plotly.js that is used to render is provided by the [vscode-python extension](https://code.visualstudio.com/docs/languages/python) and often trails the latest version by several weeks, so the latest features of `plotly` may not be available in VSCode right away. The situation is similar for Nteract.

0 commit comments

Comments
 (0)