|
141 | 141 | Parameters
|
142 | 142 | ----------
|
143 | 143 | mappable
|
144 |
| - The :class:`~matplotlib.image.Image`, |
145 |
| - :class:`~matplotlib.contour.ContourSet`, etc. to |
146 |
| - which the colorbar applies; this argument is mandatory for the Figure |
147 |
| - :meth:`~matplotlib.figure.Figure.colorbar` method but optional for the |
148 |
| - pyplot :func:`~matplotlib.pyplot.colorbar` function, which sets the |
149 |
| - default to the current image. |
| 144 | + The `~matplotlib.cm.ScalarMappable` (i.e., `~matplotlib.image.Image`, |
| 145 | + `~matplotlib.contour.ContourSet`, etc.) to which the colorbar applies. |
| 146 | + This argument is mandatory for the `.Figure.colorbar` method but optional |
| 147 | + for the `.pyplot.colorbar` function, which sets the default to the current |
| 148 | + image. |
150 | 149 |
|
151 | 150 | cax : :class:`~matplotlib.axes.Axes` object, optional
|
152 | 151 | Axes into which the colorbar will be drawn.
|
|
157 | 156 | colorbar axes.
|
158 | 157 |
|
159 | 158 | use_gridspec : bool, optional
|
160 |
| - If *cax* is ``None``, a new *cax* is created as an instance of |
161 |
| - Axes. If *ax* is an instance of Subplot and *use_gridspec* is ``True``, |
162 |
| - *cax* is created as an instance of Subplot using the |
163 |
| - grid_spec module. |
164 |
| -
|
| 159 | + If *cax* is ``None``, a new *cax* is created as an instance of Axes. If |
| 160 | + *ax* is an instance of Subplot and *use_gridspec* is ``True``, *cax* is |
| 161 | + created as an instance of Subplot using the :mod:`~.gridspec` module. |
165 | 162 |
|
166 | 163 | Returns
|
167 | 164 | -------
|
168 | 165 | :class:`~matplotlib.colorbar.Colorbar` instance
|
169 |
| - See also its base class, :class:`~matplotlib.colorbar.ColorbarBase`. |
170 |
| - Call the :meth:`~matplotlib.colorbar.ColorbarBase.set_label` method |
171 |
| - to label the colorbar. |
| 166 | + See also its base class, `~matplotlib.colorbar.ColorbarBase`. Call the |
| 167 | + `~.ColorbarBase.set_label` method to label the colorbar. |
172 | 168 |
|
173 | 169 | Notes
|
174 | 170 | -----
|
|
183 | 179 | kwarg is included automatically.
|
184 | 180 |
|
185 | 181 | The *shrink* kwarg provides a simple way to scale the colorbar with respect
|
186 |
| -to the axes. Note that if *cax* is specified it determines the size of the |
| 182 | +to the axes. Note that if *cax* is specified, it determines the size of the |
187 | 183 | colorbar and *shrink* and *aspect* kwargs are ignored.
|
188 | 184 |
|
189 | 185 | For more precise control, you can manually specify the positions of
|
190 | 186 | the axes objects in which the mappable and the colorbar are drawn. In
|
191 | 187 | this case, do not use any of the axes properties kwargs.
|
192 | 188 |
|
193 |
| -It is known that some vector graphics viewer (svg and pdf) renders white gaps |
194 |
| -between segments of the colorbar. This is due to bugs in the viewers not |
195 |
| -matplotlib. As a workaround the colorbar can be rendered with overlapping |
| 189 | +It is known that some vector graphics viewers (svg and pdf) renders white gaps |
| 190 | +between segments of the colorbar. This is due to bugs in the viewers, not |
| 191 | +Matplotlib. As a workaround, the colorbar can be rendered with overlapping |
196 | 192 | segments::
|
197 | 193 |
|
198 | 194 | cbar = colorbar()
|
199 | 195 | cbar.solids.set_edgecolor("face")
|
200 | 196 | draw()
|
201 | 197 |
|
202 |
| -However this has negative consequences in other circumstances. Particularly |
203 |
| -with semi transparent images (alpha < 1) and colorbar extensions and is not |
204 |
| -enabled by default see (issue #1188). |
| 198 | +However this has negative consequences in other circumstances, e.g. with |
| 199 | +semi-transparent images (alpha < 1) and colorbar extensions; therefore, this |
| 200 | +workaround is not used by default (see issue #1188). |
205 | 201 |
|
206 | 202 | ''' % (make_axes_kw_doc, colormap_kw_doc)
|
207 | 203 |
|
|
0 commit comments