Skip to content

Commit 214a6ec

Browse files
committed
fixing tags
1 parent 837650d commit 214a6ec

File tree

4 files changed

+40
-34
lines changed

4 files changed

+40
-34
lines changed

doc/_static/mpl.css

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -167,12 +167,13 @@ div.wide-table table th.stub {
167167
display: inline;
168168
}
169169

170-
/*sdd is a custom class that strips out styling from dropdowns
171-
* Example usage:
172-
*
173-
* .. dropdown::
174-
:class-container: sdd
175-
*/
170+
/* sdd is a custom class that strips out styling from dropdowns
171+
* Example usage:
172+
*
173+
* .. dropdown::
174+
* :class-container: sdd
175+
*
176+
*/
176177

177178
.sdd.sd-dropdown {
178179
box-shadow: none!important;
@@ -196,9 +197,9 @@ div.wide-table table th.stub {
196197
/* section-toc is a custom class that removes the page title from a toctree listing
197198
* Example usage:
198199
*
199-
* .. rst-class:: section-toc
200+
* .. rst-class:: section-toc
201+
* .. toctree::
200202
*
201-
* .. toctree::
202203
*/
203204
.section-toc.toctree-wrapper .toctree-l1>a{
204205
display: none;

doc/devel/document.rst

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,45 +1059,52 @@ examples exist so that users can scan through visual examples. Unlike tutorials
10591059
guides, gallery examples teach by demonstration, rather than by explanation or
10601060
instruction.
10611061

1062-
Gallery examples should contain a very brief description of *what* they demonstrate and,
1063-
when relevant, *how* it is achieved. Avoid instructions or excessive explanation;
1064-
instead, tag with related concepts and cross-link to relevant tutorials or user guides.
1062+
Gallery examples should contain a very brief description of *what* is being demonstrated
1063+
and, when relevant, *how* it is achieved. Explanations should be brief, providing only
1064+
the minimal context necessary for understanding the example. Cross-link related
1065+
documentation (e.g. tutorials, user guides and API entries) and tag the example with
1066+
related concepts.
10651067

10661068
Format
10671069
^^^^^^
10681070

10691071
All :ref:`examples-index` should aim to follow these guidelines:
10701072

10711073
:Title: Describe content in a short sentence (approx. 1-6 words). Do not use *demo* as
1072-
this is implied by being an example. Avoid implied verbs such as "creating,
1073-
making, etc", e.g. "annotated heatmaps" is preferred to "creating annotated
1074-
heatmaps". Use the simple present tense when a verb is necessary, e.g. *Fill the
1074+
this is implied by being an example. Avoid implied verbs such as *create*,
1075+
*make*, etc, e.g. *annotated heatmaps* is preferred to *create annotated
1076+
heatmaps*. Use the simple present tense when a verb is necessary, e.g. *Fill the
10751077
area between two curves*
10761078

1077-
:Subtitle: In a short paragraph (approx 1-3 sentences) describe what visualization
1078-
technique is being demonstrated and how library features are used to execute
1079-
the technique, e.g. *Set bar color and bar label entries using the color and
1080-
label parameters of ~Axes.bar*
1079+
:Description: In a short paragraph (approx 1-3 sentences) describe what visualization
1080+
technique is being demonstrated and how library features are used to
1081+
execute the technique, e.g. *Set bar color and bar label entries using the
1082+
color and label parameters of ~Axes.bar*
10811083

10821084
:Plot: Clearly demonstrate the subject and, when possible, show edge cases and different
10831085
applications. While the plot should be visually appealing, prioritize keeping the
10841086
plot uncluttered.
10851087

10861088
:Code: Write the minimum necessary to showcase the feature that is the focus of the
1087-
example. Avoid styling and annotation-such as setting titles, legends, colors,
1088-
etc.- when it will not improve the clarity of the example.
1089+
example. Avoid custom styling and annotation (titles, legends, colors, etc.)
1090+
when it will not improve the clarity of the example.
10891091

1090-
:Text: Use short comments sparingly to describe what hard to follow parts of code are
1092+
Use short comments sparingly to describe what hard to follow parts of code are
10911093
doing. When more context or explanation is required, add a text paragraph before
10921094
the code example.
10931095

1094-
Example:
1096+
:doc:`/gallery/misc/bbox_intersect` demonstrates the point of visual examples.
1097+
This example is "messy" in that it's hard to categorize, but the gallery is the right
1098+
spot for it because it makes sense to find it by visual search
10951099

1096-
The ``bbox_intersect`` gallery example demonstrates the point of visual examples:
1100+
:doc:`/gallery/images_contours_and_fields/colormap_interactive_adjustment` is an
1101+
example of a good descriptive title that briefly summarizes how the showcased
1102+
library features are used to implement the demonstrated visualization technique.
10971103

1098-
* this example is "messy" in that it's hard to categorize, but the gallery is the right
1099-
spot for it because it makes sense to find it by visual search
1100-
* https://matplotlib.org/devdocs/gallery/misc/bbox_intersect.html#sphx-glr-gallery-misc-bbox-intersect-py
1104+
:doc:`/gallery/lines_bars_and_markers/lines_with_ticks_demo` is an example of having a
1105+
minimal amount of code necessary to showcase the feature. The lack of extraneous code
1106+
makes it easier for the reader to map which parts of code correspond to which parts of
1107+
the plot.
11011108

11021109
Miscellaneous
11031110
=============

doc/devel/tag_guidelines.rst

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,12 @@ Hidden tags provide additional functionality for maintainers and contributors.
1818

1919
How to tag?
2020
-----------
21-
Place the tag directive at the bottom of each page and add the tags underneath
21+
Place the tag directive at the bottom of each page and add the tags underneath, e.g.:
2222

23-
.. code-block:: python
24-
25-
# fig, ax = plt.subplots()
26-
# ax.plot([1,2,3], [3,2,1], linestyle=':')
27-
#
28-
# .. tags::
29-
# plot-type: line, styling: texture,
23+
.. code-block:: rst
3024
25+
.. tags::
26+
topic: tagging, purpose: reference
3127
3228
What gets a tag?
3329
----------------

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,8 @@ ignore_directives = [
280280
"ifconfig",
281281
# sphinx.ext.inheritance_diagram
282282
"inheritance-diagram",
283+
# sphinx-tags
284+
"tags",
283285
# include directive is causing attribute errors
284286
"include"
285287
]

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy