@@ -1059,45 +1059,52 @@ examples exist so that users can scan through visual examples. Unlike tutorials
1059
1059
guides, gallery examples teach by demonstration, rather than by explanation or
1060
1060
instruction.
1061
1061
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.
1065
1067
1066
1068
Format
1067
1069
^^^^^^
1068
1070
1069
1071
All :ref: `examples-index ` should aim to follow these guidelines:
1070
1072
1071
1073
: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
1075
1077
area between two curves *
1076
1078
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 *
1081
1083
1082
1084
:Plot: Clearly demonstrate the subject and, when possible, show edge cases and different
1083
1085
applications. While the plot should be visually appealing, prioritize keeping the
1084
1086
plot uncluttered.
1085
1087
1086
1088
: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.
1089
1091
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
1091
1093
doing. When more context or explanation is required, add a text paragraph before
1092
1094
the code example.
1093
1095
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
1095
1099
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.
1097
1103
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.
1101
1108
1102
1109
Miscellaneous
1103
1110
=============
0 commit comments