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

Skip to content

Commit d8f04be

Browse files
authored
Merge pull request #19847 from timhoffm/reformat-references2
Reformat references (part 2)
2 parents dca4a97 + 20b1690 commit d8f04be

File tree

77 files changed

+438
-803
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+438
-803
lines changed

.flake8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ per-file-ignores =
253253
examples/subplots_axes_and_figures/axes_zoom_effect.py: E402
254254
examples/subplots_axes_and_figures/custom_figure_class.py: E402
255255
examples/subplots_axes_and_figures/demo_constrained_layout.py: E402
256-
examples/subplots_axes_and_figures/demo_tight_layout.py: E402
256+
examples/subplots_axes_and_figures/demo_tight_layout.py: E402, E501
257257
examples/subplots_axes_and_figures/figure_size_units.py: E402
258258
examples/subplots_axes_and_figures/secondary_axis.py: E402
259259
examples/subplots_axes_and_figures/two_scales.py: E402

examples/axes_grid1/scatter_hist_locatable_axes.py

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -65,17 +65,12 @@
6565

6666
#############################################################################
6767
#
68-
# ------------
68+
## .. admonition:: References
6969
#
70-
# References
71-
# """"""""""
70+
# The use of the following functions, methods, classes and modules is shown
71+
# in this example:
7272
#
73-
# The use of the following functions, methods and classes is shown
74-
# in this example:
75-
76-
import matplotlib
77-
import mpl_toolkits
78-
mpl_toolkits.axes_grid1.axes_divider.make_axes_locatable
79-
matplotlib.axes.Axes.set_aspect
80-
matplotlib.axes.Axes.scatter
81-
matplotlib.axes.Axes.hist
73+
# - `mpl_toolkits.axes_grid1.axes_divider.make_axes_locatable`
74+
# - `matplotlib.axes.Axes.set_aspect`
75+
# - `matplotlib.axes.Axes.scatter`
76+
# - `matplotlib.axes.Axes.hist`

examples/images_contours_and_fields/affine_image.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,10 @@ def do_plot(ax, Z, transform):
6666

6767
#############################################################################
6868
#
69-
# ------------
69+
# .. admonition:: References
7070
#
71-
# References
72-
# """"""""""
71+
# The use of the following functions, methods, classes and modules is shown
72+
# in this example:
7373
#
74-
# The use of the following functions, methods and classes is shown
75-
# in this example:
76-
77-
import matplotlib
78-
matplotlib.axes.Axes.imshow
79-
matplotlib.pyplot.imshow
80-
matplotlib.transforms.Affine2D
74+
# - `matplotlib.axes.Axes.imshow` / `matplotlib.pyplot.imshow`
75+
# - `matplotlib.transforms.Affine2D`

examples/images_contours_and_fields/barb_demo.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,9 @@
5656

5757
#############################################################################
5858
#
59-
# ------------
59+
# .. admonition:: References
6060
#
61-
# References
62-
# """"""""""
61+
# The use of the following functions, methods, classes and modules is shown
62+
# in this example:
6363
#
64-
# The use of the following functions, methods and classes is shown
65-
# in this example:
66-
67-
import matplotlib
68-
matplotlib.axes.Axes.barbs
69-
matplotlib.pyplot.barbs
64+
# - `matplotlib.axes.Axes.barbs` / `matplotlib.pyplot.barbs`

examples/images_contours_and_fields/barcode_demo.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,10 @@
3939

4040
#############################################################################
4141
#
42-
# ------------
42+
# .. admonition:: References
4343
#
44-
# References
45-
# """"""""""
44+
# The use of the following functions, methods, classes and modules is shown
45+
# in this example:
4646
#
47-
# The use of the following functions, methods and classes is shown
48-
# in this example:
49-
50-
import matplotlib
51-
matplotlib.axes.Axes.imshow
52-
matplotlib.pyplot.imshow
53-
matplotlib.figure.Figure.add_axes
47+
# - `matplotlib.axes.Axes.imshow` / `matplotlib.pyplot.imshow`
48+
# - `matplotlib.figure.Figure.add_axes`

