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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ galleries/examples/*/*.svgz
result_images
doc/_static/constrained_layout*.png
doc/.mpl_skip_subdirs.yaml
doc/_tags

# Nose/Pytest generated files #
###############################
Expand Down
5 changes: 5 additions & 0 deletions doc/_static/mpl.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
--pst-color-link-hover: var(--pst-color-secondary);
--sd-color-primary: var(--pst-color-primary);
--sd-color-primary-text: var(--pst-color-text-base);
--sd-color-secondary: #ee9040;
--sd-color-success: #28a745;
--sd-color-dark: #323232;
--sd-color-danger: #dc3545;
--sd-color-light: #c9c9c9;
Comment on lines +6 to +10
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.

Where do these colours come from? Are there not any variable in pydata-sphinx-theme that correspond to them?

}

.simple li>p {
Expand Down
13 changes: 13 additions & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ def _parse_skip_subdirs_file():
'sphinxext.redirect_from',
'sphinx_copybutton',
'sphinx_design',
'sphinx_tags',
]

exclude_patterns = [
Expand Down Expand Up @@ -282,6 +283,18 @@ def gallery_image_warning_filter(record):
logger = logging.getLogger('sphinx')
logger.addFilter(gallery_image_warning_filter)

# Sphinx tags configuration
tags_create_tags = True
tags_page_title = "All tags"
tags_create_badges = True
tags_badge_colors = {
"animation": "primary",
"component:*": "secondary",
"event-handling": "success",
"interactivity:*": "dark",
"plot-type:*": "danger",
"*": "light" # default value
}

mathmpl_fontsize = 11.0
mathmpl_srcset = ['2x']
Expand Down
1 change: 1 addition & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ dependencies:
- sphinx-copybutton
- sphinx-gallery>=0.12
- sphinx-design
- sphinx-tags>=0.3.0
- pip
- pip:
- mpl-sphinx-theme
Expand Down
5 changes: 5 additions & 0 deletions galleries/examples/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,8 @@ and source code.
For longer tutorials, see our :ref:`tutorials page <tutorials>`.
You can also find :ref:`external resources <resources-index>` and
a :ref:`FAQ <faq-index>` in our :ref:`user guide <users-guide-index>`.


.. admonition:: Tagging!

You can also browse the example gallery by :ref:`tags <tagoverview>`.
3 changes: 3 additions & 0 deletions galleries/examples/animation/animated_histogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,6 @@ def animate(frame_number):
ani = animation.FuncAnimation(fig, prepare_animation(bar_container), 50,
repeat=False, blit=True)
plt.show()

# %%
# .. tags:: plot-type: histogram, animation
2 changes: 2 additions & 0 deletions galleries/examples/animation/multiple_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,5 @@ def animate(i):
#
# - `matplotlib.patches.ConnectionPatch`
# - `matplotlib.animation.FuncAnimation`
#
# .. tags:: component: axes, animation
3 changes: 3 additions & 0 deletions galleries/examples/event_handling/resample.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,6 @@ def update(self, ax):
ax.callbacks.connect('xlim_changed', d.update)
ax.set_xlim(16, 365)
plt.show()

# %%
# .. tags:: interactivity: zoom, event-handling
1 change: 1 addition & 0 deletions requirements/doc/doc-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ sphinxcontrib-svg2pdfconverter>=1.1.0
sphinx-gallery>=0.12.0
sphinx-copybutton
sphinx-design
sphinx-tags>=0.3.0