Skip to content

Doc: Add thumbnail for font_indexing gallery example#31367

Open
monika-2906-git wants to merge 3 commits intomatplotlib:mainfrom
monika-2906-git:doc-fix-font-indexing-thumbnail
Open

Doc: Add thumbnail for font_indexing gallery example#31367
monika-2906-git wants to merge 3 commits intomatplotlib:mainfrom
monika-2906-git:doc-fix-font-indexing-thumbnail

Conversation

@monika-2906-git
Copy link
Copy Markdown

Fixes #17479

Added sphinx_gallery_thumbnail_path to font_indexing.py
which was missing a thumbnail in the gallery.

@github-actions github-actions bot added Documentation: examples files in galleries/examples Documentation: devdocs files in doc/devel labels Mar 24, 2026
This example shows how the font tables relate to one another.
"""

# sphinx_gallery_thumbnail_path = '_static/logo2.png'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What does the logo have to do w/ font indexing?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thank you for the review @story645! I have updated the thumbnail to use sphinx_gallery_thumbnail_number = -1 which is more appropriate for this example
as it will use the last generated output. I have also rebased onto main to fix the build error.

Copy link
Copy Markdown
Member

@story645 story645 Mar 25, 2026

Choose a reason for hiding this comment

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

Why do you think that would work given the output of this PR?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

My reasoning was that in Sphinx Gallery, the thumbnail is selected from the generated outputs, and using sphinx_gallery_thumbnail_number = -1 would pick the last output. I assumed that in this ,the final output would be the most appropriate figure, and therefore a good one for the thumbnail.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What's the output of this file?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

The output of this file is a set of visualizations showing how different font tables relate to each other in the font indexing process. It generates multiple figures as part of the example.
The final output mainly illustrates the structure between font properties rather than a single meaningful visual result. So using "sphinx_gallery_thumbnail_number = -1" may not always select the most representative figure.

If needed, I can instead choose a specific figure that better reflects the purpose of the example for the thumbnail.

@scottshambaugh
Copy link
Copy Markdown
Contributor

I believe you need to rebase onto main to fix the docs build error

@monika-2906-git monika-2906-git force-pushed the doc-fix-font-indexing-thumbnail branch from 98c2341 to 91abaf9 Compare March 25, 2026 16:44
@monika-2906-git
Copy link
Copy Markdown
Author

Fixes #17479

Added sphinx_gallery_thumbnail_path to font_indexing.py which was missing a thumbnail in the gallery.
I believe you need to rebase onto main to fix the docs build error
Thank you @scottshambaugh!
I have rebased onto main as suggested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation: devdocs files in doc/devel Documentation: examples files in galleries/examples

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add thumbnails for tutorials/gallery where missing

3 participants