Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add two more gallery examples #274

Merged
merged 6 commits into from
Oct 25, 2023
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 13 additions & 15 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,20 +220,18 @@
# -- Options for nbsphinx gallery------------------------------------------
notebook_root = 'gallery'
thumbnail_root = os.path.join('_static', 'gallery')
gallery_notebooks = [
'nyc-taxi',
'masking-a-range',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thumbnail missing?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some notebooks have their thumbnail auto-generated (the ones that are making 2d plots)

'rectangle-selection',
'scatter3d-with-threshold',
'scatter3d-with-slider',
'interactive-masking',
'peeling-layers',
]
nbsphinx_thumbnails = {
os.path.join(notebook_root, 'nyc-taxi'): os.path.join(
thumbnail_root, 'nyc-taxi-thumbnail.png'
),
os.path.join(notebook_root, 'masking-a-range'): os.path.join(
thumbnail_root, 'masking-a-range-thumbnail.png'
),
os.path.join(notebook_root, 'rectangle-selection'): os.path.join(
thumbnail_root, 'rectangle-selection-thumbnail.png'
),
os.path.join(notebook_root, 'scatter3d-with-threshold'): os.path.join(
thumbnail_root, 'scatter3d-with-threshold-thumbnail.png'
),
os.path.join(notebook_root, 'scatter3d-with-slider'): os.path.join(
thumbnail_root, 'scatter3d-with-slider-thumbnail.png'
),
os.path.join(notebook_root, notebook): os.path.join(
thumbnail_root, f'{notebook}-thumbnail.png'
)
for notebook in gallery_notebooks
}
19 changes: 15 additions & 4 deletions docs/gallery/index.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@
{
"cell_type": "markdown",
"id": "ad3c84db-66fa-4438-9475-5099eacf34ba",
"metadata": {},
"metadata": {
"editable": true,
"slideshow": {
"slide_type": ""
},
"tags": []
},
"source": [
"# Gallery"
]
Expand All @@ -12,6 +18,10 @@
"cell_type": "markdown",
"id": "6a6ec63f-51df-4bca-ab29-762f6d13420c",
"metadata": {
"editable": true,
"slideshow": {
"slide_type": ""
},
"tags": [
"nbsphinx-gallery"
]
Expand All @@ -21,7 +31,9 @@
"* [Masking a range](masking-a-range.ipynb)\n",
"* [Rectangle selection](rectangle-selection.ipynb)\n",
"* [3-D scatter plot with threshold](scatter3d-with-threshold.ipynb)\n",
"* [3-D scatter plot with slider](scatter3d-with-slider.ipynb)"
"* [3-D scatter plot with slider](scatter3d-with-slider.ipynb)\n",
"* [Interactive masking](interactive-masking.ipynb)\n",
"* [Peeling off the layers](peeling-layers.ipynb)"
]
}
],
Expand All @@ -40,8 +52,7 @@
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.15"
"pygments_lexer": "ipython3"
}
},
"nbformat": 4,
Expand Down
Loading