@@ -1928,37 +1928,63 @@ def step(self, x, y, *args, **kwargs):
1928
1928
"""
1929
1929
Make a step plot.
1930
1930
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
+
1931
1940
Parameters
1932
1941
----------
1933
1942
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.
1936
1945
1937
1946
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.
1939
1973
1940
1974
Returns
1941
1975
-------
1942
- list
1943
- List of lines that were added .
1976
+ lines
1977
+ A list of `.Line2D` objects representing the plotted data .
1944
1978
1945
1979
Other Parameters
1946
1980
----------------
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`.
1955
1983
1956
1984
Notes
1957
1985
-----
1958
- Additional parameters are the same as those for
1959
- :func:`~matplotlib.pyplot.plot`.
1986
+ .. [notes section required to get data note injection right]
1960
1987
"""
1961
-
1962
1988
where = kwargs .pop ('where' , 'pre' )
1963
1989
if where not in ('pre' , 'post' , 'mid' ):
1964
1990
raise ValueError ("'where' argument to step must be "
@@ -4994,10 +5020,12 @@ def fill_between(self, x, y1, y2=0, where=None, interpolate=False,
4994
5020
step will occur:
4995
5021
4996
5022
- '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]``.
4998
5025
- '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.
5001
5029
5002
5030
Other Parameters
5003
5031
----------------
@@ -5175,11 +5203,13 @@ def fill_betweenx(self, y, x1, x2=0, where=None,
5175
5203
i.e. constant in between *y*. The value determines where the
5176
5204
step will occur:
5177
5205
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.
5183
5213
5184
5214
Other Parameters
5185
5215
----------------
@@ -5319,10 +5349,14 @@ def imshow(self, X, cmap=None, norm=None, aspect=None,
5319
5349
- MxNx3 -- RGB (float or uint8)
5320
5350
- MxNx4 -- RGBA (float or uint8)
5321
5351
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.
5326
5360
5327
5361
cmap : `~matplotlib.colors.Colormap`, optional, default: None
5328
5362
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,
5364
5398
settings for `vmin` and `vmax` will be ignored.
5365
5399
5366
5400
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.
5368
5403
5369
5404
origin : ['upper' | 'lower'], optional, default: None
5370
5405
Place the [0,0] index of the array in the upper left or lower left
0 commit comments