|
10 | 10 | </gallery/images_contours_and_fields/contour_image>`. |
11 | 11 | """ |
12 | 12 |
|
13 | | -import matplotlib |
14 | 13 | import numpy as np |
15 | 14 | import matplotlib.cm as cm |
16 | 15 | import matplotlib.pyplot as plt |
|
57 | 56 | ############################################################################### |
58 | 57 | # You can set negative contours to be solid instead of dashed: |
59 | 58 |
|
60 | | -matplotlib.rcParams['contour.negative_linestyle'] = 'solid' |
| 59 | +plt.rcParams['contour.negative_linestyle'] = 'solid' |
61 | 60 | fig, ax = plt.subplots() |
62 | 61 | CS = ax.contour(X, Y, Z, 6, colors='k') # Negative contours default to dashed. |
63 | 62 | ax.clabel(CS, fontsize=9, inline=True) |
|
111 | 110 |
|
112 | 111 | ############################################################################# |
113 | 112 | # |
114 | | -# ------------ |
| 113 | +# .. admonition:: References |
115 | 114 | # |
116 | | -# References |
117 | | -# """""""""" |
| 115 | +# The use of the following functions, methods, classes and modules is shown |
| 116 | +# in this example: |
118 | 117 | # |
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` |
0 commit comments