Skip to content

Commit

Permalink
fix plotly rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
fneum committed Feb 20, 2023
1 parent 671d57d commit 84461be
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
16 changes: 4 additions & 12 deletions data-science-for-esm/13-workshop-interactive-visualisation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -496,28 +496,20 @@
"metadata": {},
"outputs": [],
"source": [
"import plotly.express as px"
"import plotly.io as pio\n",
"import plotly.express as px\n",
"import plotly.offline as py"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
":::{note}\n",
"We need to set a non-default renderer, so that the interactive plots are also visible on the course's static website.\n",
"We need to import `plotly.io` and `plotly.offline`, so that the interactive plots are also visible on the course's static website.\n",
":::"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import plotly.io as pio\n",
"pio.renderers.default = \"notebook\""
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down
5 changes: 5 additions & 0 deletions data-science-for-esm/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,8 @@ parse:
- linkify
- colon_fence
- substitution

sphinx:
config:
html_js_files:
- https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js

0 comments on commit 84461be

Please sign in to comment.