@@ -837,8 +837,7 @@ def _gen_axes_spines(self, locations=None, offset=0.0, units='inches'):
837
837
'left' : mspines .Spine .linear_spine (self , 'left' ),
838
838
'right' : mspines .Spine .linear_spine (self , 'right' ),
839
839
'bottom' : mspines .Spine .linear_spine (self , 'bottom' ),
840
- 'top' : mspines .Spine .linear_spine (self , 'top' ),
841
- }
840
+ 'top' : mspines .Spine .linear_spine (self , 'top' ), }
842
841
843
842
def cla (self ):
844
843
"""Clear the current axes."""
@@ -936,8 +935,7 @@ def cla(self):
936
935
x = 0.0 , y = 1.0 , text = '' ,
937
936
fontproperties = props ,
938
937
verticalalignment = 'baseline' ,
939
- horizontalalignment = 'left' ,
940
- )
938
+ horizontalalignment = 'left' , )
941
939
self ._right_title = mtext .Text (
942
940
x = 1.0 , y = 1.0 , text = '' ,
943
941
fontproperties = props ,
@@ -4819,72 +4817,73 @@ def bar(self, left, height, width=0.8, bottom=None, **kwargs):
4819
4817
"""
4820
4818
Make a bar plot.
4821
4819
4822
- Call signature::
4823
-
4824
- bar(left, height, width=0.8, bottom=0, **kwargs)
4825
-
4826
4820
Make a bar plot with rectangles bounded by:
4827
4821
4828
- * left*, * left* + * width*, * bottom*, * bottom* + * height*
4822
+ ` left`, ` left` + ` width`, ` bottom`, ` bottom` + ` height`
4829
4823
(left, right, bottom and top edges)
4830
4824
4831
- *left*, *height*, *width*, and *bottom* can be either scalars
4832
- or sequences
4825
+ Parameters
4826
+ ----------
4827
+ left : sequence of scalars
4828
+ the x coordinates of the left sides of the bars
4833
4829
4834
- Return value is a list of
4835
- :class:`matplotlib.patches.Rectangle` instances.
4830
+ height : sequence of scalars
4831
+ the heights of the bars
4836
4832
4837
- Required arguments:
4833
+ width : scalar or array-like, optional, default: 0.8
4834
+ the width(s) of the bars
4838
4835
4839
- ======== ===============================================
4840
- Argument Description
4841
- ======== ===============================================
4842
- *left* the x coordinates of the left sides of the bars
4843
- *height* the heights of the bars
4844
- ======== ===============================================
4836
+ bottom : scalar or array-like, optional, default: None
4837
+ the y coordinate(s) of the bars
4845
4838
4846
- Optional keyword arguments:
4839
+ color : scalar or array-like, optional
4840
+ the colors of the bars
4847
4841
4848
- =============== ==========================================
4849
- Keyword Description
4850
- =============== ==========================================
4851
- *width* the widths of the bars
4852
- *bottom* the y coordinates of the bottom edges of
4853
- the bars
4854
- *color* the colors of the bars
4855
- *edgecolor* the colors of the bar edges
4856
- *linewidth* width of bar edges; None means use default
4857
- linewidth; 0 means don't draw edges.
4858
- *xerr* if not None, will be used to generate
4859
- errorbars on the bar chart
4860
- *yerr* if not None, will be used to generate
4861
- errorbars on the bar chart
4862
- *ecolor* specifies the color of any errorbar
4863
- *capsize* (default 3) determines the length in
4864
- points of the error bar caps
4865
- *error_kw* dictionary of kwargs to be passed to
4866
- errorbar method. *ecolor* and *capsize*
4867
- may be specified here rather than as
4868
- independent kwargs.
4869
- *align* 'edge' (default) | 'center'
4870
- *orientation* 'vertical' | 'horizontal'
4871
- *log* [False|True] False (default) leaves the
4872
- orientation axis as-is; True sets it to
4873
- log scale
4874
- =============== ==========================================
4842
+ edgecolor : scalar or array-like, optional
4843
+ the colors of the bar edges
4875
4844
4876
- For vertical bars, *align* = 'edge' aligns bars by their left
4877
- edges in left, while *align* = 'center' interprets these
4878
- values as the *x* coordinates of the bar centers. For
4879
- horizontal bars, *align* = 'edge' aligns bars by their bottom
4880
- edges in bottom, while *align* = 'center' interprets these
4881
- values as the *y* coordinates of the bar centers.
4845
+ linewidth : scalar or array-like, optional, default: None
4846
+ width of bar edge(s). If None, use default
4847
+ linewidth; If 0, don't draw edges.
4882
4848
4883
- The optional arguments *color*, *edgecolor*, *linewidth*,
4884
- *xerr*, and *yerr* can be either scalars or sequences of
4849
+ xerr : scalar or array-like, optional, default: None
4850
+ if not None, will be used to generate errorbar(s) on the bar chart
4851
+
4852
+ yerr :scalar or array-like, optional, default: None
4853
+ if not None, will be used to generate errorbar(s) on the bar chart
4854
+
4855
+ ecolor : scalar or array-like, optional, default: None
4856
+ specifies the color of errorbar(s)
4857
+
4858
+ capsize : integer, optional, default: 3
4859
+ determines the length in points of the error bar caps
4860
+
4861
+ error_kw :
4862
+ dictionary of kwargs to be passed to errorbar method. *ecolor* and
4863
+ *capsize* may be specified here rather than as independent kwargs.
4864
+
4865
+ align : ['edge' | 'center'], optional, default: 'edge'
4866
+ If `edge`, aligns bars by their left edges (for vertical bars) and
4867
+ by their bottom edges (for horizontal bars). If `center`, interpret
4868
+ the `left` argument as the coordinates of the centers of the bars.
4869
+
4870
+ orientation : 'vertical' | 'horizontal', optional, default: 'vertical'
4871
+ The orientation of the bars.
4872
+
4873
+ log : boolean, optional, default: False
4874
+ If true, sets the axis to be log scale
4875
+
4876
+ Returns
4877
+ -------
4878
+ :class:`matplotlib.patches.Rectangle` instances.
4879
+
4880
+ Note
4881
+ ----
4882
+ The optional arguments `color`, `edgecolor`, `linewidth`,
4883
+ `xerr`, and `yerr` can be either scalars or sequences of
4885
4884
length equal to the number of bars. This enables you to use
4886
4885
bar as the basis for stacked bar charts, or candlestick plots.
4887
- Detail: * xerr* and * yerr* are passed directly to
4886
+ Detail: ` xerr` and ` yerr` are passed directly to
4888
4887
:meth:`errorbar`, so they can also have shape 2xN for
4889
4888
independent specification of lower and upper errors.
4890
4889
0 commit comments