File tree 3 files changed +36
-13
lines changed
examples/lines_bars_and_markers 3 files changed +36
-13
lines changed Original file line number Diff line number Diff line change @@ -439,7 +439,7 @@ div.note {
439
439
border-color : # ccc ;
440
440
}
441
441
442
- div .seealso {
442
+ div .seealso , div . admonition-references {
443
443
background-color : # EAF1F7 ;
444
444
border-color : # 8EADCC ;
445
445
color : # 3F5E7F ;
Original file line number Diff line number Diff line change @@ -859,6 +859,35 @@ are delimited by a line of ``###`` characters:
859
859
860
860
In this way text, code, and figures are output in a "notebook" style.
861
861
862
+ References for sphinx-gallery
863
+ -----------------------------
864
+
865
+ The showcased Matplotlib functions should be listed in an admonition at the
866
+ bottom as follows
867
+
868
+ .. code-block :: python
869
+
870
+ # ##############################################################################
871
+ #
872
+ # .. admonition:: References
873
+ #
874
+ # The use of the following functions, methods, classes and modules is shown
875
+ # in this example:
876
+ #
877
+ # - `matplotlib.axes.Axes.fill` / `matplotlib.pyplot.fill`
878
+ # - `matplotlib.axes.Axes.axis` / `matplotlib.pyplot.axis`
879
+
880
+ This allows sphinx-gallery to place an entry to the example in the
881
+ mini-gallery of the mentioned functions. Whether or not a function is mentioned
882
+ here should be decided depending on if a mini-gallery link prominently helps
883
+ to illustrate that function; e.g. mention ``matplotlib.pyplot.subplots `` only
884
+ in examples that are about laying out subplots, not in every example that uses
885
+ it.
886
+
887
+ Functions that exist in ``pyplot `` as well as in Axes or Figure should mention
888
+ both references no matter which one is used in the example code. The ``pyplot ``
889
+ reference should always be the second to mention; see the example above.
890
+
862
891
Order of examples in the gallery
863
892
--------------------------------
864
893
Original file line number Diff line number Diff line change @@ -76,18 +76,12 @@ def _koch_snowflake_complex(order):
76
76
77
77
plt .show ()
78
78
79
- #############################################################################
79
+ ###############################################################################
80
80
#
81
- # ------------
81
+ # .. admonition:: References
82
82
#
83
- # References
84
- # """"""""""
83
+ # The use of the following functions, methods, classes and modules is shown
84
+ # in this example:
85
85
#
86
- # The use of the following functions, methods, classes and modules is shown
87
- # in this example:
88
-
89
- import matplotlib
90
- matplotlib .axes .Axes .fill
91
- matplotlib .pyplot .fill
92
- matplotlib .axes .Axes .axis
93
- matplotlib .pyplot .axis
86
+ # - `matplotlib.axes.Axes.fill` / `matplotlib.pyplot.fill`
87
+ # - `matplotlib.axes.Axes.axis` / `matplotlib.pyplot.axis`
You can’t perform that action at this time.
0 commit comments