Skip to content

Add thumbnails for tutorials/gallery where missing #17479

Open
0 of 2 issues completed
Open

Description

@story645

There are a handful of gallery and tutorial examples that are missing thumbnails:
image

The examples lacking thumbnails should be updated so that either:

And yes, it's understandable that some of these don't have thumbnails, but then maybe we need a different section in the docs for non-graphical examples?

This is an inventory assuming #17477 goes in & a later upgrade to sphinx 0.7.1

Tutorials missing thumbnails:

tutorials

Text

Toolkits

Examples missing thumbnails

animation

interactive

misc

sgskip

units

All the Embedding examples

widgets #23441

Pinned by melissawm

Activity

  1. larsoner commented on May 21, 2020

    @larsoner
    Contributor

    This is an inventory assuming #17477 goes in & a later upgrade to sphinx 0.7.1

    Minor note, even the one that requires ArtistAnimation will have a thumbnail with that PR ("precomputed list of images"):

    https://37252-1385122-gh.circle-artifacts.com/0/doc/build/html/gallery/index.html#animation

    So it's not dependent upon Sphinx-gallery 0.7.1, just the animation of the thumbnail EDIT: and embedding of the animation will be. Unless you're referring to a different example...

  2. timhoffm commented on May 21, 2020

    @timhoffm
    Member

    Generally 👍, e.g. the embedding examples could show a screenshot.

    Even though it's called "Gallery" in the section title, I consider them more broadly as "Examples" (as is the top-level menu navigation item pointing to the gallery).

    With that interpretation, not every element in the gallery must have an image. Some times there is just no visualization and the default placeholder is fine, e.g. for https://matplotlib.org/devdocs/gallery/misc/font_indexing.html#sphx-glr-gallery-misc-font-indexing-py

  3. story645 commented on May 22, 2020

    @story645
    MemberAuthor

    I think the ones that don't have pictures should maybe be moved to a different part of the docs - either integrated into a tutorial or maybe a section of the gallery that's explicit about it not being visual.

    I think the placeholder ends up creating confusion (is this example broken?).

  4. ImportanceOfBeingErnest commented on May 22, 2020

    @ImportanceOfBeingErnest
    Member
  5. timhoffm commented on May 22, 2020

    @timhoffm
    Member

    I consider the thumbnail as a nice but optional illustrative add-on, but not as the essence of the example.

    (I would even be +0.5 on renaming "gallery" to "examples", the latter being more self-explanatory.)

  6. story645 commented on May 22, 2020

    @story645
    MemberAuthor

    not as the essence of the example

    I think it's the key part of the example, especially because visualization nomenclature isn't remotely consistent so often the thumbnail is what folks are working off of to figure out if this example will do the thing they want. I also think one of things Matplotlib most has as an advantage is it's a visualization library so can have visual examples that show what effect code is supposed to have. One of the very frustrating parts of a lot of the examples is they get so boiled down in boilerplate that it can sometimes be hard to figure out which line of code is responsible for the important bit & the thumbnail helps signpost that.

    So the gallery is renamed examples and has been for years (to the chagrin of some users), but that's almost a pedantic distinction given that there are like 627 examples of which maybe 30 are missing thumbnails. Except for widgets, there's no consistency in what's missing a thumbnail which is what makes the missing thumbnails look like an error. I have 0 issues with examples that don't provide a thumbnail if the examples can be reorganized such that it's clear that the choice was intentional.

    This can be as simple as adding an explicit "code examples" section to the gallery or alternatively what about a "this is code" thumbnail - little picture of code, something similar that makes it clear it wasn't a sphinx autogen fail?

  7. kritika12298 commented on May 24, 2020

    @kritika12298
  8. story645 commented on May 24, 2020

    @story645
    MemberAuthor

    Things that can be done for this issue:

    • take screenshots for the embedded guis - I'm now kind of wondering if this can't be automated with something like selenium or preferably just system tools
    • Run the other examples and see if they generate a useful image/something that can at least be screenshotted - if they generate an image, investigate why that's not being used as the thumbnail
    • Propose a thumbnail image for our code examples - this must be licensed such that we can use it & preferably would be an image generated specifically for this use case so that there are no licensing issues.

    The instructions for adding the images are listed above & the images should be as small as possible. For now add a folder to examples for thumbnails but expect it to be moved.

  9. kritika12298 commented on May 24, 2020

    @kritika12298
  10. whereistejas commented on May 24, 2020

    @whereistejas
  11. kritika12298 commented on May 24, 2020

    @kritika12298
  12. story645 commented on May 24, 2020

    @story645
    MemberAuthor

    the docs are built same as the code & you're going to need the most current source code so please follow the instructions at https://matplotlib.org/devdocs/devel/index.html

  13. timhoffm commented on May 24, 2020

    @timhoffm
    Member

    @story645

    What about a "this is code" thumbnail [...] that makes it clear it wasn't a sphinx autogen fail?

    I did not check, but I assume our doc build would fail if the example did not run properly. (And disregarding that, it would be better if failing examples got a special thumbnail directly by sphinx gallery, e.g. a warning sign).

    Overall, I'm not fundamentally opposed to a special non-plot thumbnail, I just don't think it's necessary.

  14. 72 remaining items

  15. added a commit that references this issue on Apr 1, 2026
    5f33bb8
  16. added a commit that references this issue on Apr 4, 2026
    3e6f58e
  17. timhoffm commented on Apr 22, 2026

    @timhoffm
    Member

    Incorrectly closed though #31365. Still some left to do.

  18. timhoffm commented on May 10, 2026

    @timhoffm
    Member

    Looking at the results of #31308 and 31365 I think we should revise the approach.

    It's nice that the gallery now has an image, but the example itself is still only wall of text. It would be nice to see the image also in the the example itself, so that one may have a better understanding what the result of the code is. For example the Embedding in Qt adds two toolbars one at the top, one at the bottom. That only becomes visible in the result.

    To be checked: I assume sphinx-gallery can only create thumbnails from generated figures, not embedded images. In that case we should do everything manually:

    • embed the screenshot using .. image: or .. figure in the example
    • set the screenshot as thumbnail

    Also check whether one image is good for both or whether we should have different sizes for example and thumbnail.

  19. ikejourney commented on Jun 8, 2026

    @ikejourney

    Hi, I'd like to help with this in small documentation-only chunks.

    My proposed approach is:

    • avoid touching entries that already have linked PRs or are crossed out
    • start with one remaining gallery example at a time
    • for each PR, add either a sphinx_gallery_thumbnail_number or a sphinx_gallery_thumbnail_path, depending on whether the example already generates a suitable image
    • keep each PR limited to one small group of related examples so review is easy

    The first target I would check is one of the still-listed sgskip examples under gallery/misc, such as font_indexing.py or print_stdout_sgskip.py, because they look like isolated gallery/documentation changes. If that direction sounds reasonable, I'll open a small PR for one example first rather than trying to cover the full inventory at once.

  20. added a commit that references this issue on Jul 2, 2026
    0bf024e
  21. harshitnagar22 commented on Jul 2, 2026

    @harshitnagar22

    Hey everyone! Just opened PR #31986 that covers the remaining examples from the checklist that still didn't have thumbnails. Would appreciate a review whenever someone gets a chance! 🙏

  22. timhoffm commented on Jul 3, 2026

    @timhoffm
    Member

    @story645 on a side-note: Thumbnails are a nice extension, but I'd like to see the images also in the examples; e.g. here it would also be helpful to add a screenshot of theUI:
    https://matplotlib.org/stable/gallery/user_interfaces/embedding_in_qt_sgskip.html

  23. hemant2186 commented on Jul 8, 2026

    @hemant2186

    Hi! I'd like to work on one remaining documentation example for this issue.

    I'll start with a single example (likely one of the remaining embedding/user interface examples) by adding an appropriate screenshot and thumbnail, then open a small PR for review.

  24. kunjagarwal-dev commented on Aug 1, 2026

    @kunjagarwal-dev

    "Hi ! I'm interested in working on this issue. I'm a beginner contributor. Could someone guide me on which tutorial still needs thumbnails and how to add them?"

  25. melissawm commented on Aug 3, 2026

    @melissawm
    Member

    Hi @kunjagarwal-dev - the most up-to-date examples gallery is here: https://matplotlib.org/devdocs/gallery/index.html

    You can see the PRs that were linked to this issue and were merged for ideas on how to add the thumbnails (for example, #31365)

  26. nj-codes-24 commented on Aug 19, 2026

    @nj-codes-24

    Hi! I'd like to work on this issue as one of my first open source contributions. I'll start with the gallery/event_handling/pong_sgskip.py example — it looks like it doesn't have a linked PR yet. My plan is to add a sphinx_gallery_thumbnail_path/sphinx_gallery_thumbnail_number (whichever fits) so it gets a proper thumbnail, following the pattern from the already-merged PRs (e.g. #31365). Will open a small, focused PR once it's ready. Let me know if this one's already spoken for!

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Documentation🌱 Good first issueOpen a pull request against these issues if there are no active ones!

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions