@@ -44,65 +44,52 @@ def colorbar(
44
44
shrink : None or float in 0..1
45
45
Fraction of the total height that the colorbar is shrunk.
46
46
See Note. Default: None.
47
-
48
- Note
49
- ----
50
-
51
- shift='symmetric', shrink=None -> colorbar extends over the whole height
52
- shift='symmetric', shrink=0.1 -> colorbar is 10 % smaller, and centered
53
- shift=0., shrink=0.1 -> colorbar is 10 % smaller, and aligned
54
- with the bottom
55
- shift=0.1, shrink=None -> colorbar is 10 % smaller, and aligned
56
- with the top
57
-
58
- kwargs
59
- ------
60
- colorbar properties
61
- ============ ====================================================
62
- Property Description
63
- ============ ====================================================
64
- *extend* [ 'neither' | 'both' | 'min' | 'max' ]
65
- If not 'neither', make pointed end(s) for out-of-
66
- range values. These are set for a given colormap
67
- using the colormap set_under and set_over methods.
68
- *extendfrac* [ *None* | 'auto' | length | lengths ]
69
- If set to *None*, both the minimum and maximum
70
- triangular colorbar extensions with have a length of
71
- 5% of the interior colorbar length (this is the
72
- default setting). If set to 'auto', makes the
73
- triangular colorbar extensions the same lengths as
74
- the interior boxes (when *spacing* is set to
75
- 'uniform') or the same lengths as the respective
76
- adjacent interior boxes (when *spacing* is set to
77
- 'proportional'). If a scalar, indicates the length
78
- of both the minimum and maximum triangular colorbar
79
- extensions as a fraction of the interior colorbar
80
- length. A two-element sequence of fractions may also
81
- be given, indicating the lengths of the minimum and
82
- maximum colorbar extensions respectively as a
83
- fraction of the interior colorbar length.
84
- *extendrect* [ *False* | *True* ]
85
- If *False* the minimum and maximum colorbar extensions
86
- will be triangular (the default). If *True* the
87
- extensions will be rectangular.
88
- *spacing* [ 'uniform' | 'proportional' ]
89
- Uniform spacing gives each discrete color the same
90
- space; proportional makes the space proportional to
91
- the data interval.
92
- *ticks* [ None | list of ticks | Locator object ]
93
- If None, ticks are determined automatically from the
94
- input.
95
- *format* [ None | format string | Formatter object ]
96
- If None, the
97
- :class:`~matplotlib.ticker.ScalarFormatter` is used.
98
- If a format string is given, e.g., '%.3f', that is
99
- used. An alternative
100
- :class:`~matplotlib.ticker.Formatter` object may be
101
- given instead.
102
- *drawedges* [ False | True ] If true, draw lines at color
103
- boundaries.
104
- ============ ====================================================
105
-
47
+ **kwargs : keyword arguments
48
+ colorbar properties
49
+ ============ ====================================================
50
+ Property Description
51
+ ============ ====================================================
52
+ *extend* [ 'neither' | 'both' | 'min' | 'max' ]
53
+ If not 'neither', make pointed end(s) for out-of-
54
+ range values. These are set for a given colormap
55
+ using the colormap set_under and set_over methods.
56
+ *extendfrac* [ *None* | 'auto' | length | lengths ]
57
+ If set to *None*, both the minimum and maximum
58
+ triangular colorbar extensions with have a length of
59
+ 5% of the interior colorbar length (this is the
60
+ default setting). If set to 'auto', makes the
61
+ triangular colorbar extensions the same lengths as
62
+ the interior boxes (when *spacing* is set to
63
+ 'uniform') or the same lengths as the respective
64
+ adjacent interior boxes (when *spacing* is set to
65
+ 'proportional'). If a scalar, indicates the length
66
+ of both the minimum and maximum triangular colorbar
67
+ extensions as a fraction of the interior colorbar
68
+ length. A two-element sequence of fractions may also
69
+ be given, indicating the lengths of the minimum and
70
+ maximum colorbar extensions respectively as a
71
+ fraction of the interior colorbar length.
72
+ *extendrect* [ *False* | *True* ]
73
+ If *False* the minimum and maximum colorbar extensions
74
+ will be triangular (the default). If *True* the
75
+ extensions will be rectangular.
76
+ *spacing* [ 'uniform' | 'proportional' ]
77
+ Uniform spacing gives each discrete color the same
78
+ space; proportional makes the space proportional to
79
+ the data interval.
80
+ *ticks* [ None | list of ticks | Locator object ]
81
+ If None, ticks are determined automatically from the
82
+ input.
83
+ *format* [ None | format string | Formatter object ]
84
+ If None, the
85
+ :class:`~matplotlib.ticker.ScalarFormatter` is used.
86
+ If a format string is given, e.g., '%.3f', that is
87
+ used. An alternative
88
+ :class:`~matplotlib.ticker.Formatter` object may be
89
+ given instead.
90
+ *drawedges* [ False | True ] If true, draw lines at color
91
+ boundaries.
92
+ ============ ====================================================
106
93
107
94
Examples
108
95
--------
@@ -122,7 +109,6 @@ def colorbar(
122
109
123
110
ax.set_global()
124
111
125
-
126
112
# =========================
127
113
# example with 2 axes
128
114
@@ -137,7 +123,6 @@ def colorbar(
137
123
138
124
cbar.set_label('[°C]', labelpad=10)
139
125
140
-
141
126
# =========================
142
127
# example with 3 axes & 2 colorbars
143
128
@@ -157,8 +142,16 @@ def colorbar(
157
142
158
143
plt.draw()
159
144
145
+ Notes
146
+ -----
147
+ shift='symmetric', shrink=None -> colorbar extends over the whole height
148
+ shift='symmetric', shrink=0.1 -> colorbar is 10 % smaller, and centered
149
+ shift=0., shrink=0.1 -> colorbar is 10 % smaller, and aligned
150
+ with the bottom
151
+ shift=0.1, shrink=None -> colorbar is 10 % smaller, and aligned
152
+ with the top
160
153
161
- See also
154
+ See Also
162
155
--------
163
156
_resize_colorbar_horz
164
157
"""
@@ -247,8 +240,8 @@ def _resize_colorbar_vert(
247
240
248
241
see 'colorbar'
249
242
250
- Example
251
- -------
243
+ Examples
244
+ --------
252
245
import matplotlib.pyplot as plt
253
246
import mplotutils as mpu
254
247
import cartopy.crs as ccrs
@@ -269,7 +262,7 @@ def _resize_colorbar_vert(
269
262
270
263
plt.draw()
271
264
272
- See also
265
+ See Also
273
266
--------
274
267
_resize_colorbar_horz
275
268
"""
@@ -336,8 +329,8 @@ def _resize_colorbar_horz(
336
329
337
330
see 'colorbar'
338
331
339
- Example
340
- -------
332
+ Examples
333
+ --------
341
334
import matplotlib.pyplot as plt
342
335
import mplotutils as mpu
343
336
import cartopy.crs as ccrs
@@ -357,7 +350,7 @@ def _resize_colorbar_horz(
357
350
358
351
plt.draw()
359
352
360
- See also
353
+ See Also
361
354
--------
362
355
_resize_colorbar_vert
363
356
"""
0 commit comments