Skip to content

Commit 62a0ad1

Browse files
Update troubleshooting.md
1 parent ef60cf5 commit 62a0ad1

File tree

1 file changed

+18
-16
lines changed

1 file changed

+18
-16
lines changed

doc/python/troubleshooting.md

+18-16
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jupyter:
3737
<!-- #region -->
3838
### Version Problems
3939

40-
In order to follow the examples in this documentation, you should have the latest version of `plotly` installed (4.x), as detailed in the [Getting Started](/python/getting-started) guide. This documentation (under https://plotly.com/python) is incompatible with `plotly` version 3.x, for which the documentation is available under https://plotly.com/python/v3.
40+
In order to follow the examples in this documentation site, you should have the latest version of `plotly` installed (4.x), as detailed in the [Getting Started](/python/getting-started) guide. This documentation (under https://plotly.com/python) is incompatible with `plotly` version 3.x, for which the documentation is available under https://plotly.com/python/v3. In general you must also have the correct version of the underlying Plotly.js rendering engine installed, and the way to do that depends on the environment in which you are rendering figures: Dash, Jupyter Lab or Classic Notebook, VSCode etc. Read on for details about troubleshooting `plotly` in these environments.
4141

4242
### Import Problems
4343

@@ -62,24 +62,10 @@ IFrame(snippet_url + 'renderers', width='100%', height=630)
6262
```
6363

6464
<!-- #region -->
65-
### Jupyter Notebook Classic Problems
66-
67-
The classic Jupyter Notebook (i.e. launched with `jupyter notebook`) sometimes suffers from a problem whereby if you close the window and reopen it, your plots render as blank spaces.
68-
69-
The easiest solution is to force the `notebook` renderer to reload by calling `fig.show("notebook")` instead of just `fig.show()`.
70-
71-
If this problem is recurrent, you may safely run the following code in a Notebook (not in JupyterLab!) at any time and it should restore your figures (for example, you may put it at the top of your notebook for easy access):
72-
73-
```python
74-
import plotly.io as pio
75-
pio.renderers.default='notebook'
76-
```
77-
78-
As a last resort, you can "Restart & Clear Output" from the Kernel menu and rerun your notebook.
7965

8066
### JupyterLab Problems
8167

82-
In order to use `plotly` in JupyterLab, you *must have the extensions installed* as detailed in the [Getting Started guide](/python/getting-started). There are two extensions: `jupyterlab-plotly` for rendering figures with `fig.show()` and `plotlywidget` for the `FigureWidget`. Please note that the *extension version matters*: the extension versions in the [Getting Started](/python/getting-started) guide match the version of `plotly` at the top of the guide and so they should be installed together. Note also that these extensions are meant to work with JupyterLab 1.x and 2.x but not 0.x.
68+
In order to use `plotly` in JupyterLab, you *must have the extensions installed* as detailed in the [Getting Started guide](/python/getting-started). There are two extensions: `jupyterlab-plotly` for rendering figures with `fig.show()` and `plotlywidget` for the `FigureWidget`. Please note that the *extension version matters*: the extension versions in the [Getting Started](/python/getting-started) guide match the version of `plotly` at the top of the guide and so they should be installed together.
8369

8470
To list your current extensions, run the following command in a terminal shell **from the same environment as JupyterLab was launched**:
8571

@@ -121,6 +107,22 @@ unset NODE_OPTIONS
121107
# (Windows)
122108
set NODE_OPTIONS=
123109
```
110+
111+
### Jupyter Classic Notebook Problems
112+
113+
The classic Jupyter Notebook (i.e. launched with `jupyter notebook`) sometimes suffers from a problem whereby if you close the window and reopen it, your plots render as blank spaces.
114+
115+
The easiest solution is to force the `notebook` renderer to reload by calling `fig.show("notebook")` instead of just `fig.show()`.
116+
117+
If this problem is recurrent, you may safely run the following code in a Notebook (not in JupyterLab!) at any time and it should restore your figures (for example, you may put it at the top of your notebook for easy access):
118+
119+
```python
120+
import plotly.io as pio
121+
pio.renderers.default='notebook'
122+
```
123+
124+
As a last resort, you can "Restart & Clear Output" from the Kernel menu and rerun your notebook.
125+
124126
<!-- #endregion -->
125127

126128
### VSCode Notebook, Nteract and Streamlit Problems

0 commit comments

Comments
 (0)