@@ -327,16 +327,13 @@ def rcdefaults():
327
327
328
328
def gci ():
329
329
"""
330
- Get the current colorable artist. Specifically, returns the
331
- current :class:`~matplotlib.cm.ScalarMappable` instance (image or
332
- patch collection), or *None* if no images or patch collections
333
- have been defined. The commands :func:`~matplotlib.pyplot.imshow`
334
- and :func:`~matplotlib.pyplot.figimage` create
335
- :class:`~matplotlib.image.Image` instances, and the commands
336
- :func:`~matplotlib.pyplot.pcolor` and
337
- :func:`~matplotlib.pyplot.scatter` create
338
- :class:`~matplotlib.collections.Collection` instances. The
339
- current image is an attribute of the current axes, or the nearest
330
+ Get the current colorable artist.
331
+
332
+ Specifically, returns the current `.ScalarMappable` instance (`.Image`
333
+ created by `imshow` or `figimage`, `.Collection` created by `pcolor` or
334
+ `scatter`, etc.), or *None* if no such instance has been defined.
335
+
336
+ The current image is an attribute of the current axes, or the nearest
340
337
earlier axes in the current figure that contains an image.
341
338
"""
342
339
return gcf ()._gci ()
@@ -473,7 +470,7 @@ def figure(num=None, # autoincrement if None, else integer from 1-N
473
470
Notes
474
471
-----
475
472
If you are creating many figures, make sure you explicitly call
476
- :func: `.pyplot.close` on the figures you are not using, because this will
473
+ `.pyplot.close` on the figures you are not using, because this will
477
474
enable pyplot to properly clean up the memory.
478
475
479
476
`~matplotlib.rcParams` defines the default values, which can be modified
@@ -675,19 +672,16 @@ def clf():
675
672
676
673
677
674
def draw ():
678
- """Redraw the current figure.
675
+ """
676
+ Redraw the current figure.
679
677
680
678
This is used to update a figure that has been altered, but not
681
- automatically re-drawn. If interactive mode is on (:func: `.ion()`), this
679
+ automatically re-drawn. If interactive mode is on (via `.ion()`), this
682
680
should be only rarely needed, but there may be ways to modify the state of
683
- a figure without marking it as `stale`. Please report these cases as
684
- bugs.
681
+ a figure without marking it as "stale". Please report these cases as bugs.
685
682
686
- A more object-oriented alternative, given any
687
- :class:`~matplotlib.figure.Figure` instance, :attr:`fig`, that
688
- was created using a :mod:`~matplotlib.pyplot` function, is::
689
-
690
- fig.canvas.draw_idle()
683
+ This is equivalent to calling ``fig.canvas.draw_idle()``, where ``fig`` is
684
+ the current figure.
691
685
"""
692
686
get_current_fig_manager ().canvas .draw_idle ()
693
687
@@ -1425,8 +1419,7 @@ def xticks(ticks=None, labels=None, **kwargs):
1425
1419
A list of explicit labels to place at the given *locs*.
1426
1420
1427
1421
**kwargs
1428
- :class:`.Text` properties can be used to control the appearance of
1429
- the labels.
1422
+ `.Text` properties can be used to control the appearance of the labels.
1430
1423
1431
1424
Returns
1432
1425
-------
@@ -1501,8 +1494,7 @@ def yticks(ticks=None, labels=None, **kwargs):
1501
1494
A list of explicit labels to place at the given *locs*.
1502
1495
1503
1496
**kwargs
1504
- :class:`.Text` properties can be used to control the appearance of
1505
- the labels.
1497
+ `.Text` properties can be used to control the appearance of the labels.
1506
1498
1507
1499
Returns
1508
1500
-------
@@ -2046,14 +2038,18 @@ def clim(vmin=None, vmax=None):
2046
2038
2047
2039
def set_cmap (cmap ):
2048
2040
"""
2049
- Set the default colormap. Applies to the current image if any.
2050
- See help(colormaps) for more information.
2041
+ Set the default colormap, and applies it to the current image if any.
2051
2042
2052
- *cmap* must be a :class:`~matplotlib.colors.Colormap` instance, or
2053
- the name of a registered colormap.
2043
+ Parameters
2044
+ ----------
2045
+ cmap : `~matplotib.colors.Colormap` or str
2046
+ A colormap instance or the name of a registered colormap.
2054
2047
2055
- See :func:`matplotlib.cm.register_cmap` and
2056
- :func:`matplotlib.cm.get_cmap`.
2048
+ See Also
2049
+ --------
2050
+ colormaps
2051
+ matplotlib.cm.register_cmap
2052
+ matplotlib.cm.get_cmap
2057
2053
"""
2058
2054
cmap = cm .get_cmap (cmap )
2059
2055
@@ -2134,9 +2130,8 @@ def polar(*args, **kwargs):
2134
2130
2135
2131
polar(theta, r, **kwargs)
2136
2132
2137
- Multiple *theta*, *r* arguments are supported, with format
2138
- strings, as in :func:`~matplotlib.pyplot.plot`.
2139
-
2133
+ Multiple *theta*, *r* arguments are supported, with format strings, as in
2134
+ `plot`.
2140
2135
"""
2141
2136
# If an axis already exists, check if it has a polar projection
2142
2137
if gcf ().get_axes ():
0 commit comments