examples/images_contours_and_fields/contour_corner_mask.py

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,10 @@
3939

4040
#############################################################################
4141
#
42-
# ------------
42+
# .. admonition:: References
4343
#
44-
# References
45-
# """"""""""
44+
# The use of the following functions, methods, classes and modules is shown
45+
# in this example:
4646
#
47-
# The use of the following functions and methods is shown
48-
# in this example:
49-
50-
import matplotlib
51-
matplotlib.axes.Axes.contour
52-
matplotlib.pyplot.contour
53-
matplotlib.axes.Axes.contourf
54-
matplotlib.pyplot.contourf
47+
# - `matplotlib.axes.Axes.contour` / `matplotlib.pyplot.contour`
48+
# - `matplotlib.axes.Axes.contourf` / `matplotlib.pyplot.contourf`

examples/images_contours_and_fields/contour_demo.py

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
</gallery/images_contours_and_fields/contour_image>`.
1111
"""
1212

13-
import matplotlib
1413
import numpy as np
1514
import matplotlib.cm as cm
1615
import matplotlib.pyplot as plt
@@ -57,7 +56,7 @@
5756
###############################################################################
5857
# You can set negative contours to be solid instead of dashed:
5958

60-
matplotlib.rcParams['contour.negative_linestyle'] = 'solid'
59+
plt.rcParams['contour.negative_linestyle'] = 'solid'
6160
fig, ax = plt.subplots()
6261
CS = ax.contour(X, Y, Z, 6, colors='k') # Negative contours default to dashed.
6362
ax.clabel(CS, fontsize=9, inline=True)
@@ -111,20 +110,13 @@
111110

112111
#############################################################################
113112
#
114-
# ------------
113+
# .. admonition:: References
115114
#
116-
# References
117-
# """"""""""
115+
# The use of the following functions, methods, classes and modules is shown
116+
# in this example:
118117
#
119-
# The use of the following functions and methods is shown
120-
# in this example:
121-
122-
import matplotlib
123-
matplotlib.axes.Axes.contour
124-
matplotlib.pyplot.contour
125-
matplotlib.figure.Figure.colorbar
126-
matplotlib.pyplot.colorbar
127-
matplotlib.axes.Axes.clabel
128-
matplotlib.pyplot.clabel
129-
matplotlib.axes.Axes.set_position
130-
matplotlib.axes.Axes.get_position
118+
# - `matplotlib.axes.Axes.contour` / `matplotlib.pyplot.contour`
119+
# - `matplotlib.figure.Figure.colorbar` / `matplotlib.pyplot.colorbar`
120+
# - `matplotlib.axes.Axes.clabel` / `matplotlib.pyplot.clabel`
121+
# - `matplotlib.axes.Axes.get_position`
122+
# - `matplotlib.axes.Axes.set_position`

examples/images_contours_and_fields/contour_image.py

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -97,19 +97,12 @@
9797

9898
#############################################################################
9999
#
100-
# ------------
100+
# .. admonition:: References
101101
#
102-
# References
103-
# """"""""""
102+
# The use of the following functions, methods, classes and modules is shown
103+
# in this example:
104104
#
105-
# The use of the following functions, methods and classes is shown
106-
# in this example:
107-
108-
import matplotlib
109-
matplotlib.axes.Axes.contour
110-
matplotlib.pyplot.contour
111-
matplotlib.axes.Axes.imshow
112-
matplotlib.pyplot.imshow
113-
matplotlib.figure.Figure.colorbar
114-
matplotlib.pyplot.colorbar
115-
matplotlib.colors.Normalize
105+
# - `matplotlib.axes.Axes.contour` / `matplotlib.pyplot.contour`
106+
# - `matplotlib.axes.Axes.imshow` / `matplotlib.pyplot.imshow`
107+
# - `matplotlib.figure.Figure.colorbar` / `matplotlib.pyplot.colorbar`
108+
# - `matplotlib.colors.Normalize`

examples/images_contours_and_fields/contour_label_demo.py

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
</gallery/images_contours_and_fields/contour_demo>`.
1111
"""
1212

13-
import matplotlib
1413
import numpy as np
1514
import matplotlib.ticker as ticker
1615
import matplotlib.pyplot as plt
@@ -76,17 +75,12 @@ def fmt(x):
7675

7776
#############################################################################
7877
#
79-
# ------------
78+
# .. admonition:: References
8079
#
81-
# References
82-
# """"""""""
80+
# The use of the following functions, methods, classes and modules is shown
81+
# in this example:
8382
#
84-
# The use of the following functions, methods and classes is shown
85-
# in this example:
86-
87-
matplotlib.axes.Axes.contour
88-
matplotlib.pyplot.contour
89-
matplotlib.axes.Axes.clabel
90-
matplotlib.pyplot.clabel
91-
matplotlib.ticker.LogFormatterMathtext
92-
matplotlib.ticker.TickHelper.create_dummy_axis
83+
# - `matplotlib.axes.Axes.contour` / `matplotlib.pyplot.contour`
84+
# - `matplotlib.axes.Axes.clabel` / `matplotlib.pyplot.clabel`
85+
# - `matplotlib.ticker.LogFormatterMathtext`
86+
# - `matplotlib.ticker.TickHelper.create_dummy_axis`

