Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions docs/api_examples/scatter_plot.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -293,12 +293,8 @@
"source": [
"# Imports\n",
"import pandas as pd\n",
"import plotly.io as pio\n",
"\n",
"from vuecore.plots.basic.scatter import create_scatter_plot\n",
"\n",
"# Set the Plotly renderer based on the environment\n",
"pio.renderers.default = \"notebook\""
"from vuecore.plots.basic.scatter import create_scatter_plot"
]
},
{
Expand Down
4 changes: 0 additions & 4 deletions docs/api_examples/scatter_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,9 @@
# %%
# Imports
import pandas as pd
import plotly.io as pio

from vuecore.plots.basic.scatter import create_scatter_plot

# Set the Plotly renderer based on the environment
pio.renderers.default = "notebook"

# %% [markdown]
# ### 0.3. Create sample data
# We create a synthetic dataset that contains simulated gene expression values, p-values, regulation status, and significance scores for 8 genes across two cell types.
Expand Down
9 changes: 7 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#
import os
from importlib import metadata
from pathlib import Path

# -- Project information -----------------------------------------------------

Expand Down Expand Up @@ -49,7 +50,7 @@
# Plolty support through require javascript library
# https://myst-nb.readthedocs.io/en/latest/render/interactive.html#plotly
html_js_files = [
"https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"
# "https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.7/require.min.js"
]

# https://myst-nb.readthedocs.io/en/latest/configuration.html
Expand Down Expand Up @@ -133,7 +134,11 @@
# https://github.com/readthedocs/readthedocs.org/issues/1139

if os.environ.get("READTHEDOCS") == "True":
from pathlib import Path
# Set the Plotly renderer to notebook for ReadTheDocs (visualize plotly figures
# in the documentation) - needed for plotly6
# Plotly normally decides itself fine which renderer to use, so keep it to RTD
# see https://plotly.com/python/renderers/#setting-the-default-renderer
os.environ["PLOTLY_RENDERER"] = "notebook"

PROJECT_ROOT = Path(__file__).parent.parent
PACKAGE_ROOT = PROJECT_ROOT / "src" / "vuecore"
Expand Down