@@ -1928,37 +1928,63 @@ def step(self, x, y, *args, **kwargs):
19281928 """
19291929 Make a step plot.
19301930
1931+ Call signatures::
1932+
1933+ step(x, y, [fmt], *, data=None, where='pre', **kwargs)
1934+ step(x, y, [fmt], x2, y2, [fmt2], ..., *, where='pre', **kwargs)
1935+
1936+ This is just a thin wrapper around `.plot` which changes some
1937+ formatting options. Most of the concepts and parameters of plot can be
1938+ used here as well.
1939+
19311940 Parameters
19321941 ----------
19331942 x : array_like
1934- 1-D sequence, and it is assumed, but not checked,
1935- that it is uniformly increasing.
1943+ 1-D sequence of x positions. It is assumed, but not checked, that
1944+ it is uniformly increasing.
19361945
19371946 y : array_like
1938- 1-D sequence.
1947+ 1-D sequence of y levels.
1948+
1949+ fmt : str, optional
1950+ A format string, e.g. 'g' for a green line. See `.plot` for a more
1951+ detailed description.
1952+
1953+ Note: While full format strings are accepted, it is recommended to
1954+ only specify the color. Line styles are currently ignored (use
1955+ the keyword argument *linestyle* instead). Markers are accepted
1956+ and plotted on the given positions, however, this is a rarely
1957+ needed feature for step plots.
1958+
1959+ data : indexable object, optional
1960+ An object with labelled data. If given, provide the label names to
1961+ plot in *x* and *y*.
1962+
1963+ where : {'pre', 'post', 'mid'}, optional, default 'pre'
1964+ Define where the steps should be placed:
1965+
1966+ - 'pre': The y value is continued constantly to the left from
1967+ every *x* position, i.e. the interval ``(x[i-1], x[i]]`` has the
1968+ value ``y[i]``.
1969+ - 'post': The y value is continued constantly to the right from
1970+ every *x* position, i.e. the interval ``[x[i], x[i+1])`` has the
1971+ value ``y[i]``.
1972+ - 'mid': Steps occur half-way between the *x* positions.
19391973
19401974 Returns
19411975 -------
1942- list
1943- List of lines that were added .
1976+ lines
1977+ A list of `.Line2D` objects representing the plotted data .
19441978
19451979 Other Parameters
19461980 ----------------
1947- where : [ 'pre' | 'post' | 'mid' ]
1948- If 'pre' (the default), the interval from
1949- ``x[i]`` to ``x[i+1]`` has level ``y[i+1]``.
1950-
1951- If 'post', that interval has level ``y[i]``.
1952-
1953- If 'mid', the jumps in *y* occur half-way between the
1954- *x*-values.
1981+ **kwargs
1982+ Additional parameters are the same as those for `.plot`.
19551983
19561984 Notes
19571985 -----
1958- Additional parameters are the same as those for
1959- :func:`~matplotlib.pyplot.plot`.
1986+ .. [notes section required to get data note injection right]
19601987 """
1961-
19621988 where = kwargs .pop ('where' , 'pre' )
19631989 if where not in ('pre' , 'post' , 'mid' ):
19641990 raise ValueError ("'where' argument to step must be "
@@ -4994,10 +5020,12 @@ def fill_between(self, x, y1, y2=0, where=None, interpolate=False,
49945020 step will occur:
49955021
49965022 - 'pre': The y value is continued constantly to the left from
4997- every *x* position.
5023+ every *x* position, i.e. the interval ``(x[i-1], x[i]]`` has the
5024+ value ``y[i]``.
49985025 - 'post': The y value is continued constantly to the right from
4999- every *x* position.
5000- - 'mid': Steps occur in the middle between the *x* positions.
5026+ every *x* position, i.e. the interval ``[x[i], x[i+1])`` has the
5027+ value ``y[i]``.
5028+ - 'mid': Steps occur half-way between the *x* positions.
50015029
50025030 Other Parameters
50035031 ----------------
@@ -5175,11 +5203,13 @@ def fill_betweenx(self, y, x1, x2=0, where=None,
51755203 i.e. constant in between *y*. The value determines where the
51765204 step will occur:
51775205
5178- - 'pre': The y value is continued constantly below every *y*
5179- position.
5180- - 'post': The y value is continued constantly above every *y*
5181- position.
5182- - 'mid': Steps occur in the middle between the *y* positions.
5206+ - 'pre': The y value is continued constantly to the left from
5207+ every *x* position, i.e. the interval ``(x[i-1], x[i]]`` has the
5208+ value ``y[i]``.
5209+ - 'post': The y value is continued constantly to the right from
5210+ every *x* position, i.e. the interval ``[x[i], x[i+1])`` has the
5211+ value ``y[i]``.
5212+ - 'mid': Steps occur half-way between the *x* positions.
51835213
51845214 Other Parameters
51855215 ----------------
@@ -5319,10 +5349,14 @@ def imshow(self, X, cmap=None, norm=None, aspect=None,
53195349 - MxNx3 -- RGB (float or uint8)
53205350 - MxNx4 -- RGBA (float or uint8)
53215351
5322- The value for each component of MxNx3 and MxNx4 float arrays
5323- should be in the range 0.0 to 1.0. MxN arrays are mapped
5324- to colors based on the `norm` (mapping scalar to scalar)
5325- and the `cmap` (mapping the normed scalar to a color).
5352+ MxN arrays are mapped to colors based on the `norm` (mapping
5353+ scalar to scalar) and the `cmap` (mapping the normed scalar to
5354+ a color).
5355+
5356+ Elements of RGB and RGBA arrays represent pixels of an MxN image.
5357+ All values should be in the range [0 .. 1] for floats or
5358+ [0 .. 255] for integers. Out-of-range values will be clipped to
5359+ these bounds.
53265360
53275361 cmap : `~matplotlib.colors.Colormap`, optional, default: None
53285362 If None, default to rc `image.cmap` value. `cmap` is ignored
@@ -5364,7 +5398,8 @@ def imshow(self, X, cmap=None, norm=None, aspect=None,
53645398 settings for `vmin` and `vmax` will be ignored.
53655399
53665400 alpha : scalar, optional, default: None
5367- The alpha blending value, between 0 (transparent) and 1 (opaque)
5401+ The alpha blending value, between 0 (transparent) and 1 (opaque).
5402+ The ``alpha`` argument is ignored for RGBA input data.
53685403
53695404 origin : ['upper' | 'lower'], optional, default: None
53705405 Place the [0,0] index of the array in the upper left or lower left
0 commit comments