@@ -2006,68 +2006,85 @@ def barh(self, bottom, width, height=0.8, left=None, **kwargs):
2006
2006
"""
2007
2007
Make a horizontal bar plot.
2008
2008
2009
- Call signature::
2010
-
2011
- barh(bottom, width, height=0.8, left=0, **kwargs)
2012
-
2013
2009
Make a horizontal bar plot with rectangles bounded by:
2014
2010
2015
- * left*, * left* + * width*, * bottom*, * bottom* + * height*
2011
+ ` left`, ` left` + ` width`, ` bottom`, ` bottom` + ` height`
2016
2012
(left, right, bottom and top edges)
2017
2013
2018
- * bottom*, * width*, * height* , and * left* can be either scalars
2014
+ ` bottom`, ` width`, ` height` , and ` left` can be either scalars
2019
2015
or sequences
2020
2016
2021
- Return value is a list of
2017
+ Parameters
2018
+ ----------
2019
+ bottom : scalar or array-like
2020
+ the y coordinate(s) of the bars
2021
+
2022
+ width : scalar or array-like
2023
+ the width(s) of the bars
2024
+
2025
+ height : sequence of scalars, optional, default: 0.8
2026
+ the heights of the bars
2027
+
2028
+ left : sequence of scalars
2029
+ the x coordinates of the left sides of the bars
2030
+
2031
+ Returns
2032
+ --------
2022
2033
:class:`matplotlib.patches.Rectangle` instances.
2023
2034
2024
- Required arguments:
2035
+ Other parameters
2036
+ ----------------
2037
+ color : scalar or array-like, optional
2038
+ the colors of the bars
2039
+
2040
+ edgecolor : scalar or array-like, optional
2041
+ the colors of the bar edges
2025
2042
2026
- ======== ======================================================
2027
- Argument Description
2028
- ======== ======================================================
2029
- *bottom* the vertical positions of the bottom edges of the bars
2030
- *width* the lengths of the bars
2031
- ======== ======================================================
2043
+ linewidth : scalar or array-like, optional, default: None
2044
+ width of bar edge(s). If None, use default
2045
+ linewidth; If 0, don't draw edges.
2032
2046
2033
- Optional keyword arguments:
2047
+ xerr : scalar or array-like, optional, default: None
2048
+ if not None, will be used to generate errorbar(s) on the bar chart
2034
2049
2035
- =============== ==========================================
2036
- Keyword Description
2037
- =============== ==========================================
2038
- *height* the heights (thicknesses) of the bars
2039
- *left* the x coordinates of the left edges of the
2040
- bars
2041
- *color* the colors of the bars
2042
- *edgecolor* the colors of the bar edges
2043
- *linewidth* width of bar edges; None means use default
2044
- linewidth; 0 means don't draw edges.
2045
- *xerr* if not None, will be used to generate
2046
- errorbars on the bar chart
2047
- *yerr* if not None, will be used to generate
2048
- errorbars on the bar chart
2049
- *ecolor* specifies the color of any errorbar
2050
- *capsize* (default 3) determines the length in
2051
- points of the error bar caps
2052
- *align* 'edge' (default) | 'center'
2053
- *log* [False|True] False (default) leaves the
2054
- horizontal axis as-is; True sets it to log
2055
- scale
2056
- =============== ==========================================
2057
-
2058
- Setting *align* = 'edge' aligns bars by their bottom edges in
2059
- bottom, while *align* = 'center' interprets these values as
2060
- the *y* coordinates of the bar centers.
2061
-
2062
- The optional arguments *color*, *edgecolor*, *linewidth*,
2063
- *xerr*, and *yerr* can be either scalars or sequences of
2050
+ yerr :scalar or array-like, optional, default: None
2051
+ if not None, will be used to generate errorbar(s) on the bar chart
2052
+
2053
+ ecolor : scalar or array-like, optional, default: None
2054
+ specifies the color of errorbar(s)
2055
+
2056
+ capsize : integer, optional, default: 3
2057
+ determines the length in points of the error bar caps
2058
+
2059
+ error_kw :
2060
+ dictionary of kwargs to be passed to errorbar method. `ecolor` and
2061
+ `capsize` may be specified here rather than as independent kwargs.
2062
+
2063
+ align : ['edge' | 'center'], optional, default: 'edge'
2064
+ If `edge`, aligns bars by their left edges (for vertical bars) and
2065
+ by their bottom edges (for horizontal bars). If `center`, interpret
2066
+ the `left` argument as the coordinates of the centers of the bars.
2067
+
2068
+ orientation : 'vertical' | 'horizontal', optional, default: 'vertical'
2069
+ The orientation of the bars.
2070
+
2071
+ log : boolean, optional, default: False
2072
+ If true, sets the axis to be log scale
2073
+
2074
+ Notes
2075
+ -----
2076
+ The optional arguments `color`, `edgecolor`, `linewidth`,
2077
+ `xerr`, and `yerr` can be either scalars or sequences of
2064
2078
length equal to the number of bars. This enables you to use
2065
- barh as the basis for stacked bar charts, or candlestick
2066
- plots.
2079
+ bar as the basis for stacked bar charts, or candlestick plots.
2080
+ Detail: `xerr` and `yerr` are passed directly to
2081
+ :meth:`errorbar`, so they can also have shape 2xN for
2082
+ independent specification of lower and upper errors.
2067
2083
2068
- other optional kwargs:
2084
+ Other optional kwargs:
2069
2085
2070
2086
%(Rectangle)s
2087
+
2071
2088
"""
2072
2089
2073
2090
patches = self .bar (left = left , height = height , width = width ,
0 commit comments