@@ -41,21 +41,19 @@ class Collection(artist.Artist, cm.ScalarMappable):
41
41
42
42
Keyword arguments and default values:
43
43
44
- * *edgecolors*: None
45
- * *facecolors*: None
46
- * *linewidths*: None
47
- * *capstyle*: None
48
- * *joinstyle*: None
49
- * *antialiaseds*: None
50
- * *offsets*: None
51
- * *transOffset*: transforms.IdentityTransform()
52
- * *offset_position*: 'screen' (default) or 'data'
53
- * *norm*: None (optional for
54
- :class:`matplotlib.cm.ScalarMappable`)
55
- * *cmap*: None (optional for
56
- :class:`matplotlib.cm.ScalarMappable`)
57
- * *hatch*: None
58
- * *zorder*: 1
44
+ - *edgecolors*: None
45
+ - *facecolors*: None
46
+ - *linewidths*: None
47
+ - *capstyle*: None
48
+ - *joinstyle*: None
49
+ - *antialiaseds*: None
50
+ - *offsets*: None
51
+ - *transOffset*: transforms.IdentityTransform()
52
+ - *offset_position*: 'screen' (default) or 'data'
53
+ - *norm*: None (optional for `matplotlib.cm.ScalarMappable`)
54
+ - *cmap*: None (optional for `matplotlib.cm.ScalarMappable`)
55
+ - *hatch*: None
56
+ - *zorder*: 1
59
57
60
58
*offsets* and *transOffset* are used to translate the patch after
61
59
rendering (default no offsets). If offset_position is 'screen'
@@ -64,22 +62,22 @@ class Collection(artist.Artist, cm.ScalarMappable):
64
62
offset_position is 'data', the offset is applied before the master
65
63
transform, i.e., the offsets are in data coordinates.
66
64
67
- If any of *edgecolors*, *facecolors*, *linewidths*, *antialiaseds*
68
- are None, they default to their :data:`matplotlib.rcParams` patch
69
- setting, in sequence form.
65
+ If any of *edgecolors*, *facecolors*, *linewidths*, *antialiaseds* are
66
+ None, they default to their `.rcParams` patch setting, in sequence form.
70
67
71
- The use of :class: `~matplotlib.cm.ScalarMappable` is optional. If
72
- the :class: `~matplotlib.cm.ScalarMappable` matrix _A is not None
73
- (i.e., a call to set_array has been made ), at draw time a call to
74
- scalar mappable will be made to set the face colors.
68
+ The use of `~matplotlib.cm.ScalarMappable` functionality is optional. If
69
+ the `~matplotlib.cm.ScalarMappable` matrix ``_A`` has been set (via a call
70
+ to `~.ScalarMappable. set_array` ), at draw time a call to scalar mappable
71
+ will be made to set the face colors.
75
72
"""
73
+
76
74
_offsets = np .zeros ((0 , 2 ))
77
75
_transOffset = transforms .IdentityTransform ()
78
76
#: Either a list of 3x3 arrays or an Nx3x3 array of transforms, suitable
79
77
#: for the `all_transforms` argument to
80
- #: :meth: `~matplotlib.backend_bases.RendererBase.draw_path_collection`;
78
+ #: `~matplotlib.backend_bases.RendererBase.draw_path_collection`;
81
79
#: each 3x3 array is used to initialize an
82
- #: :class: `~matplotlib.transforms.Affine2D` object.
80
+ #: `~matplotlib.transforms.Affine2D` object.
83
81
#: Each kind of collection defines this based on its arguments.
84
82
_transforms = np .empty ((0 , 3 , 3 ))
85
83
@@ -827,23 +825,20 @@ def update_from(self, other):
827
825
docstring .interpd .update (Collection = """\
828
826
Valid Collection keyword arguments:
829
827
830
- * *edgecolors*: None
831
- * *facecolors*: None
832
- * *linewidths*: None
833
- * *antialiaseds*: None
834
- * *offsets*: None
835
- * *transOffset*: transforms.IdentityTransform()
836
- * *norm*: None (optional for
837
- :class:`matplotlib.cm.ScalarMappable`)
838
- * *cmap*: None (optional for
839
- :class:`matplotlib.cm.ScalarMappable`)
828
+ - *edgecolors*: None
829
+ - *facecolors*: None
830
+ - *linewidths*: None
831
+ - *antialiaseds*: None
832
+ - *offsets*: None
833
+ - *transOffset*: transforms.IdentityTransform()
834
+ - *norm*: None (optional for `matplotlib.cm.ScalarMappable`)
835
+ - *cmap*: None (optional for `matplotlib.cm.ScalarMappable`)
840
836
841
837
*offsets* and *transOffset* are used to translate the patch after
842
838
rendering (default no offsets)
843
839
844
- If any of *edgecolors*, *facecolors*, *linewidths*, *antialiaseds*
845
- are None, they default to their :data:`matplotlib.rcParams` patch
846
- setting, in sequence form.
840
+ If any of *edgecolors*, *facecolors*, *linewidths*, *antialiaseds* are
841
+ None, they default to their `.rcParams` patch setting, in sequence form.
847
842
""" )
848
843
849
844
@@ -897,14 +892,13 @@ def draw(self, renderer):
897
892
898
893
class PathCollection (_CollectionWithSizes ):
899
894
"""
900
- This is the most basic :class:`Collection` subclass.
901
- A :class:`PathCollection` is e.g. created by a :meth:`~.Axes.scatter` plot.
895
+ The most basic `Collection` subclass, created e.g. by `~.Axes.scatter`.
902
896
"""
897
+
903
898
@docstring .dedent_interpd
904
899
def __init__ (self , paths , sizes = None , ** kwargs ):
905
900
"""
906
- *paths* is a sequence of :class:`matplotlib.path.Path`
907
- instances.
901
+ *paths* is a sequence of `matplotlib.path.Path` instances.
908
902
909
903
%(Collection)s
910
904
"""
@@ -925,7 +919,7 @@ def legend_elements(self, prop="colors", num="auto",
925
919
fmt = None , func = lambda x : x , ** kwargs ):
926
920
"""
927
921
Creates legend handles and labels for a PathCollection. This is useful
928
- for obtaining a legend for a :meth: `~.Axes.scatter` plot. E.g.::
922
+ for obtaining a legend for a `~.Axes.scatter` plot. E.g.::
929
923
930
924
scatter = plt.scatter([1, 2, 3], [4, 5, 6], c=[7, 2, 3])
931
925
plt.legend(*scatter.legend_elements())
@@ -953,13 +947,13 @@ def legend_elements(self, prop="colors", num="auto",
953
947
a valid input for a `~.StrMethodFormatter`. If None (the default),
954
948
use a `~.ScalarFormatter`.
955
949
func : function, default *lambda x: x*
956
- Function to calculate the labels. Often the size (or color)
957
- argument to :meth: `~.Axes.scatter` will have been pre-processed
958
- by the user using a function * s = f(x)* to make the markers
959
- visible; e.g. * size = np.log10(x)*. Providing the inverse of this
950
+ Function to calculate the labels. Often the size (or color)
951
+ argument to `~.Axes.scatter` will have been pre-processed by the
952
+ user using a function `` s = f(x)`` to make the markers visible;
953
+ e.g. `` size = np.log10(x)``. Providing the inverse of this
960
954
function here allows that pre-processing to be inverted, so that
961
- the legend labels have the correct values;
962
- e.g. *func = np.exp(x, 10)* .
955
+ the legend labels have the correct values; e.g. ``func = lambda
956
+ x: 10**x`` .
963
957
kwargs : further parameters
964
958
Allowed keyword arguments are *color* and *size*. E.g. it may be
965
959
useful to set the color of the markers if *prop="sizes"* is used;
@@ -1334,8 +1328,9 @@ def __init__(self, segments, # Can be None.
1334
1328
1335
1329
Notes
1336
1330
-----
1337
- If *linewidths*, *colors*, or *antialiaseds* is None, they
1338
- default to their rcParams setting, in sequence form.
1331
+ If any of *edgecolors*, *facecolors*, *linewidths*, *antialiaseds* are
1332
+ None, they default to their `.rcParams` patch setting, in sequence
1333
+ form.
1339
1334
1340
1335
If *offsets* and *transOffset* are not None, then
1341
1336
*offsets* are transformed by *transOffset* and applied after
@@ -1350,11 +1345,10 @@ def __init__(self, segments, # Can be None.
1350
1345
and this value will be added cumulatively to each successive
1351
1346
segment, so as to produce a set of successively offset curves.
1352
1347
1353
- The use of :class:`~matplotlib.cm.ScalarMappable` is optional.
1354
- If the :class:`~matplotlib.cm.ScalarMappable` array
1355
- :attr:`~matplotlib.cm.ScalarMappable._A` is not None (i.e., a call to
1356
- :meth:`~matplotlib.cm.ScalarMappable.set_array` has been made), at
1357
- draw time a call to scalar mappable will be made to set the colors.
1348
+ The use of `~matplotlib.cm.ScalarMappable` functionality is optional.
1349
+ If the `~matplotlib.cm.ScalarMappable` matrix ``_A`` has been set (via
1350
+ a call to `~.ScalarMappable.set_array`), at draw time a call to scalar
1351
+ mappable will be made to set the face colors.
1358
1352
"""
1359
1353
if colors is None :
1360
1354
colors = mpl .rcParams ['lines.color' ]
@@ -1725,12 +1719,11 @@ def __init__(self, widths, heights, angles, units='points', **kwargs):
1725
1719
units : {'points', 'inches', 'dots', 'width', 'height', 'x', 'y', 'xy'}
1726
1720
1727
1721
The units in which majors and minors are given; 'width' and
1728
- 'height' refer to the dimensions of the axes, while 'x'
1729
- and 'y' refer to the *offsets* data units. 'xy' differs
1730
- from all others in that the angle as plotted varies with
1731
- the aspect ratio, and equals the specified angle only when
1732
- the aspect ratio is unity. Hence it behaves the same as
1733
- the :class:`~matplotlib.patches.Ellipse` with
1722
+ 'height' refer to the dimensions of the axes, while 'x' and 'y'
1723
+ refer to the *offsets* data units. 'xy' differs from all others in
1724
+ that the angle as plotted varies with the aspect ratio, and equals
1725
+ the specified angle only when the aspect ratio is unity. Hence
1726
+ it behaves the same as the `~matplotlib.patches.Ellipse` with
1734
1727
``axes.transData`` as its transform.
1735
1728
1736
1729
Other Parameters
@@ -1820,14 +1813,14 @@ def __init__(self, patches, match_original=False, **kwargs):
1820
1813
providing the standard collection arguments, facecolor,
1821
1814
edgecolor, linewidths, norm or cmap.
1822
1815
1823
- If any of *edgecolors*, *facecolors*, *linewidths*,
1824
- *antialiaseds* are None, they default to their
1825
- :data:`matplotlib.rcParams` patch setting, in sequence form.
1816
+ If any of *edgecolors*, *facecolors*, *linewidths*, *antialiaseds* are
1817
+ None, they default to their `.rcParams` patch setting, in sequence
1818
+ form.
1826
1819
1827
- The use of :class: `~matplotlib.cm.ScalarMappable` is optional.
1828
- If the :class: `~matplotlib.cm.ScalarMappable` matrix _A is not
1829
- None (i.e., a call to set_array has been made ), at draw time a
1830
- call to scalar mappable will be made to set the face colors.
1820
+ The use of `~matplotlib.cm.ScalarMappable` functionality is optional.
1821
+ If the `~matplotlib.cm.ScalarMappable` matrix ``_A`` has been set (via
1822
+ a call to `~.ScalarMappable. set_array` ), at draw time a call to scalar
1823
+ mappable will be made to set the face colors.
1831
1824
"""
1832
1825
1833
1826
if match_original :
@@ -1920,11 +1913,11 @@ class QuadMesh(Collection):
1920
1913
"""
1921
1914
Class for the efficient drawing of a quadrilateral mesh.
1922
1915
1923
- A quadrilateral mesh consists of a grid of vertices. The
1924
- dimensions of this array are (*meshWidth* + 1, *meshHeight* +
1925
- 1). Each vertex in the mesh has a different set of "mesh
1926
- coordinates" representing its position in the topology of the
1927
- mesh. For any values (*m*, *n*) such that 0 <= *m* <= *meshWidth*
1916
+ A quadrilateral mesh consists of a grid of vertices.
1917
+ The dimensions of this array are (*meshWidth* + 1, *meshHeight* + 1).
1918
+ Each vertex in the mesh has a different set of "mesh coordinates"
1919
+ representing its position in the topology of the mesh.
1920
+ For any values (*m*, *n*) such that 0 <= *m* <= *meshWidth*
1928
1921
and 0 <= *n* <= *meshHeight*, the vertices at mesh coordinates
1929
1922
(*m*, *n*), (*m*, *n* + 1), (*m* + 1, *n* + 1), and (*m* + 1, *n*)
1930
1923
form one of the quadrilaterals in the mesh. There are thus
@@ -1937,13 +1930,11 @@ class QuadMesh(Collection):
1937
1930
function that maps from a data point to its corresponding color,
1938
1931
use the :meth:`set_cmap` method. Each of these arrays is indexed in
1939
1932
row-major order by the mesh coordinates of the vertex (or the mesh
1940
- coordinates of the lower left vertex, in the case of the
1941
- colors).
1933
+ coordinates of the lower left vertex, in the case of the colors).
1942
1934
1943
- For example, the first entry in *coordinates* is the
1944
- coordinates of the vertex at mesh coordinates (0, 0), then the one
1945
- at (0, 1), then at (0, 2) .. (0, meshWidth), (1, 0), (1, 1), and
1946
- so on.
1935
+ For example, the first entry in *coordinates* is the coordinates of the
1936
+ vertex at mesh coordinates (0, 0), then the one at (0, 1), then at (0, 2)
1937
+ .. (0, meshWidth), (1, 0), (1, 1), and so on.
1947
1938
1948
1939
*shading* may be 'flat', or 'gouraud'
1949
1940
"""
0 commit comments