examples/images_contours_and_fields/contourf_demo.py

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -106,24 +106,16 @@
106106

107107
#############################################################################
108108
#
109-
# ------------
109+
# .. admonition:: References
110110
#
111-
# References
112-
# """"""""""
111+
# The use of the following functions, methods, classes and modules is shown
112+
# in this example:
113113
#
114-
# The use of the following functions, methods and classes is shown
115-
# in this example:
116-
117-
import matplotlib
118-
matplotlib.axes.Axes.contour
119-
matplotlib.pyplot.contour
120-
matplotlib.axes.Axes.contourf
121-
matplotlib.pyplot.contourf
122-
matplotlib.axes.Axes.clabel
123-
matplotlib.pyplot.clabel
124-
matplotlib.figure.Figure.colorbar
125-
matplotlib.pyplot.colorbar
126-
matplotlib.colors.Colormap
127-
matplotlib.colors.Colormap.set_bad
128-
matplotlib.colors.Colormap.set_under
129-
matplotlib.colors.Colormap.set_over
114+
# - `matplotlib.axes.Axes.contour` / `matplotlib.pyplot.contour`
115+
# - `matplotlib.axes.Axes.contourf` / `matplotlib.pyplot.contourf`
116+
# - `matplotlib.axes.Axes.clabel` / `matplotlib.pyplot.clabel`
117+
# - `matplotlib.figure.Figure.colorbar` / `matplotlib.pyplot.colorbar`
118+
# - `matplotlib.colors.Colormap`
119+
# - `matplotlib.colors.Colormap.set_bad`
120+
# - `matplotlib.colors.Colormap.set_under`
121+
# - `matplotlib.colors.Colormap.set_over`

examples/images_contours_and_fields/contourf_hatching.py

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -42,22 +42,14 @@
4242

4343
#############################################################################
4444
#
45-
# ------------
45+
# .. admonition:: References
4646
#
47-
# References
48-
# """"""""""
47+
# The use of the following functions, methods, classes and modules is shown
48+
# in this example:
4949
#
50-
# The use of the following functions, methods and classes is shown
51-
# in this example:
52-
53-
import matplotlib
54-
matplotlib.axes.Axes.contour
55-
matplotlib.pyplot.contour
56-
matplotlib.axes.Axes.contourf
57-
matplotlib.pyplot.contourf
58-
matplotlib.figure.Figure.colorbar
59-
matplotlib.pyplot.colorbar
60-
matplotlib.axes.Axes.legend
61-
matplotlib.pyplot.legend
62-
matplotlib.contour.ContourSet
63-
matplotlib.contour.ContourSet.legend_elements
50+
# - `matplotlib.axes.Axes.contour` / `matplotlib.pyplot.contour`
51+
# - `matplotlib.axes.Axes.contourf` / `matplotlib.pyplot.contourf`
52+
# - `matplotlib.figure.Figure.colorbar` / `matplotlib.pyplot.colorbar`
53+
# - `matplotlib.axes.Axes.legend` / `matplotlib.pyplot.legend`
54+
# - `matplotlib.contour.ContourSet`
55+
# - `matplotlib.contour.ContourSet.legend_elements`

