Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
22ee73c
DOC: add sphinx_gallery_thumbnail_number to artists tutorial
MohitPal2005 Mar 11, 2026
789d876
DOC: use minigallery directive for artists tutorial
MohitPal2005 Mar 12, 2026
6cac624
docs: restructure tutorial index with per-section minigalleries
MohitPal2005 Mar 18, 2026
38977ca
style: add newline at end of file
MohitPal2005 Mar 18, 2026
715b51f
docs: remove redundant add-heading and finalize section grouping
MohitPal2005 Mar 18, 2026
0b321e1
docs: fix minigallery relative paths and structure
MohitPal2005 Mar 18, 2026
1f0d834
docs: reorder tutorials in introductory minigallery
MohitPal2005 Mar 18, 2026
3802603
Update galleries/tutorials/index.rst
MohitPal2005 Mar 19, 2026
e6c3f94
docs: configure minigallery_sort_order to use ExplicitOrder
MohitPal2005 Mar 19, 2026
b8a8bcb
docs: revert *.py to manual list to fix toctree warnings
MohitPal2005 Mar 19, 2026
6854945
docs: dynamically preserve minigallery order using itertools
MohitPal2005 Mar 19, 2026
c18c378
style: fix pep8 whitespace and blank line linting errors
MohitPal2005 Mar 19, 2026
53882e0
docs: move preserve_order to gallery_order.py to fix parallel build p…
MohitPal2005 Mar 19, 2026
502ab70
style: fix PEP 8 blank lines and add EOF newline
MohitPal2005 Mar 19, 2026
6b8010d
style: add missing newline at end of file
MohitPal2005 Mar 19, 2026
d2444a8
Flatten tutorial minigallery to match original page order
MohitPal2005 Apr 10, 2026
4791c65
Merge branch 'main' of https://github.com/matplotlib/matplotlib into …
MohitPal2005 Apr 10, 2026
38c370a
Fix minigallery paths to use relative patterns
MohitPal2005 Apr 10, 2026
306dad0
Fix minigallery paths to match examples_dirs
MohitPal2005 Apr 10, 2026
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
7 changes: 7 additions & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ def _check_dependencies():

# Import only after checking for dependencies.
import sphinx_gallery
from sphinx_gallery.sorting import ExplicitOrder

if parse_version(sphinx_gallery.__version__) >= parse_version('0.16.0'):
gallery_order_sectionorder = 'sphinxext.gallery_order.sectionorder'
Expand Down Expand Up @@ -293,6 +294,12 @@ def autodoc_process_bases(app, name, obj, options, bases):

sphinx_gallery_conf = {
'backreferences_dir': Path('api', '_as_gen'),
'minigallery_sort_order': ExplicitOrder([
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.

I was wrong then, you're gonna want something more general (probably) - dig into the sphinx gallery side and see if there's a way to turn off sorting/pass a 'don't sort' key to sorted

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.

Or write something like a yield function/counter such that every entry is mapped to its index (itertools should have something that does the trick). Basically a key function such that the input to sorted doesn't actually get sorted.

'../galleries/tutorials/coding_shortcuts.py',
'../galleries/tutorials/images.py',
'../galleries/tutorials/pyplot.py',
'*'
]),
# Compression is a significant effort that we skip for local and CI builds.
'compress_images': ('thumbnails', 'images') if is_release_build else (),
'doc_module': ('matplotlib', 'mpl_toolkits'),
Expand Down
125 changes: 19 additions & 106 deletions galleries/tutorials/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,124 +9,37 @@ For shorter examples, see our :ref:`examples page <examples-index>`.
You can also find :ref:`external resources <resources-index>` and
a :ref:`FAQ <howto-faq>` in our :ref:`user guide <users-guide-index>`.

Introductory
------------

.. raw:: html

<div class="sphx-glr-thumbnails">


.. raw:: html

<div class="sphx-glr-thumbcontainer" tooltip="An introduction to the pyplot interface. Please also see quick_start for an overview of how Ma...">

.. only:: html

.. image:: /tutorials/images/thumb/sphx_glr_pyplot_thumb.png
:alt: Pyplot tutorial

:ref:`sphx_glr_tutorials_pyplot.py`

.. raw:: html

<div class="sphx-glr-thumbnail-title">Pyplot tutorial</div>
</div>


.. raw:: html

<div class="sphx-glr-thumbcontainer" tooltip="Coding shortcuts">

.. only:: html

.. image:: /tutorials/images/thumb/sphx_glr_coding_shortcuts_thumb.png
:alt: Coding shortcuts

:ref:`sphx_glr_tutorials_coding_shortcuts.py`

.. raw:: html

<div class="sphx-glr-thumbnail-title">Coding shortcuts</div>
</div>


.. raw:: html

<div class="sphx-glr-thumbcontainer" tooltip="A short tutorial on plotting images with Matplotlib.">

.. only:: html

.. image:: /tutorials/images/thumb/sphx_glr_images_thumb.png
:alt: Image tutorial

:ref:`sphx_glr_tutorials_images.py`

.. raw:: html

<div class="sphx-glr-thumbnail-title">Image tutorial</div>
</div>


.. raw:: html

<div class="sphx-glr-thumbcontainer" tooltip="This tutorial aims to show the beginning, middle, and end of a single visualization using Matpl...">

.. only:: html

.. image:: /tutorials/images/thumb/sphx_glr_lifecycle_thumb.png
:alt: The Lifecycle of a Plot

:ref:`sphx_glr_tutorials_lifecycle.py`

.. raw:: html

<div class="sphx-glr-thumbnail-title">The Lifecycle of a Plot</div>
</div>


.. raw:: html

<div class="sphx-glr-thumbcontainer" tooltip="Using Artist objects to render on the canvas.">

.. only:: html

.. image:: /tutorials/images/thumb/sphx_glr_artists_thumb.png
:alt: Artist tutorial
.. minigallery::
Comment thread
story645 marked this conversation as resolved.

:ref:`sphx_glr_tutorials_artists.py`
../galleries/tutorials/pyplot.py
../galleries/tutorials/coding_shortcuts.py
../galleries/tutorials/images.py
Comment thread
story645 marked this conversation as resolved.

.. raw:: html
Intermediate
------------

<div class="sphx-glr-thumbnail-title">Artist tutorial</div>
</div>
.. minigallery::

../galleries/tutorials/lifecycle.py

.. raw:: html
Advanced
--------

</div>
.. minigallery::

../galleries/tutorials/artists.py

.. toctree::
:hidden:

/tutorials/pyplot
/tutorials/coding_shortcuts
/tutorials/images
/tutorials/lifecycle
/tutorials/artists

.. only:: html

.. container:: sphx-glr-footer sphx-glr-footer-gallery

.. container:: sphx-glr-download sphx-glr-download-python

:download:`Download all examples in Python source code: tutorials_python.zip </tutorials/tutorials_python.zip>`

.. container:: sphx-glr-download sphx-glr-download-jupyter

:download:`Download all examples in Jupyter notebooks: tutorials_jupyter.zip </tutorials/tutorials_jupyter.zip>`


pyplot
coding_shortcuts
images
lifecycle
artists
Comment thread
MohitPal2005 marked this conversation as resolved.
Outdated

.. _user_guide_tutorials:

Expand Down
Loading