examples/images_contours_and_fields/contourf_log.py

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -50,19 +50,12 @@
5050

5151
#############################################################################
5252
#
53-
# ------------
53+
# .. admonition:: References
5454
#
55-
# References
56-
# """"""""""
55+
# The use of the following functions, methods, classes and modules is shown
56+
# in this example:
5757
#
58-
# The use of the following functions, methods and classes is shown
59-
# in this example:
60-
61-
import matplotlib
62-
matplotlib.axes.Axes.contourf
63-
matplotlib.pyplot.contourf
64-
matplotlib.figure.Figure.colorbar
65-
matplotlib.pyplot.colorbar
66-
matplotlib.axes.Axes.legend
67-
matplotlib.pyplot.legend
68-
matplotlib.ticker.LogLocator
58+
# - `matplotlib.axes.Axes.contourf` / `matplotlib.pyplot.contourf`
59+
# - `matplotlib.figure.Figure.colorbar` / `matplotlib.pyplot.colorbar`
60+
# - `matplotlib.axes.Axes.legend` / `matplotlib.pyplot.legend`
61+
# - `matplotlib.ticker.LogLocator`

examples/images_contours_and_fields/image_annotated_heatmap.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -305,15 +305,10 @@ def func(x, pos):
305305

306306
#############################################################################
307307
#
308-
# ------------
308+
# .. admonition:: References
309309
#
310-
# References
311-
# """"""""""
310+
# The use of the following functions, methods, classes and modules is shown
311+
# in this example:
312312
#
313-
# The usage of the following functions and methods is shown in this example:
314-
315-
316-
matplotlib.axes.Axes.imshow
317-
matplotlib.pyplot.imshow
318-
matplotlib.figure.Figure.colorbar
319-
matplotlib.pyplot.colorbar
313+
# - `matplotlib.axes.Axes.imshow` / `matplotlib.pyplot.imshow`
314+
# - `matplotlib.figure.Figure.colorbar` / `matplotlib.pyplot.colorbar`

examples/images_contours_and_fields/image_antialiasing.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,9 @@
7575

7676
#############################################################################
7777
#
78-
# ------------
78+
# .. admonition:: References
7979
#
80-
# References
81-
# """"""""""
80+
# The use of the following functions, methods, classes and modules is shown
81+
# in this example:
8282
#
83-
# The use of the following functions and methods is shown
84-
# in this example:
85-
86-
import matplotlib
87-
matplotlib.axes.Axes.imshow
83+
# - `matplotlib.axes.Axes.imshow`

examples/images_contours_and_fields/image_clip_path.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,10 @@
2323

2424
#############################################################################
2525
#
26-
# ------------
26+
# .. admonition:: References
2727
#
28-
# References
29-
# """"""""""
28+
# The use of the following functions, methods, classes and modules is shown
29+
# in this example:
3030
#
31-
# The use of the following functions and methods is shown
32-
# in this example:
33-
34-
import matplotlib
35-
matplotlib.axes.Axes.imshow
36-
matplotlib.pyplot.imshow
37-
matplotlib.artist.Artist.set_clip_path
31+
# - `matplotlib.axes.Axes.imshow` / `matplotlib.pyplot.imshow`
32+
# - `matplotlib.artist.Artist.set_clip_path`

0 commit comments

Comments
 (0)